Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ctab_parser.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 // :noTabs=false:tabSize=4:indentSize=4:
4 //
5 // This file is part of the Rosetta software suite and is made available under license.
6 // The Rosetta software is developed by the contributing members of the Rosetta Commons consortium.
7 // (C) 199x-2009 Rosetta Commons participating institutions and developers.
8 // For more information, see http://www.rosettacommons.org/.
9 
10 /// @file core/chemical/sdf/ctab_parsher.hh
11 ///
12 /// @brief parse the CTAB table into a residue object
13 /// @author Sam DeLuca
14 
15 
16 #ifndef INCLUDED_CORE_chemical_sdf_ctab_parser_HH
17 #define INCLUDED_CORE_chemical_sdf_ctab_parser_HH
18 
19 #include <string>
20 #include <map>
21 #include <vector>
25 #include <utility/vector1.hh>
29 
30 
31 namespace core {
32 namespace chemical {
33 namespace sdf {
34 
35 static std::string const DEFAULT_ATOM_TYPE_="CH3";
37 
38 /*
39 struct addedH {
40 public:
41  core::Size atom_number;
42  std::string bonded_atom_name;
43  std::string atom_type;
44 };
45 
46 
47 class elementToType {
48 public:
49  elementToType();
50  std::string get(std::string key);
51 private:
52  std::map<std::string, std::string> e_to_t;
53 };
54 */
56 
58 
59 public:
60  ctabV2000Parser(const utility::vector1<std::string> connection_table_lines, core::chemical::ResidueTypeOP molecule_container,MolData mol_data);
61  void ParseTable();
62 
64  //protocols::ligand_docking::ColoredGraphOP GetResidueGraph();
65 
66 
67 private:
68  void set_atom_type(core::Size atomno, std::string atomname);
69  void ParseAtom(const std::string atom_line, core::Size atom_number);
70  void ParseBond(const std::string bond_line);
71  std::map<core::Size,std::string> ParseAtomTypeData();
72 
73 private:
76  std::map<core::Size, std::string> index_to_names_map_;
80 
81 };
82 
84 public:
85  ctabV3000Parser(const utility::vector1<std::string> connection_table_lines, core::chemical::ResidueTypeOP molecule_container, MolData mol_data );
86 
87  void ParseTable();
88 
90  //protocols::ligand_docking::ColoredGraphOP GetResidueGraph();
91 
92 
93 private:
94  void set_atom_type(core::Size atomno, std::string atomname);
95  void ParseAtom(const std::string atom_line);
96  void ParseBond(const std::string bond_line );
97  core::Real FindExtraParameter( std::vector<std::string> extra_parameters, const std::string query);
98  std::map<core::Size,std::string> ParseAtomTypeData();
99 
100 private:
103  std::map<core::Size, std::string> index_to_names_map_;
107 
108 };
109 
110 
111 
112 }
113 }
114 }
115 
116 
117 #endif /* CTAB_PARSER_HH_ */