Debian Codegraph @

include/BALL/MOLMEC/AMBER/amber.h

raw symbols SCIP
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // Molecular Mechanics: Amber force field class
5
6 #ifndef BALL_MOLMEC_AMBER_AMBER_H
7 #define BALL_MOLMEC_AMBER_AMBER_H
8
9 #ifndef BALL_COMMON_H
10 # include <BALL/common.h>
11 #endif
12
13 #ifndef BALL_MOLMEC_COMMON_FORCEFIELD_H
14 # include <BALL/MOLMEC/COMMON/forceField.h>
15 #endif
16
17 #ifndef BALL_KERNEL_SYSTEM_H
18 # include <BALL/KERNEL/system.h>
19 #endif
20
21 #ifndef BALL_COMMON_EXCEPTION_H
22 # include <BALL/COMMON/exception.h>
23 #endif
24
25 namespace BALL
26 {
27 /** AMBER force field class.
28
29 \ingroup AMBER
30 */
31 class BALL_EXPORT AmberFF
32 : public ForceField
33 {
34 public:
35
36 /** @name Constant Definitions
37 */
38 //@{
39
40 /** Option names
41 */
42 struct BALL_EXPORT Option
43 {
44 /** The parameter file name (@see Default::FILENAME)
45 */
46 static const char* FILENAME;
47
48 /** Nonbonded cutoff. This value is used as cutoff radius in
49 calculations of nonbonded interactions. The unit of this option
50 is \f${\AA}\f$ (@see Default::NONBONDED_CUTOFF)
51 */
52 static const char* NONBONDED_CUTOFF;
53
54 /** Van der Waals cutoff
55 */
56 static const char* VDW_CUTOFF;
57
58 /** Van der Waals cuton
59 */
60 static const char* VDW_CUTON;
61
62 /** Electrostatic cutoff
63 */
64 static const char* ELECTROSTATIC_CUTOFF;
65
66 /** Electrostatic cuton
67 */
68 static const char* ELECTROSTATIC_CUTON;
69
70 /** 1-4 vdw interaction scaling factor.
71 */
72 static const char* SCALING_VDW_1_4;
73
74 /** 1-4 electrostatic interaction scaling factor.
75 */
76 static const char* SCALING_ELECTROSTATIC_1_4;
77
78 /** use of distance dependent dielectric constant
79 */
80 static const char* DISTANCE_DEPENDENT_DIELECTRIC;
81
82 /** automatically assign charges to the system (during setup)
83 */
84 static const char* ASSIGN_CHARGES;
85
86 /** automatically assign type names to the system (during setup)
87 */
88 static const char* ASSIGN_TYPENAMES;
89
90 /** automatically assign types to the system's atoms (during setup)
91 */
92 static const char* ASSIGN_TYPES;
93
94 /** during charge assignment, overwrite even non-zero charges
95 */
96 static const char* OVERWRITE_CHARGES;
97
98 /** during charge assignment, overwrite even non-empty type names
99 */
100 static const char* OVERWRITE_TYPENAMES;
101 };
102
103 /** Default values for AMBER options.
104 */
105 struct BALL_EXPORT Default
106 {
107 /** Default filename for the parameter file (@see Option::FILENAME).
108 */
109 static const char* FILENAME;
110
111 /** Default non bonded cutoff of 20.0 \f${\AA}\f$.
112 */
113 static const float NONBONDED_CUTOFF;
114
115 /** Default van der Waals cutoff of 15.0 \f${\AA}\f$.
116 */
117 static const float VDW_CUTOFF;
118
119 /** Default van der Waals cuton of 13.0 \f${\AA}\f$.
120 */
121 static const float VDW_CUTON;
122
123 /** Default electrostatic cutoff of 15.0 \f${\AA}\f$.
124 */
125 static const float ELECTROSTATIC_CUTOFF;
126
127 /** Default electrostatic cuton of 13.0 \f${\AA}\f$.
128 */
129 static const float ELECTROSTATIC_CUTON;
130
131 /** Default electrosstatic scaling factor for 1-4 interaction. The
132 default is 2.0.
133 */
134 static const float SCALING_ELECTROSTATIC_1_4;
135
136 /** Vdw scaling factor for 1-4 interaction
137 */
138 static const float SCALING_VDW_1_4;
139
140 /** Use of distance dependent dielectric constant.
141 default: false
142 */
143 static const bool DISTANCE_DEPENDENT_DIELECTRIC;
144
145 /** automatically assign charges to the system (during setup)
146 */
147 static const bool ASSIGN_CHARGES;
148
149 /** automatically assign type names to the system (during setup)
150 */
151 static const bool ASSIGN_TYPENAMES;
152
153 /** automatically assign types to the system's atoms (during setup)
154 */
155 static const bool ASSIGN_TYPES;
156
157 /** during charge assignment, overwrite even non-zero charges
158 */
159 static const bool OVERWRITE_CHARGES;
160
161 /** during charge assignment, overwrite even non-empty type names
162 */
163 static const bool OVERWRITE_TYPENAMES;
164 };
165
166 //@}
167 /** @name Constructors and Destructor
168 */
169 //@{
170
171
172 BALL_CREATE(AmberFF)
173
174 /** Default constructor.
175 */
176 AmberFF();
177
178 /** Constructor.
179 */
180 AmberFF(System& system);
181
182 /** Constructor.
183 */
184 AmberFF(System& system, const Options& options);
185
186 /** Copy constructor
187 */
188 AmberFF(const AmberFF& force_field);
189
190 /** Destructor.
191 */
192 virtual ~AmberFF();
193
194 //@}
195 /** @name Assignment
196 */
197 //@{
198
199 /** Assignment operator
200 */
201 const AmberFF& operator = (const AmberFF& force_field)
202 ;
203
204 /** Clear method
205 */
206 virtual void clear()
207 ;
208
209 //@}
210 /** @name Setup Methods
211 */
212 //@{
213
214 /** Force field specific setup
215 * @throws BALL::Exception::TooManyErrors
216 */
217 virtual bool specificSetup();
218
219 //@}
220 /** @name Accessors specific to the AMBER force field
221 */
222 //@{
223
224 /** Return the bond stretch contribution to the total energy
225 */
226 double getStretchEnergy() const;
227
228 /** Return the angle bend contribution to the total energy
229 */
230 double getBendEnergy() const;
231
232 /** Return the torsion contribution to the total energy.
233 This energy comprises proper and improper torsions.
234 */
235 double getTorsionEnergy() const;
236
237 /** Return the nonbonded contribution to the total energy.
238 This energy comprises Van der Waals energy, hydrogen bond energy, and elesctrostatic energy.
239 */
240 double getNonbondedEnergy() const;
241
242 /** Return the electrostatic contribution to the total energy.
243 */
244 double getESEnergy() const;
245
246 /** Return the Van der Waals and hydrogen bond contribution to the total energy.
247 */
248 double getVdWEnergy() const;
249
250 /** Return true, if the parameters have already been initialized
251 */
252 bool hasInitializedParameters() const;
253
254 /** Return the recommended number of iterations between updates.
255 This method return 20 as a default value.
256 */
257 Size getUpdateFrequency() const;
258
259 /// Get the current results in String form
260 virtual String getResults() const
261 ;
262
263 //@}
264
265 protected:
266
267 String filename_;
268
269 bool parameters_initialized_;
270
271 };
272 } // namespace BALL
273
274 #endif // BALL_MOLMEC_AMBER_H