BALL  1.5.0
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  struct BALL_EXPORT Option
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 
121  HybridisationProcessor(const String& smarts_file_name, const String& ff_file_name);
122 
124  virtual ~HybridisationProcessor();
126 
130 
132  virtual bool start();
133 
135  virtual Processor::Result operator () (AtomContainer& ac);
137 
141  Size getNumberOfHybridisationStatesSet();
143 
147  void setAtomTypeSmarts(const String& file_name);
148 
150  vector< std::pair<String, Size> > getHybridisationMap() { return atom_type_smarts_;};
152 
156  HybridisationProcessor& operator = (const HybridisationProcessor& hp);
159 
163  Options options;
165 
168  void setDefaultOptions();
170 
171  protected:
172 
175  struct Elements_
176  {
180  unsigned char hyb;
181  };
182 
185  struct AtomNames_
186  {
193  };
194 
198  bool readAtomTypeSmartsFromFile_(const String& file_name = "");
199 
202 
204  vector< std::pair<String, Size> > atom_type_smarts_;
205 
210 
212  bool readAndInitBondAnglesFromFile_(const String& file_name = "");
213 
217 
218 
220  bool valid_;
221 
222 
224  double AverageBondAngle_(Atom* a);
225 
226  };
227 
228 } // namespace BALL
229 
230 
231 #endif // BALL_STRUCTURE_HYBRIDISATIONPROCESSOR_H
BALL::Options
Definition: options.h:46
BALL::HybridisationProcessor::AtomNames_::a2
String a2
Second atom.
Definition: hybridisationProcessor.h:190
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL::HybridisationProcessor::Elements_::type
String type
The type.
Definition: hybridisationProcessor.h:178
hashMap.h
bond.h
BALL::StringHashMap
Definition: stringHashMap.h:40
BALL::HybridisationProcessor::Method::SMART_MATCHING
static const String SMART_MATCHING
Definition: hybridisationProcessor.h:96
BALL::HybridisationProcessor::Default::METHOD
static const String METHOD
Definition: hybridisationProcessor.h:91
BALL::AtomContainer
Definition: atomContainer.h:29
BALL_SIZE_TYPE
stringHashMap.h
BALL::HybridisationProcessor::atom_type_smarts_
vector< std::pair< String, Size > > atom_type_smarts_
structure where atom type smarts and the corresponding hybridisation states are stored in
Definition: hybridisationProcessor.h:204
BALL::Atom
Definition: atom.h:87
BALL::HybridisationProcessor::Option::ATOM_TYPE_FF_FILENAME
static const char * ATOM_TYPE_FF_FILENAME
Definition: hybridisationProcessor.h:62
BALL::HybridisationProcessor::AtomNames_::a1
String a1
First atom.
Definition: hybridisationProcessor.h:188
BALL::HybridisationProcessor::Option::METHOD
static const String METHOD
Definition: hybridisationProcessor.h:73
BALL::HybridisationProcessor::elements_
StringHashMap< Elements_ > elements_
Definition: hybridisationProcessor.h:216
BALL
Definition: constants.h:12
BALL::HybridisationProcessor::Method
Definition: hybridisationProcessor.h:94
BALL::String
Definition: string.h:56
BALL::HybridisationProcessor::Default::ATOM_TYPE_FF_FILENAME
static const char * ATOM_TYPE_FF_FILENAME
Definition: hybridisationProcessor.h:86
BALL::HybridisationProcessor::Method::FF_BASED
static const String FF_BASED
Definition: hybridisationProcessor.h:98
BALL::HybridisationProcessor::Option::ATOM_TYPE_SMARTS_FILENAME
static const char * ATOM_TYPE_SMARTS_FILENAME
Definition: hybridisationProcessor.h:57
options.h
BALL::HybridisationProcessor::getHybridisationMap
vector< std::pair< String, Size > > getHybridisationMap()
Return the atom_types–hybridisation Hashmap.
Definition: hybridisationProcessor.h:150
BALL::HybridisationProcessor::Option
Option names.
Definition: hybridisationProcessor.h:52
BALL::HybridisationProcessor::AtomNames_::a3
String a3
Third atom.
Definition: hybridisationProcessor.h:192
processor.h
BALL::HybridisationProcessor::valid_
bool valid_
the Processors state
Definition: hybridisationProcessor.h:220
BALL::HybridisationProcessor::AtomNames_
Definition: hybridisationProcessor.h:185
BALL::HybridisationProcessor::num_hybridisation_states_
Size num_hybridisation_states_
number of bonds, which are created during the processor call
Definition: hybridisationProcessor.h:201
BALL::UnaryProcessor
Definition: processor.h:58
BALL::HybridisationProcessor::Default::ATOM_TYPE_SMARTS_FILENAME
static const char * ATOM_TYPE_SMARTS_FILENAME
default file name for the atom type smarts
Definition: hybridisationProcessor.h:81
BALL::HybridisationProcessor
Definition: hybridisationProcessor.h:42
BALL::HybridisationProcessor::Elements_::hyb
unsigned char hyb
Hybridization state.
Definition: hybridisationProcessor.h:180
atomContainer.h
BALL::HybridisationProcessor::Elements_
Definition: hybridisationProcessor.h:175
BALL::Processor::Result
int Result
Definition: processor.h:36
BALL_CREATE
#define BALL_CREATE(name)
Definition: create.h:62
BALL::HybridisationProcessor::Method::STRUCTURE_BASED
static const String STRUCTURE_BASED
Definition: hybridisationProcessor.h:97
BALL::HybridisationProcessor::Default
Default values for options.
Definition: hybridisationProcessor.h:78
BALL::HybridisationProcessor::bond_angles_
StringHashMap< StringHashMap< StringHashMap< std::multimap< float, AtomNames_ > > > > bond_angles_
Definition: hybridisationProcessor.h:209