BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MMFF94.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: MMFF94.h,v 1.1.8.3 2007/06/15 09:24:20 amoll Exp $
5 //
6 
7 // Molecular Mechanics: MMFF94 force field class
8 
9 #ifndef BALL_MOLMEC_MMFF94_MMFF94_H
10 #define BALL_MOLMEC_MMFF94_MMFF94_H
11 
12 #ifndef BALL_COMMON_H
13 # include <BALL/common.h>
14 #endif
15 
16 #ifndef BALL_MOLMEC_COMMON_FORCEFIELD_H
18 #endif
19 
20 #ifndef BALL_KERNEL_SYSTEM_H
21 # include <BALL/KERNEL/system.h>
22 #endif
23 
24 #ifndef BALL_MOLMEC_MMFF94_MMFF94PARAMETERS_H
26 #endif
27 
28 #ifndef BALL_MOLMEC_MMFF94_MMFF94PROCESSORS_H
30 #endif
31 
32 #ifndef BALL_DATATYPE_HASHSET_H
33 # include <BALL/DATATYPE/hashSet.h>
34 #endif
35 
36 #ifndef BALL_STRUCTURE_KEKULIZER_H
38 #endif
39 
40 #include <vector>
41 
42 namespace BALL
43 {
44  using std::vector;
45 
50  : public ForceField
51  {
52  public:
53 
57 
61  {
64  static const char* FOLDER;
65 
68  static const char* ASSIGN_CHARGES;
69 
72  static const char* ASSIGN_TYPENAMES;
73 
76  static const char* ASSIGN_TYPES;
77 
80  static const char* OVERWRITE_CHARGES;
81 
84  static const char* OVERWRITE_TYPENAMES;
85 
90  static const char* NONBONDED_CUTOFF;
91 
95  static const char* VDW_CUTOFF;
96 
100  static const char* VDW_CUTON;
101 
104  static const char* ELECTROSTATIC_CUTOFF;
105 
108  static const char* ELECTROSTATIC_CUTON;
109 
111  static const char* DISTANCE_DEPENDENT_DIELECTRIC;
112  };
113 
117  {
120  static const char* FOLDER;
121 
124  static const bool ASSIGN_CHARGES;
125 
128  static const bool ASSIGN_TYPENAMES;
129 
132  static const bool ASSIGN_TYPES;
133 
136  static const bool OVERWRITE_CHARGES;
137 
140  static const bool OVERWRITE_TYPENAMES;
141 
144  static const float NONBONDED_CUTOFF;
145 
148  static const float VDW_CUTOFF;
149 
152  static const float VDW_CUTON;
153 
156  static const float ELECTROSTATIC_CUTOFF;
157 
160  static const float ELECTROSTATIC_CUTON;
161 
163  static const bool DISTANCE_DEPENDENT_DIELECTRIC;
164  };
165 
167 
170 
172 
173 
175  MMFF94();
176 
179  MMFF94(System& system);
180 
183  MMFF94(System& system, const Options& options);
184 
187  MMFF94(const MMFF94& force_field);
188 
191  virtual ~MMFF94();
192 
194 
197 
200  const MMFF94& operator = (const MMFF94& force_field)
201  ;
202 
205  virtual void clear()
206  ;
207 
209 
212 
215  virtual bool specificSetup()
216  throw(Exception::TooManyErrors);
217 
219 
222 
225  double getStretchEnergy() const;
226 
229  double getBendEnergy() const;
230 
232  double getStretchBendEnergy() const;
233 
237  double getTorsionEnergy() const;
238 
242  double getNonbondedEnergy() const;
243 
246  double getESEnergy() const;
247 
250  double getVdWEnergy() const;
251 
253  double getPlaneEnergy() const;
254 
257  bool hasInitializedParameters() const;
258 
262  Size getUpdateFrequency() const;
263 
265  virtual String getResults() const
266  ;
267 
269  const vector<Bond*> getBonds() const { return bonds_;}
270 
272  const vector<HashSet<Atom*> >& getRings() const { return rings_;}
273 
275  const vector<HashSet<Atom*> >& getAromaticRings() const { return aromatic_rings_;}
276 
278  bool isInOneAromaticRing(const Bond& bond) const;
279 
281  bool assignMMFF94BondType(Bond& bond) const;
282 
284  const vector<MMFF94AtomType>& getAtomTypes() const { return atom_types_.getAtomTypes();}
285 
287  const MMFF94StretchParameters& getStretchParameters() const { return bond_parameters_;}
288 
290  const MMFF94AtomTypeEquivalences & getEquivalences() const { return equivalences_;}
291 
293  bool areInOneRing(vector<Atom*> v, Size ring_size = 0) const;
294 
296  bool areInOneAromaticRing(const vector<Atom*>& v, Size ring_size = 0) const;
297 
301  bool checkAtomType(Atom& atom);
302 
304 
305  protected:
306 
307  void insertComponents_();
308 
309  void transformAromaticBonds_();
310  void collectBonds_();
311  void assignBondTypes_();
312  void collectRings_();
313 
319  vector<HashSet<Atom*> > rings_;
320  vector<HashSet<Atom*> > aromatic_rings_;
322  vector<Bond*> bonds_;
327  };
328 
329 } // namespace BALL
330 
331 #endif // BALL_MOLMEC_MMFF94_H