Debian Codegraph @

include/BALL/MOLMEC/MMFF94/MMFF94NonBonded.h

raw symbols SCIP
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: MMFF94NonBonded.h,v 1.1.8.4 2007/05/16 20:34:22 amoll Exp $
5 //
6
7 #ifndef BALL_MOLMEC_MMFF94_NONBONDED_H
8 #define BALL_MOLMEC_MMFF94_NONBONDED_H
9
10 #ifndef BALL_MOLMEC_COMMON_FORCEFIELDCOMPONENT_H
11 # include <BALL/MOLMEC/COMMON/forceFieldComponent.h>
12 #endif
13
14 #ifndef BALL_MOLMEC_COMMON_SUPPORT_H
15 # include <BALL/MOLMEC/COMMON/support.h>
16 #endif
17
18 #ifndef BALL_MOLMEC_MMFF94_MMFF94PARAMETERS_H
19 # include <BALL/MOLMEC/MMFF94/MMFF94Parameters.h>
20 #endif
21
22 #ifndef BALL_MOLMEC_MMFF94_PROCESSORS_H
23 # include <BALL/MOLMEC/MMFF94/MMFF94Processors.h>
24 #endif
25
26 namespace BALL
27 {
28 /** MMFF94 NonBonded (VdW + Electrostatic) component
29 \ingroup MMFF94
30 */
31 class BALL_EXPORT MMFF94NonBonded
32 : public ForceFieldComponent
33 {
34 public:
35
36 struct NonBondedPairData
37 {
38 NonBondedPairData();
39
40 double eij;
41 double rij;
42 double rij_7;
43 double vdw_energy; // for debugging
44 // for electrostatics:
45 bool is_1_4;
46 double qi;
47 double qj;
48 double es_energy; // for debugging
49 };
50
51 /// flag to enable ES
52 #define MMFF94_ES_ENABLED "enable ES"
53
54 /// flag to enable VDW
55 #define MMFF94_VDW_ENABLED "enable VDW"
56
57 BALL_CREATE(MMFF94NonBonded)
58
59 /// Default constructor.
60 MMFF94NonBonded()
61 ;
62
63 /// Constructor.
64 MMFF94NonBonded(ForceField& force_field)
65 ;
66
67 /// Copy constructor
68 MMFF94NonBonded(const MMFF94NonBonded& MMFF94_non_bonded)
69 ;
70
71 /// Destructor.
72 virtual ~MMFF94NonBonded()
73 ;
74
75 /// Assignment operator
76 const MMFF94NonBonded& operator = (const MMFF94NonBonded& anb)
77 ;
78
79 /// Clear method
80 virtual void clear()
81 ;
82
83 /// Equality operator
84 bool operator == (const MMFF94NonBonded& anb)
85 ;
86
87 /** Setup method.
88 * @throws BALL::Exception::TooManyErrors
89 */
90 virtual bool setup();
91
92 /// Calculates and returns the component's energy.
93 virtual double updateEnergy()
94 ;
95
96 /// Calculates and returns the component's forces.
97 virtual void updateForces()
98 ;
99
100 /** Update the pair list.
101 This method is called by the force field whenever
102 \link ForceField::update ForceField::update \endlink is called. It is used
103 to recalculate the nonbonded pair list.
104 @throws BALL::Exception::TooManyErrors
105 */
106 virtual void update();
107
108 /// Computes the most efficient way to calculate the non-bonded atom pairs
109 virtual MolmecSupport::PairListAlgorithmType
110 determineMethodOfAtomPairGeneration()
111 ;
112
113 ///
114 const ForceField::PairVector& getAtomPairs() const { return atom_pair_vector_;}
115
116 ///
117 const vector<NonBondedPairData>& getNonBondedData() const { return non_bonded_data_;}
118
119 ///
120 double getVDWEnergy() const;
121
122 ///
123 double getESEnergy() const;
124
125 protected:
126
127 //_ Value of the electrostatic energy
128 double es_energy_;
129
130 //_ Value of the vdw energy
131 double vdw_energy_;
132
133 private:
134
135 /*_ The most efficient algorithm to calculate the non-bonded atom pairs.
136 {\tt BRUTE\_FORCE}: brute force: all against all\\
137 {\tt HASH\_GRID}: box grid
138 */
139 ForceField::PairVector atom_pair_vector_;
140 vector<NonBondedPairData> non_bonded_data_;
141 MolmecSupport::PairListAlgorithmType algorithm_type_;
142 double cut_off_;
143 double vdw_cut_on_, vdw_cut_off_;
144 double es_cut_on_, es_cut_off_;
145 MMFF94VDWParameters vdw_parameters_;
146 // dielectric constant
147 double dc_;
148 // dielectric model exponent
149 double n_;
150 bool es_enabled_;
151 bool vdw_enabled_;
152 bool enable_es_switch_;
153 bool enable_vdw_switch_;
154 double es_d_on2_, es_d_off2_,
155 es_d_on_, es_d_off_,
156 es_ac_, es_bc_,
157 es_cc_, es_dc_, es_denom_, es_con_, es_cover3_, es_dover5_,
158 es_eadd_, es_eaddr_, es_const_, es_constr_;
159 };
160 } // namespace BALL
161
162 #endif // BALL_MOLMEC_MMFF94_MMFF94VDW_H