BALL  1.5.0
MMFF94StretchBend.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: MMFF94StretchBend.h,v 1.1.8.1 2007/03/25 21:25:18 oliver Exp $
5 //
6 
7 #ifndef BALL_MOLMEC_MMFF94_MMFF94STRETCHBEND_H
8 #define BALL_MOLMEC_MMFF94_MMFF94STRETCHBEND_H
9 
10 #ifndef BALL_MOLMEC_COMMON_FORCEFIELDCOMPONENT_H
12 #endif
13 
14 #ifndef BALL_MOLMEC_MMFF94_MMFF94PARAMETERS_H
16 #endif
17 
18 namespace BALL
19 {
20  class MMFF94;
21 
26  : public ForceFieldComponent
27  {
28  public:
29 
31  {
32  double kba_ijk;
33  double kba_kji;
34  double energy; // debug
36  Index stretch_i_j, stretch_j_k;
38  };
39 
42  {
43  Bend();
44 
45  double theta0;
46  double delta_theta;
47  double theta;
48  double ka;
52  bool is_linear;
54  double energy; // debug
55  bool emperical; // debug
57  };
58 
61  {
63  : atom1(NULL),
64  atom2(NULL),
65  kb(0.0),
66  r0(0.0),
67  delta_r(0.0),
68  sbmb(false),
69  emperical(false)
70  {
71  }
72 
75  double kb;
76  double r0;
77  double delta_r;
78  bool sbmb;
79  bool emperical;
81  };
82 
84  #define MMFF94_BENDS_ENABLED "enable Bends"
85 
87  #define MMFF94_STRETCHES_ENABLED "enable Stretches"
88 
90  #define MMFF94_STRETCHBENDS_ENABLED "enable StrechBends"
91 
92  BALL_CREATE(MMFF94StretchBend)
93 
94 
97 
101 
105 
108  virtual ~MMFF94StretchBend();
109 
113  virtual bool setup();
114 
116  virtual double updateEnergy();
117 
119  virtual double updateBendEnergy();
120 
122  virtual double updateStretchEnergy();
123 
125  virtual double updateStretchBendEnergy();
126 
128  double getStretchEnergy() const;
129 
131  double getBendEnergy() const;
132 
134  double getStretchBendEnergy() const;
135 
137  virtual void updateForces();
138 
140  virtual void updateBendForces();
141 
143  virtual void updateStretchForces();
144 
146  virtual void updateStretchBendForces();
147 
149  const vector<Bend>& getBends() const { return bends_;}
150 
152  const vector<Stretch>& getStretches() const { return stretches_;}
153 
155  const vector<StretchBend>& getStretchBends() const { return stretch_bends_;}
156 
159  bool bond_type1,
160  bool bond_type2);
161 
163  Position getBendType(const Bond& bond1, const Bond& bond2,
164  Atom& atom1, Atom& atom2, Atom& atom3) const;
165 
167  double calculateBendEmpiricalReferenceAngle(Atom& atom1, Atom& atom2, Atom& atom3) const;
168 
170  double calculateBendEmpiricalForceConstant(Atom& atom1, Atom& atom2, Atom& atom3, double angle_0) const;
171 
173  double calculateStretchR0(const Bond& bond);
174 
176  double calculateStretchConstant(const Bond& bond, double r0);
177 
178  private:
179 
180  inline void AddDV3_(Vector3& f3, const TVector3<double> d3);
181  void calculateDeltas_();
182  bool setupBends_();
183  bool setupStretches_();
184  bool setupStretchBends_();
185 
186  void errorOccurred_(const String& string,
187  const Atom& a1, const Atom& a2, const Atom& a3);
188 
189  vector<Bend> bends_;
190  vector<Stretch> stretches_;
191  vector<StretchBend> stretch_bends_;
192 
193  const MMFF94StretchParameters* stretch_parameters_;
194  MMFF94BendParameters bend_parameters_;
195  MMFF94StretchBendParameters sb_parameters_;
196 
197  static double bend_z_[];
198  static double bend_c_[];
199  static String bend_elements_[];
200 
201  double stretch_energy_;
202  double bend_energy_;
203  double stretch_bend_energy_;
204 
205  MMFF94* mmff94_;
206  bool stretch_enabled_, bend_enabled_, stretchbend_enabled_;
207  };
208 } // namespace BALL
209 
210 #endif // BALL_MOLMEC_MMFF94_MMFF94STRETCHBEND_H
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL::MMFF94StretchBend::Stretch::atom2
Atom * atom2
Definition: MMFF94StretchBend.h:74
BALL::MMFF94StretchBend::calculateBendEmpiricalForceConstant
double calculateBendEmpiricalForceConstant(Atom &atom1, Atom &atom2, Atom &atom3, double angle_0) const
Bend emperical force constant.
BALL::MMFF94StretchBend::Bend::atom1
Atom * atom1
Definition: MMFF94StretchBend.h:49
BALL::MMFF94StretchBend::calculateStretchConstant
double calculateStretchConstant(const Bond &bond, double r0)
BALL::Bond
Definition: bond.h:57
MMFF94Parameters.h
BALL::MMFF94StretchBend::StretchBend::energy
double energy
Definition: MMFF94StretchBend.h:34
BALL::MMFF94StretchBend::Stretch::n
Vector3 n
Definition: MMFF94StretchBend.h:80
BALL::Atom
Definition: atom.h:90
BALL::MMFF94StretchBend::Bend::energy
double energy
Definition: MMFF94StretchBend.h:54
BALL::MMFF94StretchBend::StretchBend::kba_kji
double kba_kji
Definition: MMFF94StretchBend.h:33
BALL::MMFF94StretchBend
Definition: MMFF94StretchBend.h:27
BALL::MMFF94StretchBend::Bend::delta_theta
double delta_theta
Definition: MMFF94StretchBend.h:46
BALL::MMFF94StretchBend::Bend::n2
TVector3< double > n2
Definition: MMFF94StretchBend.h:56
BALL::MMFF94StretchBend::StretchBend::stretch_j_k
Index stretch_j_k
Definition: MMFF94StretchBend.h:36
BALL::String
Definition: string.h:57
BALL::MMFF94StretchBend::Stretch::kb
double kb
Definition: MMFF94StretchBend.h:75
BALL::MMFF94StretchBend::Bend
see MMFFANG.PAR
Definition: MMFF94StretchBend.h:42
BALL
Definition: constants.h:13
BALL::MMFF94StretchBend::Bend::is_linear
bool is_linear
Definition: MMFF94StretchBend.h:52
BALL::MMFF94StretchBend::Bend::atom3
Atom * atom3
Definition: MMFF94StretchBend.h:51
BALL::MMFF94StretchBendParameters
Definition: MMFF94Parameters.h:312
BALL::MMFF94StretchBend::getStretchBends
const vector< StretchBend > & getStretchBends() const
Definition: MMFF94StretchBend.h:155
BALL::MMFF94StretchBend::Stretch::Stretch
Stretch()
Definition: MMFF94StretchBend.h:62
BALL::MMFF94StretchBend::calculateBendEmpiricalReferenceAngle
double calculateBendEmpiricalReferenceAngle(Atom &atom1, Atom &atom2, Atom &atom3) const
Bend emperical reference angle.
BALL_INDEX_TYPE
BALL_SIZE_TYPE
BALL::TVector3< double >
BALL::MMFF94StretchBend::Bend::emperical
bool emperical
Definition: MMFF94StretchBend.h:55
BALL::MMFF94StretchBend::StretchBend::kba_ijk
double kba_ijk
Definition: MMFF94StretchBend.h:32
BALL::MMFF94StretchBend::getBendType
Position getBendType(const Bond &bond1, const Bond &bond2, Atom &atom1, Atom &atom2, Atom &atom3) const
BALL::MMFF94StretchBend::Bend::ka
double ka
Definition: MMFF94StretchBend.h:48
BALL::ForceFieldComponent
Definition: forceFieldComponent.h:35
BALL::MMFF94StretchBend::calculateSBTIJK
Index calculateSBTIJK(Position angle_type, bool bond_type1, bool bond_type2)
BALL::MMFF94BendParameters
Definition: MMFF94Parameters.h:265
BALL::MMFF94StretchBend::Stretch::emperical
bool emperical
Definition: MMFF94StretchBend.h:79
BALL::MMFF94StretchBend::Stretch::r0
double r0
Definition: MMFF94StretchBend.h:76
BALL::MMFF94StretchBend::StretchBend::sbtijk
Index sbtijk
Definition: MMFF94StretchBend.h:35
BALL::MMFF94StretchBend::Bend::atom2
Atom * atom2
Definition: MMFF94StretchBend.h:50
BALL::MMFF94StretchBend::Stretch::sbmb
bool sbmb
Definition: MMFF94StretchBend.h:78
forceFieldComponent.h
BALL::MMFF94StretchBend::Bend::Bend
Bend()
BALL::MMFF94StretchBend::Bend::theta
double theta
Definition: MMFF94StretchBend.h:47
BALL_CREATE
#define BALL_CREATE(name)
Definition: create.h:62
BALL::MMFF94StretchBend::Stretch::delta_r
double delta_r
Definition: MMFF94StretchBend.h:77
BALL::ForceField
Definition: forceField.h:86
BALL::MMFF94StretchBend::calculateStretchR0
double calculateStretchR0(const Bond &bond)
Calculate the radius value per Schomaker-Stevenson Rule.
BALL::MMFF94StretchBend::Stretch
Definition: MMFF94StretchBend.h:61
BALL::MMFF94StretchBend::StretchBend::bend_index
Index bend_index
Definition: MMFF94StretchBend.h:37
BALL::MMFF94StretchBend::Bend::theta0
double theta0
Definition: MMFF94StretchBend.h:45
BALL::MMFF94StretchParameters
Definition: MMFF94Parameters.h:187
BALL::MMFF94StretchBend::Bend::ATIJK
Position ATIJK
Definition: MMFF94StretchBend.h:53
BALL::MMFF94StretchBend::StretchBend
Definition: MMFF94StretchBend.h:31
BALL::MMFF94
Definition: MMFF94.h:51
BALL::MMFF94StretchBend::Stretch::atom1
Atom * atom1
Definition: MMFF94StretchBend.h:73
BALL::MMFF94StretchBend::getStretches
const vector< Stretch > & getStretches() const
Definition: MMFF94StretchBend.h:152