BALL
1.4.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
MOLMEC
CHARMM
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
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
{
36
class
BALL_EXPORT
CharmmTorsion
37
:
public
ForceFieldComponent
38
{
39
public
:
40
42
#define CHARMM_TORSIONS_ENABLED "enable Torsions"
43
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
// convert phase from degrees to radiant
81
phase = (
float
)(
BALL::Constants::PI
/ 180.0) * t.
values
.
phase
;
82
}
83
};
84
86
89
90
BALL_CREATE
(
CharmmTorsion
)
91
92
94
CharmmTorsion
();
95
98
CharmmTorsion(
ForceField
& force_field);
99
102
CharmmTorsion(const CharmmTorsion& charmm_stretch);
103
106
virtual ~CharmmTorsion();
107
109
112
115
virtual
bool
setup()
116
throw(Exception::TooManyErrors);
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
Generated by
1.8.3.1