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