BALL  1.4.79
 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
static const bool ASSIGN_TYPENAMES
Definition: MMFF94.h:128
static const bool OVERWRITE_CHARGES
Definition: MMFF94.h:136
vector< HashSet< Atom * > > rings_
Definition: MMFF94.h:319
#define BALL_CREATE(name)
Definition: create.h:62
static const char * ASSIGN_TYPES
Definition: MMFF94.h:76
const MMFF94AtomTypeEquivalences & getEquivalences() const
Definition: MMFF94.h:290
static const float VDW_CUTOFF
Definition: MMFF94.h:148
static const float NONBONDED_CUTOFF
Definition: MMFF94.h:144
const MMFF94StretchParameters & getStretchParameters() const
Definition: MMFF94.h:287
static const float ELECTROSTATIC_CUTOFF
Definition: MMFF94.h:156
bool parameters_initialized_
Definition: MMFF94.h:321
static const char * OVERWRITE_CHARGES
Definition: MMFF94.h:80
const vector< HashSet< Atom * > > & getRings() const
Definition: MMFF94.h:272
static const char * FOLDER
Definition: MMFF94.h:64
static const char * OVERWRITE_TYPENAMES
Definition: MMFF94.h:84
static const char * VDW_CUTOFF
Definition: MMFF94.h:95
Kekuliser kekuliser_
Definition: MMFF94.h:325
HashSet< Bond * > aromatic_bonds_
Definition: MMFF94.h:326
String folder_
Definition: MMFF94.h:314
MMFF94AtomTyper atom_typer_
Definition: MMFF94.h:323
static const char * VDW_CUTON
Definition: MMFF94.h:100
static const char * FOLDER
Definition: MMFF94.h:120
vector< HashSet< Atom * > > aromatic_rings_
Definition: MMFF94.h:320
static const bool DISTANCE_DEPENDENT_DIELECTRIC
Default is false.
Definition: MMFF94.h:163
vector< Bond * > bonds_
Definition: MMFF94.h:322
MMFF94AtomTypes atom_types_
Definition: MMFF94.h:315
static const char * ELECTROSTATIC_CUTOFF
Definition: MMFF94.h:104
MMFF94ChargeProcessor charge_processor_
Definition: MMFF94.h:324
static const char * ELECTROSTATIC_CUTON
Definition: MMFF94.h:108
static const char * NONBONDED_CUTOFF
Definition: MMFF94.h:90
static const float VDW_CUTON
Definition: MMFF94.h:152
static const bool ASSIGN_CHARGES
Definition: MMFF94.h:124
static const char * DISTANCE_DEPENDENT_DIELECTRIC
Definition: MMFF94.h:111
static const bool ASSIGN_TYPES
Definition: MMFF94.h:132
MMFF94AtomTypeEquivalences equivalences_
Definition: MMFF94.h:317
static const bool OVERWRITE_TYPENAMES
Definition: MMFF94.h:140
MMFF94ESParameters es_parameters_
Definition: MMFF94.h:318
static const float ELECTROSTATIC_CUTON
Definition: MMFF94.h:160
static const char * ASSIGN_TYPENAMES
Definition: MMFF94.h:72
static const char * ASSIGN_CHARGES
Definition: MMFF94.h:68
MMFF94StretchParameters bond_parameters_
Definition: MMFF94.h:316
const vector< HashSet< Atom * > > & getAromaticRings() const
Definition: MMFF94.h:275
#define BALL_EXPORT
Definition: COMMON/global.h:50
const vector< MMFF94AtomType > & getAtomTypes() const
Definition: MMFF94.h:284