BALL  1.5.0
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 
216  virtual bool specificSetup();
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
BALL::Options
Definition: options.h:46
BALL::MMFF94StretchParameters
Definition: MMFF94Parameters.h:185
BALL::MMFF94::Default::ELECTROSTATIC_CUTON
static const float ELECTROSTATIC_CUTON
Definition: MMFF94.h:160
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL::MMFF94::Default::ASSIGN_CHARGES
static const bool ASSIGN_CHARGES
Definition: MMFF94.h:124
BALL::MMFF94::bonds_
vector< Bond * > bonds_
Definition: MMFF94.h:322
system.h
BALL::Kekuliser
Definition: kekulizer.h:37
BALL::MMFF94::Default::VDW_CUTON
static const float VDW_CUTON
Definition: MMFF94.h:152
BALL::MMFF94
Definition: MMFF94.h:49
BALL::MMFF94::parameters_initialized_
bool parameters_initialized_
Definition: MMFF94.h:321
BALL::HashSet
Definition: hashSet.h:45
MMFF94Parameters.h
BALL::MMFF94ESParameters
Definition: MMFF94Parameters.h:525
forceField.h
BALL::MMFF94::aromatic_rings_
vector< HashSet< Atom * > > aromatic_rings_
Definition: MMFF94.h:320
BALL::MMFF94::Option::OVERWRITE_CHARGES
static const char * OVERWRITE_CHARGES
Definition: MMFF94.h:80
BALL::MMFF94::Default::ELECTROSTATIC_CUTOFF
static const float ELECTROSTATIC_CUTOFF
Definition: MMFF94.h:156
BALL::MMFF94::Default::ASSIGN_TYPENAMES
static const bool ASSIGN_TYPENAMES
Definition: MMFF94.h:128
BALL::Bond
Definition: bond.h:54
BALL::MMFF94::Default
Definition: MMFF94.h:116
BALL::ForceField
Definition: forceField.h:85
BALL_SIZE_TYPE
BALL::System
Definition: KERNEL/system.h:38
BALL::MMFF94::getRings
const vector< HashSet< Atom * > > & getRings() const
Definition: MMFF94.h:272
BALL::MMFF94::getStretchParameters
const MMFF94StretchParameters & getStretchParameters() const
Definition: MMFF94.h:287
BALL::Atom
Definition: atom.h:87
BALL::MMFF94::Default::FOLDER
static const char * FOLDER
Definition: MMFF94.h:120
BALL::MMFF94::Option::DISTANCE_DEPENDENT_DIELECTRIC
static const char * DISTANCE_DEPENDENT_DIELECTRIC
Definition: MMFF94.h:111
BALL
Definition: constants.h:12
BALL::MMFF94::es_parameters_
MMFF94ESParameters es_parameters_
Definition: MMFF94.h:318
BALL::MMFF94::Default::DISTANCE_DEPENDENT_DIELECTRIC
static const bool DISTANCE_DEPENDENT_DIELECTRIC
Default is false.
Definition: MMFF94.h:163
BALL::MMFF94::Default::NONBONDED_CUTOFF
static const float NONBONDED_CUTOFF
Definition: MMFF94.h:144
BALL::MMFF94::Option::FOLDER
static const char * FOLDER
Definition: MMFF94.h:64
BALL::String
Definition: string.h:56
BALL::MMFF94::folder_
String folder_
Definition: MMFF94.h:314
BALL::MMFF94::Option::ELECTROSTATIC_CUTOFF
static const char * ELECTROSTATIC_CUTOFF
Definition: MMFF94.h:104
BALL::MMFF94::kekuliser_
Kekuliser kekuliser_
Definition: MMFF94.h:325
BALL::MMFF94::atom_typer_
MMFF94AtomTyper atom_typer_
Definition: MMFF94.h:323
BALL::MMFF94::atom_types_
MMFF94AtomTypes atom_types_
Definition: MMFF94.h:315
BALL::MMFF94::Default::ASSIGN_TYPES
static const bool ASSIGN_TYPES
Definition: MMFF94.h:132
BALL::MMFF94::getBonds
const vector< Bond * > getBonds() const
Definition: MMFF94.h:269
BALL::MMFF94ChargeProcessor
Definition: MMFF94Processors.h:96
BALL::MMFF94::Option::VDW_CUTOFF
static const char * VDW_CUTOFF
Definition: MMFF94.h:95
BALL::MMFF94::equivalences_
MMFF94AtomTypeEquivalences equivalences_
Definition: MMFF94.h:317
BALL::MMFF94::Option::NONBONDED_CUTOFF
static const char * NONBONDED_CUTOFF
Definition: MMFF94.h:90
BALL::MMFF94::bond_parameters_
MMFF94StretchParameters bond_parameters_
Definition: MMFF94.h:316
hashSet.h
MMFF94Processors.h
kekulizer.h
BALL::MMFF94AtomTypeEquivalences
Definition: MMFF94Parameters.h:83
BALL::MMFF94::Option::VDW_CUTON
static const char * VDW_CUTON
Definition: MMFF94.h:100
BALL::MMFF94::Default::OVERWRITE_TYPENAMES
static const bool OVERWRITE_TYPENAMES
Definition: MMFF94.h:140
BALL::MMFF94::getAromaticRings
const vector< HashSet< Atom * > > & getAromaticRings() const
Definition: MMFF94.h:275
common.h
BALL::MMFF94::Default::VDW_CUTOFF
static const float VDW_CUTOFF
Definition: MMFF94.h:148
BALL::MMFF94::Option::OVERWRITE_TYPENAMES
static const char * OVERWRITE_TYPENAMES
Definition: MMFF94.h:84
BALL::MMFF94::Default::OVERWRITE_CHARGES
static const bool OVERWRITE_CHARGES
Definition: MMFF94.h:136
BALL::MMFF94::getEquivalences
const MMFF94AtomTypeEquivalences & getEquivalences() const
Definition: MMFF94.h:290
BALL::MMFF94::Option
Definition: MMFF94.h:60
BALL_CREATE
#define BALL_CREATE(name)
Definition: create.h:62
BALL::MMFF94AtomTyper
Definition: MMFF94Processors.h:41
BALL::MMFF94::Option::ASSIGN_TYPENAMES
static const char * ASSIGN_TYPENAMES
Definition: MMFF94.h:72
BALL::MMFF94::Option::ELECTROSTATIC_CUTON
static const char * ELECTROSTATIC_CUTON
Definition: MMFF94.h:108
BALL::MMFF94AtomTypes
Definition: MMFF94Parameters.h:157
BALL::MMFF94::charge_processor_
MMFF94ChargeProcessor charge_processor_
Definition: MMFF94.h:324
BALL::MMFF94::Option::ASSIGN_TYPES
static const char * ASSIGN_TYPES
Definition: MMFF94.h:76
BALL::MMFF94::aromatic_bonds_
HashSet< Bond * > aromatic_bonds_
Definition: MMFF94.h:326
BALL::MMFF94::Option::ASSIGN_CHARGES
static const char * ASSIGN_CHARGES
Definition: MMFF94.h:68
BALL::MMFF94::getAtomTypes
const vector< MMFF94AtomType > & getAtomTypes() const
Definition: MMFF94.h:284
BALL::MMFF94::rings_
vector< HashSet< Atom * > > rings_
Definition: MMFF94.h:319