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
#define BALL_CREATE(name)
Definition: create.h:62
Definition: constants.h:13
BALL_INDEX_TYPE Index
Position getBendType(const Bond &bond1, const Bond &bond2, Atom &atom1, Atom &atom2, Atom &atom3) const
double calculateBendEmpiricalReferenceAngle(Atom &atom1, Atom &atom2, Atom &atom3) const
Bend emperical reference angle.
double calculateStretchConstant(const Bond &bond, double r0)
Index calculateSBTIJK(Position angle_type, bool bond_type1, bool bond_type2)
const vector< StretchBend > & getStretchBends() const
const vector< Stretch > & getStretches() const
double calculateBendEmpiricalForceConstant(Atom &atom1, Atom &atom2, Atom &atom3, double angle_0) const
Bend emperical force constant.
double calculateStretchR0(const Bond &bond)
Calculate the radius value per Schomaker-Stevenson Rule.
#define BALL_EXPORT
Definition: COMMON/global.h:50