BALL  1.5.0
MMFF94Parameters.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: MMFF94Parameters.h,v 1.1.8.1 2007/03/25 21:25:17 oliver Exp $
5 //
6 
7 // Molecular Mechanics: MMFF94 force field class
8 
9 #ifndef BALL_MOLMEC_MMFF94_MMFF94PARAMETERS_H
10 #define BALL_MOLMEC_MMFF94_MMFF94PARAMETERS_H
11 
12 #ifndef BALL_COMMON_H
13 # include <BALL/common.h>
14 #endif
15 
16 #ifndef BALL_DATATYPE_HASHMAP_H
17 # include <BALL/DATATYPE/hashMap.h>
18 #endif
19 
20 namespace BALL
21 {
22 
23  class Atom;
24  class Parameters;
25 
26  Position getMMFF94Index(Position atom_type1, Position atom_type2);
27 
30 
31  class MMFF94AtomTypeEquivalences;
32 
33 #define MMFF94_INVALID_VALUE 99.0
34 
36 
40  {
41  public:
42 
44 
45 
47 
49  virtual ~MMFF94ParametersBase() {};
50 
52  const MMFF94ParametersBase& operator = (const MMFF94ParametersBase&)
53  {return *this;};
54 
56  virtual void clear()
57  ;
58 
60  bool isInitialized() { return is_initialized_;}
61 
63  bool readParameters(Parameters& p, const String& section);
64 
66  void setEquivalences(const MMFF94AtomTypeEquivalences& equi) { equiv_ = &equi;}
67 
68  protected:
69 
70  virtual bool setup_(const std::vector<std::vector<String> >&) { return true;};
71 
72  bool is_initialized_;
73 
74  // nr of needed fields in parameter files
77  };
78 
79 
85  {
86  public:
87 
90 
93 
96 
98  void clear()
99  ;
100 
105  Index getEquivalence(Position original, Position number) const;
106 
107  protected:
108 
109  virtual bool setup_(const std::vector<std::vector<String> >&);
110  std::vector<std::vector<Position> > equivalences_;
111  std::vector<String> names_;
112  std::vector<bool> exists_;
113  };
114 
115 
118  {
120  MMFF94AtomType();
121 
124 
127 
130 
132  bool pilp;
133 
138 
140  bool arom;
141 
143  bool lin;
144 
146  bool sbmb;
147 
149  bool valid;
150  };
151 
152 
154 
158  public MMFF94ParametersBase
159  {
160  public:
161 
163  MMFF94AtomTypes();
164 
166  MMFF94AtomTypes(const MMFF94AtomTypes& to_copy);
167 
170 
172  const std::vector<MMFF94AtomType>& getAtomTypes() const { return data_;}
173 
174  protected:
175 
176  virtual bool setup_(const std::vector<std::vector<String> >&);
177  std::vector<MMFF94AtomType> data_;
178  };
179 
181 
186  public MMFF94ParametersBase
187  {
188  public:
189 
191  struct BondData
192  {
193  BondData();
194 
195  double kb_normal;
196  double r0_normal;
198 
200  double kb_sbmb;
201  double r0_sbmb;
203  bool empirical;
204  };
205 
208  {
209  double kb;
210  double r0;
211  };
212 
216 
218 
219 
221 
223  virtual ~MMFF94StretchParameters();
224 
226  const MMFF94StretchParameters& operator = (const MMFF94StretchParameters& param)
227  ;
228 
230  virtual void clear()
231  ;
232 
234  bool assignParameters(Position type1, Position type2, BondData& data) const;
235 
237  bool readEmpiricalParameters(Parameters& p, const String& section);
238 
240  const StretchMap& getBondParameters() const { return parameters_;}
241 
243  const EmpiricalStretchMap& getEmpiricalParameters() const { return empirical_parameters_;}
244 
245  static double radii[];
246  static double electronegatives[];
247 
248  protected:
249 
250  virtual bool setup_(const std::vector<std::vector<String> >&);
251 
256  };
257 
259 
264  : public MMFF94ParametersBase
265  {
266  public:
267 
270 
272 
273 
275 
277  virtual ~MMFF94BendParameters();
278 
280  const MMFF94BendParameters& operator = (const MMFF94BendParameters& param)
281  ;
282 
284  virtual void clear()
285  ;
286 
288  bool assignParameters(Position bend_type,
289  Position atom_type1, Position atom_type2, Position atom_type3,
290  double& ka, double& angle) const;
291 
292  protected:
293 
294  virtual bool setup_(const std::vector<std::vector<String> >&);
295 
296  Position getIndex_(Position bend_type, Position atom_type1, Position atom_type2, Position atom_type3) const;
297 
301  };
302 
303 
306 
311  : public MMFF94ParametersBase
312  {
313  public:
314 
317 
319 
320 
322 
324  virtual ~MMFF94StretchBendParameters();
325 
327  const MMFF94StretchBendParameters& operator = (const MMFF94StretchBendParameters& param)
328  ;
329 
331  virtual void clear()
332  ;
333 
335  bool assignParameters(Position stretch_bend_type, const Atom& atom1, const Atom& atom2, const Atom& atom3,
336  double& kba_ijk, double& kba_kji) const;
337 
341  bool readEmpiricalParameters(Parameters& p, const String& section);
342 
344 
345  protected:
346 
347  virtual bool setup_(const std::vector<std::vector<String> >&);
348 
349  Position getIndex_(Position stretch_bend_type,
350  Position atom_type1, Position atom_type2, Position atom_type3) const;
351 
352  Position getIndexByRow_(Position r1, Position r2, Position r3) const;
353 
358  };
359 
362 
367  : public MMFF94ParametersBase
368  {
369  public:
370 
373 
375 
376 
378 
380  virtual ~MMFF94TorsionParameters();
381 
383  const MMFF94TorsionParameters& operator = (const MMFF94TorsionParameters& param)
384  ;
385 
387  virtual void clear()
388  ;
389 
391  bool assignParameters(Position type_index,
392  Index at1, Index at2, Index at3, Index at4,
393  double& v1, double& v2, double& v3) const;
394 
395  protected:
396 
397  virtual bool setup_(const std::vector<std::vector<String> >&);
398 
399  String getIndex_(Position type, Position atom_type1, Position atom_type2, Position atom_type3, Position atom_type4) const;
400 
404  static Position ic_[5];
405  static Position lc_[5];
406  };
407 
410 
415  : public MMFF94ParametersBase
416  {
417  public:
418 
421 
423 
424 
426 
428  virtual ~MMFF94PlaneParameters();
429 
431  const MMFF94PlaneParameters& operator = (const MMFF94PlaneParameters& param)
432  ;
433 
435  virtual void clear()
436  ;
437 
439  bool assignParameters(Index at1, Index at2, Index at3, Index at4, double& v) const;
440 
441  protected:
442 
443  virtual bool setup_(const std::vector<std::vector<String> >&);
444 
445  String getIndex_(Position atom_type1, Position atom_type2, Position atom_type3, Position atom_type4) const;
446 
450  };
451 
454 
459  : public MMFF94ParametersBase
460  {
461  public:
462 
463  struct VDWEntry
464  {
465  double alpha_i;
466  double ni;
467  double ai;
468  double gi;
470  bool valid;
471  };
472 
474 
475 
477 
479  virtual ~MMFF94VDWParameters();
480 
482  const MMFF94VDWParameters& operator = (const MMFF94VDWParameters& param)
483  ;
484 
486  virtual void clear()
487  ;
488 
490  double getR(Position atom_type) const;
491 
493  const VDWEntry& getParameters(Index at) const;
494 
496  bool assignParameters(Position at1, Position at2, double& rij, double& rij_7_, double& eij) const;
497 
498  protected:
499 
500  virtual bool setup_(const std::vector<std::vector<String> >&);
501 
503  std::vector<VDWEntry> parameters_;
504 
505  // R star ii for all individual atom types
506  mutable std::vector<double> rs_;
507 
508  // R star ij for pairs of atom types
509  mutable std::vector<double> rij_;
510  // R star ij ^ 7 for pairs of atom types
511  mutable std::vector<double> rij_7_;
512  // R star ij and for pairs of atom types
513  mutable std::vector<double> eij_;
514  // bools if indivual value was already calculated
515  mutable std::vector<bool> calculated_;
516  };
517 
518 
521 
526  : public MMFF94ParametersBase
527  {
528  public:
529 
531 
532 
534 
536  virtual ~MMFF94ESParameters();
537 
539  const MMFF94ESParameters& operator = (const MMFF94ESParameters& param)
540  ;
541 
543  virtual void clear()
544  ;
545 
550  double getPartialCharge(Position at1, Position at2, Position bt) const;
551 
553  bool readEmpiricalParameters(Parameters& p, const String& section);
554 
556  double getPhi(Index atom_type) const;
557 
559  double getPBCI(Index atom_type) const;
560 
561  protected:
562 
563  virtual bool setup_(const std::vector<std::vector<String> >&);
564  Position getIndex_(Position at1, Position at2, Position bt) const;
565 
567  std::vector<double> parameters_, phis_, pbcis_;
568  };
569 
570 
571 } // namespace BALL
572 
573 #endif // BALL_MOLMEC_MMFF94_MMFF94PARAMETERS_H
BALL::MMFF94BendParameters::BendMap
HashMap< Position, std::pair< double, double > > BendMap
Map with the force constant and reference angle.
Definition: MMFF94Parameters.h:269
BALL::MMFF94AtomType::valid
bool valid
Is this a valid MMFF94 atom type?
Definition: MMFF94Parameters.h:149
BALL::MMFF94ParametersBase::setEquivalences
void setEquivalences(const MMFF94AtomTypeEquivalences &equi)
Definition: MMFF94Parameters.h:66
BALL::MMFF94StretchParameters::parameters_
StretchMap parameters_
standard parameters
Definition: MMFF94Parameters.h:253
BALL::Parameters
Definition: parameters.h:24
BALL::MMFF94StretchParameters::StretchMap
HashMap< Position, BondData > StretchMap
Definition: MMFF94Parameters.h:214
BALL::MMFF94ESParameters
Definition: MMFF94Parameters.h:525
BALL::MMFF94StretchParameters::BondData::kb_sbmb
double kb_sbmb
parameters for optinal single-bond–multiple bond cases (see MMFFPROP.PAR)
Definition: MMFF94Parameters.h:200
BALL::MMFF94VDWParameters::VDWEntry::ni
double ni
Definition: MMFF94Parameters.h:466
BALL::MMFF94ParametersBase::setup_
virtual bool setup_(const std::vector< std::vector< String > > &)
Definition: MMFF94Parameters.h:70
hashMap.h
BALL::MMFF94VDWParameters::VDWEntry::valid
bool valid
Definition: MMFF94Parameters.h:470
BALL::MMFF94PlaneParameters::PlaneMap
HashMap< String, double > PlaneMap
Map with the force constant.
Definition: MMFF94Parameters.h:420
BALL::HashMap< Position, BondData >
BALL::Size
BALL_SIZE_TYPE Size
Definition: COMMON/global.h:114
BALL::MMFF94ParametersBase::isInitialized
bool isInitialized()
Definition: MMFF94Parameters.h:60
BALL::MMFF94VDWParameters::VDWEntry::gi
double gi
Definition: MMFF94Parameters.h:468
BALL::Atom
Definition: atom.h:87
BALL::MMFF94StretchParameters::getBondParameters
const StretchMap & getBondParameters() const
Definition: MMFF94Parameters.h:240
BALL::Position
BALL_SIZE_TYPE Position
Definition: COMMON/global.h:140
BALL::MMFF94AtomType::arom
bool arom
is aromatic
Definition: MMFF94Parameters.h:140
BALL::MMFF94AtomTypes::getAtomTypes
const std::vector< MMFF94AtomType > & getAtomTypes() const
Definition: MMFF94Parameters.h:172
BALL::MMFF94AtomTypeEquivalences::equivalences_
std::vector< std::vector< Position > > equivalences_
Definition: MMFF94Parameters.h:110
BALL::MMFF94AtomType::val
Position val
number of bonds made to this atom type
Definition: MMFF94Parameters.h:129
BALL::MMFF94StretchParameters::BondData::empirical
bool empirical
Definition: MMFF94Parameters.h:203
BALL::MMFF94StretchParameters::BondData::standard_bond_exists
bool standard_bond_exists
Definition: MMFF94Parameters.h:197
BALL::String
Definition: string.h:56
BALL::MMFF94StretchParameters::EmpiricalBondData::kb
double kb
Definition: MMFF94Parameters.h:209
BALL::MMFF94VDWParameters::VDWEntry::donor_acceptor
short donor_acceptor
Definition: MMFF94Parameters.h:469
BALL::MMFF94StretchBendParameters::buffered_parameters_
StretchBendMap buffered_parameters_
Definition: MMFF94Parameters.h:356
BALL::MMFF94StretchParameters::BondData::kb_normal
double kb_normal
Definition: MMFF94Parameters.h:195
BALL::MMFF94ESParameters::phis_
std::vector< double > phis_
Definition: MMFF94Parameters.h:567
BALL::MMFF94PlaneParameters
Definition: MMFF94Parameters.h:414
BALL::MMFF94StretchParameters::BondData::r0_normal
double r0_normal
Definition: MMFF94Parameters.h:196
BALL
Definition: constants.h:12
BALL::MMFF94AtomType::sbmb
bool sbmb
can have a delocalized single bond
Definition: MMFF94Parameters.h:146
BALL::MMFF94ParametersBase::number_expected_fields_
Size number_expected_fields_
Definition: MMFF94Parameters.h:75
BALL::getMMFF94Index
Position getMMFF94Index(Position atom_type1, Position atom_type2)
BALL::MMFF94TorsionParameters::buffered_parameters_
TorsionsMap buffered_parameters_
Definition: MMFF94Parameters.h:403
BALL::MMFF94VDWParameters::rij_7_
std::vector< double > rij_7_
Definition: MMFF94Parameters.h:511
BALL::MMFF94AtomType::pilp
bool pilp
has pi lone pair electrons
Definition: MMFF94Parameters.h:132
BALL::MMFF94AtomType::mltb
Position mltb
Definition: MMFF94Parameters.h:137
BALL::MMFF94StretchBendParameters
Definition: MMFF94Parameters.h:310
BALL::MMFF94VDWParameters::eij_
std::vector< double > eij_
Definition: MMFF94Parameters.h:513
BALL::MMFF94StretchParameters::BondData::r0_sbmb
double r0_sbmb
Definition: MMFF94Parameters.h:201
BALL::MMFF94StretchParameters::BondData
Definition: MMFF94Parameters.h:191
BALL::PDB::Atom
char Atom[5]
Definition: PDBdefs.h:257
BALL::MMFF94AtomTypes::data_
std::vector< MMFF94AtomType > data_
Definition: MMFF94Parameters.h:177
BALL::MMFF94StretchParameters::EmpiricalBondData::r0
double r0
Definition: MMFF94Parameters.h:210
BALL::MMFF94ParametersBase::~MMFF94ParametersBase
virtual ~MMFF94ParametersBase()
Destructor.
Definition: MMFF94Parameters.h:49
BALL_INDEX_TYPE
BALL::MMFF94TorsionParameters::parameters_
TorsionsMap parameters_
parameters
Definition: MMFF94Parameters.h:402
BALL::MMFF94AtomTypeEquivalences::names_
std::vector< String > names_
Definition: MMFF94Parameters.h:111
BALL::MMFF94AtomTypes
Definition: MMFF94Parameters.h:157
BALL_SIZE_TYPE
BALL::MMFF94ParametersBase
Definition: MMFF94Parameters.h:39
BALL::MMFF94StretchBendParameters::parameters_by_row_
StretchBendMap parameters_by_row_
Definition: MMFF94Parameters.h:357
BALL::MMFF94TorsionParameters::TorsionsMap
HashMap< String, std::vector< double > > TorsionsMap
Map with the force constant and reference angle.
Definition: MMFF94Parameters.h:372
BALL::MMFF94StretchParameters::EmpiricalStretchMap
HashMap< Position, EmpiricalBondData > EmpiricalStretchMap
Definition: MMFF94Parameters.h:215
BALL::MMFF94StretchBendParameters::StretchBendMap
HashMap< Position, std::pair< double, double > > StretchBendMap
Map with the force constant and reference angle.
Definition: MMFF94Parameters.h:316
BALL::MMFF94StretchParameters::empirical_parameters_
EmpiricalStretchMap empirical_parameters_
Definition: MMFF94Parameters.h:255
BALL::MMFF94StretchParameters::getEmpiricalParameters
const EmpiricalStretchMap & getEmpiricalParameters() const
Definition: MMFF94Parameters.h:243
BALL::MMFF94VDWParameters::VDWEntry
Definition: MMFF94Parameters.h:463
BALL::MMFF94_number_atom_types
Size MMFF94_number_atom_types
hold the maximum number of MMFF94 atom types + 1 (wildcard)
BALL::MMFF94PlaneParameters::parameters_
PlaneMap parameters_
parameters
Definition: MMFF94Parameters.h:448
BALL::MMFF94StretchParameters::BondData::sbmb_exists
bool sbmb_exists
Definition: MMFF94Parameters.h:202
BALL::MMFF94VDWParameters::rij_
std::vector< double > rij_
Definition: MMFF94Parameters.h:509
BALL::MMFF94StretchParameters::buffered_parameters_
StretchMap buffered_parameters_
Definition: MMFF94Parameters.h:254
BALL::MMFF94AtomType::aspec
Position aspec
atomic number;
Definition: MMFF94Parameters.h:123
common.h
BALL::MMFF94BendParameters::parameters_
BendMap parameters_
parameters
Definition: MMFF94Parameters.h:299
BALL::MMFF94BendParameters
Definition: MMFF94Parameters.h:263
BALL::MMFF94BendParameters::buffered_parameters_
BendMap buffered_parameters_
Definition: MMFF94Parameters.h:300
BALL::MMFF94VDWParameters::parameters_
std::vector< VDWEntry > parameters_
parameters
Definition: MMFF94Parameters.h:503
BALL::MMFF94VDWParameters
Definition: MMFF94Parameters.h:458
BALL::MMFF94VDWParameters::calculated_
std::vector< bool > calculated_
Definition: MMFF94Parameters.h:515
BALL::MMFF94StretchBendParameters::parameters_
StretchBendMap parameters_
parameters
Definition: MMFF94Parameters.h:355
BALL::MMFF94AtomType
Class to store the values of an atom type from MMFFPROP.PAR.
Definition: MMFF94Parameters.h:117
BALL::MMFF94AtomType::crd
Position crd
necessary number of bonded neighbours
Definition: MMFF94Parameters.h:126
BALL_CREATE
#define BALL_CREATE(name)
Definition: create.h:62
BALL::MMFF94TorsionParameters
Definition: MMFF94Parameters.h:366
BALL::MMFF94StretchParameters::EmpiricalBondData
Definition: MMFF94Parameters.h:207
BALL::MMFF94VDWParameters::rs_
std::vector< double > rs_
Definition: MMFF94Parameters.h:506
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL::MMFF94ParametersBase::equiv_
const MMFF94AtomTypeEquivalences * equiv_
Definition: MMFF94Parameters.h:76
BALL::MMFF94AtomTypeEquivalences::exists_
std::vector< bool > exists_
Definition: MMFF94Parameters.h:112
BALL::MMFF94VDWParameters::VDWEntry::alpha_i
double alpha_i
Definition: MMFF94Parameters.h:465
BALL::MMFF94VDWParameters::VDWEntry::ai
double ai
Definition: MMFF94Parameters.h:467
BALL::MMFF94AtomTypes::~MMFF94AtomTypes
~MMFF94AtomTypes()
Definition: MMFF94Parameters.h:169
BALL::MMFF94AtomType::lin
bool lin
has linear bond
Definition: MMFF94Parameters.h:143
BALL::MMFF94StretchParameters
Definition: MMFF94Parameters.h:185
BALL::MMFF94PlaneParameters::buffered_parameters_
PlaneMap buffered_parameters_
Definition: MMFF94Parameters.h:449
BALL::MMFF94AtomTypeEquivalences
Definition: MMFF94Parameters.h:83