BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
amberNonBonded.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, non-bonded component
6 
7 #ifndef BALL_MOLMEC_AMBER_NONBONDED_H
8 #define BALL_MOLMEC_AMBER_NONBONDED_H
9 
10 #ifndef BALL_COMMON_H
11 # include <BALL/common.h>
12 #endif
13 
14 #ifndef BALL_MOLMEC_PARAMETER_LENNARDJONES_H
16 #endif
17 
18 #ifndef BALL_MOLMEC_PARAMETER_POTENTIAL1210_H
20 #endif
21 
22 #ifndef BALL_MOLMEC_COMMON_FORCEFIELDCOMPONENT_H
24 #endif
25 
26 #ifndef BALL_MOLMEC_COMMON_SUPPORT_H
28 #endif
29 
30 namespace BALL
31 {
37  : public ForceFieldComponent
38  {
39  public:
40 
42  #define AMBER_NB_ENABLED "enable NB"
43 
47 
48  BALL_CREATE(AmberNonBonded)
49 
50 
52  AmberNonBonded()
53  ;
54 
57  AmberNonBonded(ForceField& force_field)
58  ;
59 
62  AmberNonBonded(const AmberNonBonded& amber_non_bonded)
63  ;
64 
67  virtual ~AmberNonBonded()
68  ;
70 
74 
77  const AmberNonBonded& operator = (const AmberNonBonded& anb)
78  ;
79 
82  virtual void clear()
83  ;
84 
86 
89 
92  bool operator == (const AmberNonBonded& anb)
93  ;
94 
96 
99 
102  virtual bool setup()
103  throw(Exception::TooManyErrors);
104 
106 
109 
112  virtual double updateEnergy()
113  ;
114 
117  virtual void updateForces()
118  ;
119 
125  virtual void update()
126  throw(Exception::TooManyErrors);
127 
130  virtual double getElectrostaticEnergy() const
131  ;
132 
135  virtual double getVdwEnergy() const
136  ;
137 
139 
142 
145  virtual MolmecSupport::PairListAlgorithmType
146  determineMethodOfAtomPairGeneration()
147  ;
148 
151  virtual void buildVectorOfNonBondedAtomPairs
152  (const std::vector<std::pair<Atom*, Atom*> >& atom_vector,
153  const LennardJones& lennard_jones,
154  const Potential1210& hydrogen_bond)
155  throw(Exception::TooManyErrors);
156 
158 
159  protected:
160 
161  /*_ @name Protected Attributes
162  */
163  //_@{
164 
165  /*_ Value of the electrostatic energy
166  */
167  double electrostatic_energy_;
168 
169  /*_ Value of the vdw energy
170  */
171  double vdw_energy_;
172 
173  //_@}
174 
175  private:
176 
177  /*_ @name Private Attributes
178  */
179  //_@{
180 
181  /*_ Vector array with all atom pairs whose distance is smaller than cut_off
182  */
183  vector<LennardJones::Data> non_bonded_;
184 
185  /*_ Vector of flags deciding whether the pair forms a hydrogen bond or a
186  standard VdW interaction.
187  */
188  vector<char> is_hydrogen_bond_;
189 
190  /*_ Number of 1-4 interactions in the vector non_bonded
191  */
192  Size number_of_1_4_;
193 
194  /*_ Number of hydrogen bond interactions in the vector non_bonded
195  */
196  Size number_of_h_bonds_;
197 
198  /*_ Cutoff distance for non-bonded interactions
199  */
200  double cut_off_;
201 
202  /*_ Cutoff distance for vdw interactions
203  */
204  double cut_off_vdw_;
205 
206  /*_ Cuton distance for vdw interactions
207  */
208  double cut_on_vdw_;
209 
210  /*_ Cutoff distance for electrostatic interactions
211  */
212  double cut_off_electrostatic_;
213 
214  /*_ Cuton distance for electrostatic interactions
215  */
216  double cut_on_electrostatic_;
217 
218  /*_ Inverse cube of the difference of squares of cuton and cutoff for vdW.
219  This value is required for the switching function
220  */
221  double inverse_distance_off_on_vdw_3_;
222 
223  /*_ Inverse cube of the difference of squares of cuton and cutoff for eletrostatic.
224  This value is required for the switching function
225  */
226  double inverse_distance_off_on_electrostatic_3_;
227 
228  /*_ Scaling factor for vdw_1_4_interactions
229  */
230  double scaling_vdw_1_4_;
231 
232  /*_ Scaling factor for electrostatic_1_4_interactions
233  */
234  double scaling_electrostatic_1_4_;
235 
236  /*_ Flag for using constant or distance dependent dielectric constant.
237  True = distance dependent
238  */
239  bool use_dist_depend_dielectric_;
240 
241  /*_ The most efficient algorithm to calculate the non-bonded atom pairs.
242  {\tt BRUTE\_FORCE}: brute force: all against all\\
243  {\tt HASH\_GRID}: box grid
244  */
245  MolmecSupport::PairListAlgorithmType algorithm_type_;
246 
247  LennardJones van_der_waals_;
248 
249  Potential1210 hydrogen_bond_;
250 
251  //_@}
252 
253  };
254 } // namespace BALL
255 
256 #endif // BALL_MOLMEC_AMBER_AMBERVDW_H