Debian Codegraph @

include/BALL/MOLMEC/CHARMM/charmm.h

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