BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
hybridisationProcessor.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_STRUCTURE_HYBRIDISATIONPROCESSOR_H
6 #define BALL_STRUCTURE_HYBRIDISATIONPROCESSOR_H
7 
8 #ifndef BALL_CONCEPT_PROCESSOR_H
9  #include <BALL/CONCEPT/processor.h>
10 #endif
11 
12 #ifndef BALL_KERNEL_ATOMCONTAINER_H
14 #endif
15 
16 #ifndef BALL_DATATYPE_HASHMAP_H
17  #include <BALL/DATATYPE/hashMap.h>
18 #endif
19 
20 #ifndef BALL_KERNEL_BOND_H
21  #include <BALL/KERNEL/bond.h>
22 #endif
23 
24 #ifndef BALL_DATATYPE_OPTIONS_H
25  #include <BALL/DATATYPE/options.h>
26 #endif
27 
28 #ifndef BALL_DATATYPE_STRINGHASHMAP_H
30 #endif
31 
32 
33 #include <map>
34 
35 
36 namespace BALL
37 {
38 
43  : public UnaryProcessor<AtomContainer>
44  {
45 
46  public:
47 
51 
53  {
57  static const char* ATOM_TYPE_SMARTS_FILENAME;
58 
62  static const char* ATOM_TYPE_FF_FILENAME;
63 
73  static const String METHOD;
74 
75  };
76 
79  {
81  static const char* ATOM_TYPE_SMARTS_FILENAME;
82 
86  static const char* ATOM_TYPE_FF_FILENAME;
87 
91  static const String METHOD;
92  };
93 
95  {
96  static const String SMART_MATCHING;
97  static const String STRUCTURE_BASED;
98  static const String FF_BASED;
99  };
100 
101 
103 
104 
108 
110 
113 
116 
119  HybridisationProcessor(const String& smarts_file_name, const String& ff_file_name) throw(Exception::FileNotFound);
120 
122  virtual ~HybridisationProcessor();
124 
128 
130  virtual bool start();
131 
133  virtual Processor::Result operator () (AtomContainer& ac);
135 
139 
140  Size getNumberOfHybridisationStatesSet();
141 
143  void setAtomTypeSmarts(const String& file_name) throw(Exception::FileNotFound);
144 
146  vector< std::pair<String, Size> > getHybridisationMap() { return atom_type_smarts_;};
148 
152 
153  HybridisationProcessor& operator = (const HybridisationProcessor& hp);
155 
159 
161 
164  void setDefaultOptions();
166 
167  protected:
168 
171  struct Elements_
172  {
176  unsigned char hyb;
177  };
178 
181  struct AtomNames_
182  {
189  };
190 
192  bool readAtomTypeSmartsFromFile_(const String& file_name = "") throw(Exception::FileNotFound);
193 
195  Size num_hybridisation_states_;
196 
198  vector< std::pair<String, Size> > atom_type_smarts_;
199 
203  StringHashMap<StringHashMap<StringHashMap<std::multimap<float, AtomNames_> > > > bond_angles_;
204 
205  bool readAndInitBondAnglesFromFile_(const String& file_name = "") throw(Exception::FileNotFound);
206 
210 
211 
213  bool valid_;
214 
215 
217  double AverageBondAngle_(Atom* a);
218 
219  };
220 
221 } // namespace BALL
222 
223 
224 #endif // BALL_STRUCTURE_HYBRIDISATIONPROCESSOR_H