BALL  1.5.0
charmmTorsion.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 // Molecular Mechanics: CHARMM force field, proper torsion component
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
16 #endif
17 
18 #ifndef BALL_MOLMEC_PARAMETER_RESIDUETORSIONS_H
20 #endif
21 
22 #ifndef BALL_MOLMEC_COMMON_FORCEFIELDCOMPONENT_H
24 #endif
25 
26 #ifndef BALL_MOLMEC_COMMON_FORCEFIELD_H
28 #endif
29 
30 namespace BALL
31 {
37  : public ForceFieldComponent
38  {
39  public:
40 
42  #define CHARMM_TORSIONS_ENABLED "enable Torsions"
43 
47 
49  {
54 
55  float V;
56  unsigned char f;
57  float phase;
58 
60  : atom1(0),
61  atom2(0),
62  atom3(0),
63  atom4(0),
64  V(0),
65  f(0),
66  phase(0)
67  {
68  }
69 
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  // convert phase from degrees to radiant
81  phase = (float)(BALL::Constants::PI / 180.0) * t.values.phase;
82  }
83  };
84 
86 
89 
91 
92 
94  CharmmTorsion();
95 
98  CharmmTorsion(ForceField& force_field);
99 
102  CharmmTorsion(const CharmmTorsion& charmm_stretch);
103 
106  virtual ~CharmmTorsion();
107 
109 
112 
116  virtual bool setup();
117 
119 
122 
125  virtual double updateEnergy();
126 
129  virtual void updateForces();
130 
132 
133  private:
134 
135  /*_ @name Private Attributes
136  */
137  //_@{
138 
139  /*_ Vector containing the parameters for each torsion.
140  */
141  vector<SingleCharmmTorsion> torsion_;
142 
143  /*_ Contents of the [Torsions] section of the parameter file.
144  */
145  CosineTorsion torsion_parameters_;
146 
147  /*_ Contents of the [ResidueTorsions] section of the parameter file.
148  */
149  ResidueTorsions residue_torsions_;
150 
151  /*_ true, if the torsions are read from the ResidueTorsions section.
152  */
153  bool use_residue_torsion_list_;
154 
155  //_@}
156 
157  };
158 } // namespace BALL
159 
160 #endif // BALL_MOLMEC_CHARMM_CHARMMTORSION_H
BALL::CharmmTorsion
Definition: charmmTorsion.h:36
BALL::CosineTorsion::SingleValues::n
float n
Definition: cosineTorsion.h:40
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL::CharmmTorsion::SingleCharmmTorsion::f
unsigned char f
Definition: charmmTorsion.h:56
BALL::Constants::PI
const BALL_EXTERN_VARIABLE double PI
PI.
Definition: constants.h:35
BALL::CosineTorsion::SingleData::atom3
Atom * atom3
Definition: cosineTorsion.h:150
residueTorsions.h
forceField.h
BALL::CosineTorsion::SingleValues::f
float f
Definition: cosineTorsion.h:39
BALL::CosineTorsion::SingleData::atom2
Atom * atom2
Definition: cosineTorsion.h:149
BALL::ForceField
Definition: forceField.h:85
BALL::CharmmTorsion::SingleCharmmTorsion::atom3
Atom * atom3
Definition: charmmTorsion.h:52
BALL::CharmmTorsion::SingleCharmmTorsion::atom4
Atom * atom4
Definition: charmmTorsion.h:53
BALL::Atom
Definition: atom.h:87
BALL
Definition: constants.h:12
BALL::CosineTorsion::SingleValues::phase
float phase
Definition: cosineTorsion.h:37
BALL::CosineTorsion::SingleValues::V
float V
Definition: cosineTorsion.h:38
BALL::CharmmTorsion::SingleCharmmTorsion::SingleCharmmTorsion
SingleCharmmTorsion(CosineTorsion::SingleData &t)
Definition: charmmTorsion.h:70
BALL::CharmmTorsion::SingleCharmmTorsion::atom1
Atom * atom1
Definition: charmmTorsion.h:50
BALL::CharmmTorsion::SingleCharmmTorsion::SingleCharmmTorsion
SingleCharmmTorsion()
Definition: charmmTorsion.h:59
BALL::CosineTorsion::SingleData::values
SingleValues values
Definition: cosineTorsion.h:153
BALL::CosineTorsion::SingleData::atom1
Atom * atom1
Definition: cosineTorsion.h:148
BALL::CharmmTorsion::SingleCharmmTorsion::phase
float phase
Definition: charmmTorsion.h:57
BALL::CosineTorsion::SingleData::atom4
Atom * atom4
Definition: cosineTorsion.h:151
BALL::ForceFieldComponent
Definition: forceFieldComponent.h:34
common.h
BALL::CharmmTorsion::SingleCharmmTorsion
Definition: charmmTorsion.h:48
BALL::ResidueTorsions
Definition: residueTorsions.h:32
BALL::CharmmTorsion::SingleCharmmTorsion::V
float V
Definition: charmmTorsion.h:55
BALL::CosineTorsion
Definition: cosineTorsion.h:25
cosineTorsion.h
forceFieldComponent.h
BALL_CREATE
#define BALL_CREATE(name)
Definition: create.h:62
BALL::CharmmTorsion::SingleCharmmTorsion::atom2
Atom * atom2
Definition: charmmTorsion.h:51
BALL::CosineTorsion::SingleData
Definition: cosineTorsion.h:146