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
AMBER
amberTorsion.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
5
// Molecular Mechanics: Amber force field, bond stretch component
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
{
31
class
BALL_EXPORT
AmberTorsion
32
:
public
ForceFieldComponent
33
{
34
public
:
35
37
#define AMBER_TORSIONS_ENABLED "enable Torsions"
38
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
80
84
85
BALL_CREATE
(
AmberTorsion
)
86
87
89
AmberTorsion
();
90
93
AmberTorsion(
ForceField
& force_field);
94
97
AmberTorsion(const AmberTorsion& amber_stretch);
98
101
virtual ~AmberTorsion();
102
104
107
110
virtual
bool
setup()
111
throw(Exception::TooManyErrors);
112
114
117
120
virtual
double
updateEnergy();
121
124
virtual
void
updateForces();
125
127
128
private:
129
130
/*_ @name Private Attributes
131
*/
132
//_@{
133
134
/*_ array with the torsions
135
*/
136
vector<
SingleAmberTorsion
> torsion_;
137
138
CosineTorsion
torsion_parameters_;
139
140
CosineTorsion
improper_parameters_;
141
142
ParameterSection
impropers_;
143
144
//_@}
145
146
};
147
}
// namespace BALL
148
149
#endif // BALL_MOLMEC_AMBER_AMBERTORSION_H
Generated by
1.8.3.1