BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MMFF94Torsion.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: MMFF94Torsion.h,v 1.1.8.1 2007/03/25 21:25:19 oliver Exp $
5 //
6 
7 #ifndef BALL_MOLMEC_MMFF94_MMFF94TORSION_H
8 #define BALL_MOLMEC_MMFF94_MMFF94TORSION_H
9 
10 #ifndef BALL_MOLMEC_COMMON_FORCEFIELDCOMPONENT_H
12 #endif
13 
14 #ifndef BALL_MOLMEC_COMMON_FORCEFIELD_H
16 #endif
17 
18 #ifndef BALL_MOLMEC_MMFF94_MMFF94PARAMETERS_H
20 #endif
21 
22 namespace BALL
23 {
28  : public ForceFieldComponent
29  {
30  public:
31 
34  {
35  Torsion();
36 
42  double v1, v2, v3;
43  // for debugging:
44  double energy;
45  double angle;
46  bool heuristic;
47  };
48 
52 
54  #define MMFF94_TORSIONS_ENABLED "enable Torsions"
55 
56 
60 
61  BALL_CREATE(MMFF94Torsion)
62 
63 
65  MMFF94Torsion();
66 
69  MMFF94Torsion(ForceField& force_field);
70 
73  MMFF94Torsion(const MMFF94Torsion& MMFF94_stretch);
74 
77  virtual ~MMFF94Torsion();
78 
80 
83 
86  virtual bool setup()
87  throw(Exception::TooManyErrors);
88 
90 
93 
96  virtual double updateEnergy();
97 
100  virtual void updateForces();
101 
103  Position getTorsionType(const vector<Atom*>& atoms) const;
104 
106  const vector<Torsion>& getTorsions() const { return torsions_;}
107 
109 
110  protected:
111 
112  // Add a double precision TVector3 to a single precision Vector3
113  inline void AddDV3_(Vector3& f3, const TVector3<double> d3);
114 
115  double getU_(Position e);
116  double getV_(Position e);
117  bool calculateHeuristic_(const Atom& aj, const Atom& ak, double& v1, double& v2, double& v3);
118 
119  vector<Torsion> torsions_;
121  };
122 } // namespace BALL
123 
124 #endif // BALL_MOLMEC_MMFF94_MMFF94TORSION_H
#define BALL_CREATE(name)
Definition: create.h:62
BALL_EXPORT AtomList atoms(const AtomContainer &fragment, const String &expression=String())
char Atom[5]
Definition: PDBdefs.h:257
vector< Torsion > torsions_
MMFF94TorsionParameters parameters_
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL_SIZE_TYPE Position