BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 // Molecular Mechanics: Amber force field, non-bonded component 00006 00007 #ifndef BALL_MOLMEC_AMBER_NONBONDED_H 00008 #define BALL_MOLMEC_AMBER_NONBONDED_H 00009 00010 #ifndef BALL_COMMON_H 00011 # include <BALL/common.h> 00012 #endif 00013 00014 #ifndef BALL_MOLMEC_PARAMETER_LENNARDJONES_H 00015 # include <BALL/MOLMEC/PARAMETER/lennardJones.h> 00016 #endif 00017 00018 #ifndef BALL_MOLMEC_PARAMETER_POTENTIAL1210_H 00019 # include <BALL/MOLMEC/PARAMETER/potential1210.h> 00020 #endif 00021 00022 #ifndef BALL_MOLMEC_COMMON_FORCEFIELDCOMPONENT_H 00023 # include <BALL/MOLMEC/COMMON/forceFieldComponent.h> 00024 #endif 00025 00026 #ifndef BALL_MOLMEC_COMMON_SUPPORT_H 00027 # include <BALL/MOLMEC/COMMON/support.h> 00028 #endif 00029 00030 namespace BALL 00031 { 00036 class BALL_EXPORT AmberNonBonded 00037 : public ForceFieldComponent 00038 { 00039 public: 00040 00042 #define AMBER_NB_ENABLED "enable NB" 00043 00047 00048 BALL_CREATE(AmberNonBonded) 00049 00050 00052 AmberNonBonded() 00053 ; 00054 00057 AmberNonBonded(ForceField& force_field) 00058 ; 00059 00062 AmberNonBonded(const AmberNonBonded& amber_non_bonded) 00063 ; 00064 00067 virtual ~AmberNonBonded() 00068 ; 00070 00074 00077 const AmberNonBonded& operator = (const AmberNonBonded& anb) 00078 ; 00079 00082 virtual void clear() 00083 ; 00084 00086 00089 00092 bool operator == (const AmberNonBonded& anb) 00093 ; 00094 00096 00099 00102 virtual bool setup() 00103 throw(Exception::TooManyErrors); 00104 00106 00109 00112 virtual double updateEnergy() 00113 ; 00114 00117 virtual void updateForces() 00118 ; 00119 00125 virtual void update() 00126 throw(Exception::TooManyErrors); 00127 00130 virtual double getElectrostaticEnergy() const 00131 ; 00132 00135 virtual double getVdwEnergy() const 00136 ; 00137 00139 00142 00145 virtual MolmecSupport::PairListAlgorithmType 00146 determineMethodOfAtomPairGeneration() 00147 ; 00148 00151 virtual void buildVectorOfNonBondedAtomPairs 00152 (const std::vector<std::pair<Atom*, Atom*> >& atom_vector, 00153 const LennardJones& lennard_jones, 00154 const Potential1210& hydrogen_bond) 00155 throw(Exception::TooManyErrors); 00156 00158 00159 protected: 00160 00161 /*_ @name Protected Attributes 00162 */ 00163 //_@{ 00164 00165 /*_ Value of the electrostatic energy 00166 */ 00167 double electrostatic_energy_; 00168 00169 /*_ Value of the vdw energy 00170 */ 00171 double vdw_energy_; 00172 00173 //_@} 00174 00175 private: 00176 00177 /*_ @name Private Attributes 00178 */ 00179 //_@{ 00180 00181 /*_ Vector array with all atom pairs whose distance is smaller than cut_off 00182 */ 00183 vector<LennardJones::Data> non_bonded_; 00184 00185 /*_ Vector of flags deciding whether the pair forms a hydrogen bond or a 00186 standard VdW interaction. 00187 */ 00188 vector<char> is_hydrogen_bond_; 00189 00190 /*_ Number of 1-4 interactions in the vector non_bonded 00191 */ 00192 Size number_of_1_4_; 00193 00194 /*_ Number of hydrogen bond interactions in the vector non_bonded 00195 */ 00196 Size number_of_h_bonds_; 00197 00198 /*_ Cutoff distance for non-bonded interactions 00199 */ 00200 double cut_off_; 00201 00202 /*_ Cutoff distance for vdw interactions 00203 */ 00204 double cut_off_vdw_; 00205 00206 /*_ Cuton distance for vdw interactions 00207 */ 00208 double cut_on_vdw_; 00209 00210 /*_ Cutoff distance for electrostatic interactions 00211 */ 00212 double cut_off_electrostatic_; 00213 00214 /*_ Cuton distance for electrostatic interactions 00215 */ 00216 double cut_on_electrostatic_; 00217 00218 /*_ Inverse cube of the difference of squares of cuton and cutoff for vdW. 00219 This value is required for the switching function 00220 */ 00221 double inverse_distance_off_on_vdw_3_; 00222 00223 /*_ Inverse cube of the difference of squares of cuton and cutoff for eletrostatic. 00224 This value is required for the switching function 00225 */ 00226 double inverse_distance_off_on_electrostatic_3_; 00227 00228 /*_ Scaling factor for vdw_1_4_interactions 00229 */ 00230 double scaling_vdw_1_4_; 00231 00232 /*_ Scaling factor for electrostatic_1_4_interactions 00233 */ 00234 double scaling_electrostatic_1_4_; 00235 00236 /*_ Flag for using constant or distance dependent dielectric constant. 00237 True = distance dependent 00238 */ 00239 bool use_dist_depend_dielectric_; 00240 00241 /*_ The most efficient algorithm to calculate the non-bonded atom pairs. 00242 {\tt BRUTE\_FORCE}: brute force: all against all\\ 00243 {\tt HASH\_GRID}: box grid 00244 */ 00245 MolmecSupport::PairListAlgorithmType algorithm_type_; 00246 00247 LennardJones van_der_waals_; 00248 00249 Potential1210 hydrogen_bond_; 00250 00251 //_@} 00252 00253 }; 00254 } // namespace BALL 00255 00256 #endif // BALL_MOLMEC_AMBER_AMBERVDW_H