BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  {
64  double kb;
65  double r0;
66  double delta_r;
67  bool sbmb;
68  bool emperical;
70  };
71 
73  #define MMFF94_BENDS_ENABLED "enable Bends"
74 
76  #define MMFF94_STRETCHES_ENABLED "enable Stretches"
77 
79  #define MMFF94_STRETCHBENDS_ENABLED "enable StrechBends"
80 
81  BALL_CREATE(MMFF94StretchBend)
82 
83 
85  MMFF94StretchBend();
86 
89  MMFF94StretchBend(ForceField& force_field);
90 
93  MMFF94StretchBend(const MMFF94StretchBend& to_copy);
94 
97  virtual ~MMFF94StretchBend();
98 
101  virtual bool setup()
102  throw(Exception::TooManyErrors);
103 
105  virtual double updateEnergy();
106 
108  virtual double updateBendEnergy();
109 
111  virtual double updateStretchEnergy();
112 
114  virtual double updateStretchBendEnergy();
115 
117  double getStretchEnergy() const;
118 
120  double getBendEnergy() const;
121 
123  double getStretchBendEnergy() const;
124 
126  virtual void updateForces();
127 
129  virtual void updateBendForces();
130 
132  virtual void updateStretchForces();
133 
135  virtual void updateStretchBendForces();
136 
138  const vector<Bend>& getBends() const { return bends_;}
139 
141  const vector<Stretch>& getStretches() const { return stretches_;}
142 
144  const vector<StretchBend>& getStretchBends() const { return stretch_bends_;}
145 
147  Index calculateSBTIJK(Position angle_type,
148  bool bond_type1,
149  bool bond_type2);
150 
152  Position getBendType(const Bond& bond1, const Bond& bond2,
153  Atom& atom1, Atom& atom2, Atom& atom3) const;
154 
156  double calculateBendEmpiricalReferenceAngle(Atom& atom1, Atom& atom2, Atom& atom3) const;
157 
159  double calculateBendEmpiricalForceConstant(Atom& atom1, Atom& atom2, Atom& atom3, double angle_0) const;
160 
162  double calculateStretchR0(const Bond& bond);
163 
165  double calculateStretchConstant(const Bond& bond, double r0);
166 
167  private:
168 
169  inline void AddDV3_(Vector3& f3, const TVector3<double> d3);
170  void calculateDeltas_();
171  bool setupBends_();
172  bool setupStretches_();
173  bool setupStretchBends_();
174 
175  void errorOccured_(const String& string,
176  const Atom& a1, const Atom& a2, const Atom& a3);
177 
178  vector<Bend> bends_;
179  vector<Stretch> stretches_;
180  vector<StretchBend> stretch_bends_;
181 
182  const MMFF94StretchParameters* stretch_parameters_;
183  MMFF94BendParameters bend_parameters_;
184  MMFF94StretchBendParameters sb_parameters_;
185 
186  static double bend_z_[];
187  static double bend_c_[];
188  static String bend_elements_[];
189 
190  double stretch_energy_;
191  double bend_energy_;
192  double stretch_bend_energy_;
193 
194  MMFF94* mmff94_;
195  bool stretch_enabled_, bend_enabled_, stretchbend_enabled_;
196  };
197 } // namespace BALL
198 
199 #endif // BALL_MOLMEC_MMFF94_MMFF94STRETCHBEND_H
#define BALL_CREATE(name)
Definition: create.h:62
const vector< StretchBend > & getStretchBends() const
const vector< Stretch > & getStretches() const
#define BALL_EXPORT
Definition: COMMON/global.h:50