| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
#ifndef BALL_MOLMEC_AMBER_AMBERTORSION_H |
| 8 |
#define BALL_MOLMEC_AMBER_AMBERTORSION_H |
| 9 |
|
| 10 |
#ifndef BALL_COMMON_H |
| 11 |
# include <BALL/common.h> |
| 12 |
#endif |
| 13 |
|
| 14 |
#ifndef BALL_MOLMEC_PARAMETER_COSINETORSION_H |
| 15 |
# include <BALL/MOLMEC/PARAMETER/cosineTorsion.h> |
| 16 |
#endif |
| 17 |
|
| 18 |
#ifndef BALL_MOLMEC_COMMON_FORCEFIELDCOMPONENT_H |
| 19 |
# include <BALL/MOLMEC/COMMON/forceFieldComponent.h> |
| 20 |
#endif |
| 21 |
|
| 22 |
#ifndef BALL_MOLMEC_COMMON_FORCEFIELD_H |
| 23 |
# include <BALL/MOLMEC/COMMON/forceField.h> |
| 24 |
#endif |
| 25 |
|
| 26 |
namespace BALL |
| 27 |
{ |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
class BALL_EXPORT AmberTorsion |
| 32 |
: public ForceFieldComponent |
| 33 |
{ |
| 34 |
public: |
| 35 |
|
| 36 |
|
| 37 |
#define AMBER_TORSIONS_ENABLED "enable Torsions" |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
struct SingleAmberTorsion |
| 44 |
{ |
| 45 |
Atom* atom1; |
| 46 |
Atom* atom2; |
| 47 |
Atom* atom3; |
| 48 |
Atom* atom4; |
| 49 |
|
| 50 |
float V; |
| 51 |
unsigned char f; |
| 52 |
float phase; |
| 53 |
|
| 54 |
SingleAmberTorsion() |
| 55 |
: atom1(0), |
| 56 |
atom2(0), |
| 57 |
atom3(0), |
| 58 |
atom4(0), |
| 59 |
V(0), |
| 60 |
f(0), |
| 61 |
phase(0) |
| 62 |
{ |
| 63 |
} |
| 64 |
|
| 65 |
|
| 66 |
SingleAmberTorsion(CosineTorsion::SingleData& t) |
| 67 |
{ |
| 68 |
atom1 = t.atom1; |
| 69 |
atom2 = t.atom2; |
| 70 |
atom3 = t.atom3; |
| 71 |
atom4 = t.atom4; |
| 72 |
|
| 73 |
V = t.values.V / t.values.n; |
| 74 |
f = (unsigned char)t.values.f; |
| 75 |
phase = ((2.0 * BALL::Constants::PI)/360.0) * t.values.phase; |
| 76 |
} |
| 77 |
}; |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
BALL_CREATE(AmberTorsion) |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
AmberTorsion(); |
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
AmberTorsion(ForceField& force_field); |
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
AmberTorsion(const AmberTorsion& amber_stretch); |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
virtual ~AmberTorsion(); |
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
virtual bool setup(); |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
virtual double updateEnergy(); |
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
virtual void updateForces(); |
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
private: |
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
vector<SingleAmberTorsion> torsion_; |
| 137 |
|
| 138 |
CosineTorsion torsion_parameters_; |
| 139 |
|
| 140 |
CosineTorsion improper_parameters_; |
| 141 |
|
| 142 |
ParameterSection impropers_; |
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
}; |
| 147 |
} |
| 148 |
|
| 149 |
#endif |