Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ctab_base.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file src/core/chemical/sdf/ctab_base.hh
11 /// @author Sam DeLuca
12 
13 
14 
15 #ifndef INCLUDED_core_chemical_sdf_ctab_base_hh
16 #define INCLUDED_core_chemical_sdf_ctab_base_hh
17 
19 
21 #include <utility/vector1.hh>
23 // AUTO-REMOVED #include <core/chemical/sdf/mol_util.hh>
24 
26 #include <set>
27 
28 
29 namespace core {
30 namespace chemical {
31 namespace sdf {
32 
33 static std::string const DEFAULT_ATOM_TYPE_="CH3";
35 
36 struct addedH {
37 public:
41 };
42 
43 
45 public:
46  elementToType();
47  std::string get(std::string key);
48 private:
49  std::map<std::string, std::string> e_to_t;
50 };
51 
53 
54 class CtabBase {
55 public:
56  CtabBase(utility::vector1<std::string> const & connection_table_lines, core::chemical::ResidueTypeOP molecule_container, MolData const & mol_data);
57 
58  virtual ~CtabBase();
59 
60  virtual void ParseTable() = 0;
62 
64  std::string connection_table_line(core::Size const line_number) const;
65 
66  void add_index_name_pair(core::Size const index, std::string const atomname);
67  std::string atom_name_from_index(core::Size const index) const;
68 
69  bool check_for_aromatic(core::Size lower, core::Size upper);
70 
71  void set_atom_type(core::Size const atomno, std::string const atomname);
72  void fix_atom_types();
73 
74 
75 private:
76  virtual void ParseAtom(std::string const atom_line, core::Size const atom_number) = 0;
77  virtual void ParseBond(std::string const bond_line) = 0;
78 
79 
80 private:
81 
85  std::map<core::Size, std::string> index_to_names_map_;
86 
87  std::map<core::Size,std::string> atom_type_data_map_;
88  std::set<BondData> bond_type_data_set_;
89 
90 };
91 
92 }
93 }
94 }
95 
96 
97 #endif /* CTAB_BASE_HH_ */