File: pair6_12InteractionEnergyProcessor.h

package info (click to toggle)
ball 1.5.0%2Bgit20180813.37fc53c-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 239,924 kB
  • sloc: cpp: 326,149; ansic: 4,208; python: 2,303; yacc: 1,778; lex: 1,099; xml: 958; sh: 322; javascript: 164; makefile: 88
file content (302 lines) | stat: -rw-r--r-- 7,560 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: pair6_12InteractionEnergyProcessor.h,v 1.22 2005/12/23 17:01:59 amoll Exp $
//

#ifndef BALL_SOLVATION_PAIR6_12INTERACTIONENERGYPROCESSOR_H
#define BALL_SOLVATION_PAIR6_12INTERACTIONENERGYPROCESSOR_H

#ifndef BALL_COMMON_H
# include <BALL/common.h>
#endif

#ifndef BALL_DATATYPE_OPTIONS_H
# include <BALL/DATATYPE/options.h>
#endif

#ifndef BALL_MATHS_SURFACE_H
# include <BALL/MATHS/surface.h>
#endif

#ifndef BALL_ENERGY_ENERGYPROCESSOR_H
# include <BALL/ENERGY/energyProcessor.h>
#endif

#ifndef BALL_STRUCTURE_RDFPARAMETER_H
# include <BALL/STRUCTURE/RDFParameter.h>
#endif

#ifndef BALL_SOLVATION_PAIR6_12RDFINTEGRATOR_H
# include <BALL/SOLVATION/pair6_12RDFIntegrator.h>
#endif

#ifndef BALL_SOLVATION_SOLVENTDESCRIPTOR_H
# include <BALL/SOLVATION/solventDescriptor.h>
#endif

namespace BALL
{
	/** Processor for the computation of the van-der-Waals interaction energy
			of a molecule with its surrounding.
			This processor uses a 6_12 pair potential for the calculation of
			dispersion and repulsion energies.  \par
			Energies are computed in units of kJ/mol.  \par
\ingroup Solvation
	 */
	
	class BALL_EXPORT Pair6_12InteractionEnergyProcessor
		:	public EnergyProcessor
	{

		public:

		// ?????: Doku.
		enum SurfaceType
		{
			SURFACE__UNKNOWN = 0,
			SURFACE__SAS = 1,
			SURFACE__SES = 2,
			SURFACE__EXTERNAL = 3
		};

		/** Symbolic names for option keys.
				This struct contains a symbolic name for each recognized key in
				Pair6_12InteractionEnergyProcessor::options.
		*/
		struct BALL_EXPORT Option
		{
			
			/** The verbosity level.
					Use integer values with this option.
					@see Default::VERBOSITY
					@param verbosity integer
			 */
			static const char* VERBOSITY;

			/** RDF option.
					This option states whether the RDF should be considered during the
					integrtion or not. Use bool values with this option.
					@see Default::USE_RDF
					@param verbosity integer
			 */
			static const char* USE_RDF;

			/** RDF file option.
					This options sets the name of the file containing the RDF
					information. Use char* values with this option.
					@see Default::RDF_FILENAME
					@param rdf_file_name char*
			 */
			static const char* RDF_FILENAME;

			/** Solvent description file option.
					This option sets the name of the file containig the solvent
					description. Use char* values with this option.
					@see Default::SOLVENT_FILENAME;
					@param solvent_file_name char*
			 */
			static const char* SOLVENT_FILENAME;

			/** Lennard Jones parameter file option.
					This option sets the name of the file containig the Lennard-Jones
					parameters. Use char* values with this option.
					@see Default::LJ_FILENAME;
					@param lennard_jones_file_name char*
			 */
			static const char* LJ_FILENAME;

			/** The number density of the solvent.
					This option defines the number density of the surrounding solvent. 
					Use	float values of unit $ A^{-3} $ with this option.
					@see Default::SOLVENT_NUMBER_DENSITY
					@param solvent_number_density float
			 */
			static const char* SOLVENT_NUMBER_DENSITY;

			/** The type of surface to be used.
					@see Default::SURFACE_TYPE
					@param surface_type int the type of the surface
			 */
			static const char* SURFACE_TYPE;

			/** The name of the file containing a surface definition.
					@see Default::SURFACE_FILENAME
					@param surface_filename char*
			 */
			static const char* SURFACE_FILENAME;

		};

		/** Default values for interaction energy calculations.
				These values represent the default settings for the calculations of the
				interaction energy.
		 */
		struct BALL_EXPORT Default
		{
			/** Default verbosity level.
					@see Option::VERBOSITY
			 */
			static const Size VERBOSITY;

			/** Default RDF setting.
					We use RDF information for the calculation of the interaction	energy by default.
					@see Option::USE_RDF
			 */
			static const bool USE_RDF;
			static const char* RDF_FILENAME;
			static const char* SOLVENT_FILENAME;
			static const char* LJ_FILENAME;

			/** Default number density.
					This default value is the number density of water at 300 K and
					standard pressure (3.33253e-2 $ A^{-3}$).
					@see Option::SOLVENT_NUMBER_DENSITY;
			 */
			static const float SOLVENT_NUMBER_DENSITY;

			/** 
					@see Option::SURFACE_TYPE
			 */
			static const Size SURFACE_TYPE;

			/** 
					@see Option::SURFACE_FILENAME
			 */
			static const char* SURFACE_FILENAME;

		};

		/** @name Constructors and destructors 
		*/
		//@{

		/** Default constructor 
		*/
		Pair6_12InteractionEnergyProcessor() 
			;

		/** Copy constructor 
				@param proc the processor to copy
		*/
		Pair6_12InteractionEnergyProcessor
			(const Pair6_12InteractionEnergyProcessor& proc) 
			;

		/** Detailed constructor
				@param solvent a description of the surrounding solvent (@see	SolventDescriptor)
				@param rdf_param the parameters for the radial distribution	function (@see RDFParameter)
				@param rdf_integrator the integrator needed for structural 
							 integration (@see Pair6_12RDFIntegrator)
		*/
		Pair6_12InteractionEnergyProcessor(const SolventDescriptor& solvent, 
				const RDFParameter& rdf_param,
				const Pair6_12RDFIntegrator& rdf_integrator) 
			;

		/** Destructor 
		*/
		virtual ~Pair6_12InteractionEnergyProcessor() ;

		//@}
		/** @name Accessors 
		*/
		//@{

		/** Set the solvent descriptor.
				@param solvent the solvent descriptor to be set
		*/
		void setSolventDescriptor(const SolventDescriptor& solvent) ;

		/** Get the solvent descriptor.
				@return the current solvent descriptor of this instance
		*/
		const SolventDescriptor& getSolventDescriptor() const ;

		/** Set the parameters for the radial distribution function 
				@param rdf_parameter the RDF parameter to be set
		*/
		void setRDFParameters(const RDFParameter& rdf_parameter) ;

		/** Get the parameters for the radial distribution function 
				@return a const reference of the current RDF parameter
		*/
		const RDFParameter& getRDFParameter() const ;

		/** Set the integrator of this processor
				@param integrator the integrator to be set
		*/
		void setRDFIntegrator(const Pair6_12RDFIntegrator& integrator) ;

		/** Get the integrator of this processor
				@return the current integrator 
		*/
		const Pair6_12RDFIntegrator& getRDFIntegrator() const ;

		//@}
		/** @name Assignment 
		*/
		//@{

		/** Assignment operator 
		*/
		const Pair6_12InteractionEnergyProcessor& operator =
			(const Pair6_12InteractionEnergyProcessor& proc) ;

		/** Clear function 
		*/
		virtual void clear() ;
		
		//@}
		/** @name Processor functions 
		*/
		//@{

		/// @throws BALL::Exception::DivisionByZero
		virtual bool finish();

		//@}
		/** @name Options 
		*/
		//@{

		/** Options for the calculation of the caviation free energy 
		*/
		Options options;

		//@}
		/** @name Predicates 
		*/
		//@{

		/** Equality operator 
		*/
		bool operator == (const Pair6_12InteractionEnergyProcessor& proc) 
			const ;

		//@}

		protected:

		/*_ solvent description, to be read from an INIFile 
		*/
		SolventDescriptor solvent_;

		/*_ the rdf description, also from an INIFile 
		*/
		RDFParameter rdf_parameter_;

		/*_ This is the tool to perform integrations with embedded RDf information 
		*/
		Pair6_12RDFIntegrator rdf_integrator_;


		private:

		void getExternalSurface_(std::vector<std::pair<Vector3, Surface> >& surface_map, 
				const char* surface_file) ;
	};
   
} // namespace BALL

#endif // BALL__PAIR6_12INTERACTIONENERGYPROCESSOR_H