BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 // Molecular Mechanics: Charmm force field, non-bonded component 00006 // (van der Waals, electrostatics, EEF1 solvation) 00007 // 00008 00009 #ifndef BALL_MOLMEC_CHARMM_NONBONDED_H 00010 #define BALL_MOLMEC_CHARMM_NONBONDED_H 00011 00012 #ifndef BALL_COMMON_H 00013 # include <BALL/common.h> 00014 #endif 00015 00016 #ifndef BALL_MOLMEC_PARAMETER_LENNARDJONES_H 00017 # include <BALL/MOLMEC/PARAMETER/lennardJones.h> 00018 #endif 00019 00020 #ifndef BALL_MOLMEC_PARAMETER_POTENTIAL1210_H 00021 # include <BALL/MOLMEC/PARAMETER/potential1210.h> 00022 #endif 00023 00024 #ifndef BALL_MOLMEC_PARAMETER_CHARMMEEF1_H 00025 # include <BALL/MOLMEC/PARAMETER/charmmEEF1.h> 00026 #endif 00027 00028 #ifndef BALL_MOLMEC_COMMON_FORCEFIELDCOMPONENT_H 00029 # include <BALL/MOLMEC/COMMON/forceFieldComponent.h> 00030 #endif 00031 00032 #ifndef BALL_MOLMEC_COMMON_SUPPORT_H 00033 # include <BALL/MOLMEC/COMMON/support.h> 00034 #endif 00035 00036 namespace BALL 00037 { 00045 class BALL_EXPORT CharmmNonBonded 00046 : public ForceFieldComponent 00047 { 00048 public: 00049 00051 #define CHARMM_NB_ENABLED "enable NB" 00052 00056 00057 BALL_CREATE(CharmmNonBonded) 00058 00059 00061 CharmmNonBonded() 00062 ; 00063 00066 CharmmNonBonded(ForceField& force_field) 00067 ; 00068 00071 CharmmNonBonded(const CharmmNonBonded& charmm_non_bonded) 00072 ; 00073 00076 virtual ~CharmmNonBonded() 00077 ; 00078 00080 00083 00086 const CharmmNonBonded& operator = 00087 (const CharmmNonBonded& charmm_non_bonded) 00088 ; 00089 00092 virtual void clear() 00093 ; 00094 00096 00099 00102 bool operator == (const CharmmNonBonded& charmm_non_bonded) 00103 ; 00104 00106 00109 00112 virtual bool setup() 00113 throw(Exception::TooManyErrors); 00114 00116 00119 00122 virtual double updateEnergy() 00123 ; 00124 00127 virtual void updateForces() 00128 ; 00129 00132 virtual double getElectrostaticEnergy() const 00133 ; 00134 00137 virtual double getVdwEnergy() const 00138 ; 00139 00142 virtual double getSolvationEnergy() const 00143 ; 00144 00146 00149 00152 virtual MolmecSupport::PairListAlgorithmType 00153 determineMethodOfAtomPairGeneration() 00154 ; 00155 00158 virtual void buildVectorOfNonBondedAtomPairs 00159 (const std::vector<std::pair<Atom*, Atom*> >& atom_vector) 00160 throw(Exception::TooManyErrors); 00161 00163 00164 protected: 00165 00166 /*_ @name Protected Attributes 00167 */ 00168 //_@{ 00169 00170 /*_ Value of the electrostatic energy 00171 */ 00172 double electrostatic_energy_; 00173 00174 /*_ Value of the vdw energy 00175 */ 00176 double vdw_energy_; 00177 00178 /*_ Value of the solvation energy 00179 */ 00180 double solvation_energy_; 00181 00182 //_@} 00183 /*_ @name Private Attributes 00184 */ 00185 //_@{ 00186 00187 private: 00188 00189 /*_ Vector array with all atom pairs whose distance is smaller than cut_off 00190 */ 00191 vector<LennardJones::Data> non_bonded_; 00192 00193 /*_ A helper array for buildVectorOfNonBondedAtomPairs(). This is 00194 declared here to save the ctor within the method. 00195 */ 00196 vector<bool> is_torsion_; 00197 00198 /*_ Number of 1-4 interactions in the vector non_bonded 00199 */ 00200 Size number_of_1_4_; 00201 00202 /*_ Cutoff distance for non-bonded interactions 00203 */ 00204 float cut_off_; 00205 00206 /*_ Cutoff distance for vdw interactions 00207 */ 00208 float cut_off_vdw_; 00209 00210 /*_ Start of the switch function for the vdw interactions 00211 */ 00212 float cut_on_vdw_; 00213 00214 /*_ Cutoff distance for electrostatic interactions 00215 */ 00216 float cut_off_electrostatic_; 00217 00218 /*_ Start of the switch function for the vdw interactions 00219 */ 00220 float cut_on_electrostatic_; 00221 00222 /*_ Cutoff distance for solvation contribution (EEF1) 00223 */ 00224 float cut_off_solvation_; 00225 00226 /*_ Start of the switch function for the solvation contribution (EEF1) 00227 */ 00228 float cut_on_solvation_; 00229 00230 /*_ Inverse cube of the difference of cutoff and cuton for vdW 00231 */ 00232 float inverse_difference_off_on_vdw_3_; 00233 00234 /*_ Inverse cube of the difference of cutoff and cuton for solvation 00235 */ 00236 float inverse_difference_off_on_solvation_3_; 00237 00238 /*_ Inverse cube of the difference of cutoff and cuton for electrostatic 00239 */ 00240 float inverse_difference_off_on_electrostatic_3_; 00241 00242 /*_ Scaling factor for vdw_1_4_interactions 00243 */ 00244 float scaling_vdw_1_4_; 00245 00246 /*_ Scaling factor for electrostatic_1_4_interactions 00247 */ 00248 float scaling_electrostatic_1_4_; 00249 00250 /*_ Flag for using constant or distance dependent dielectric constant 00251 True = distance dependent 00252 */ 00253 bool use_dist_depend_dielectric_; 00254 00255 /*_ The most efficient algorithm to calculate the non-bonded atom pairs. 00256 {\tt BRUTE\_FORCE}: brute force: all against all\\ 00257 {\tt HASH\_GRID}: box grid 00258 */ 00259 MolmecSupport::PairListAlgorithmType algorithm_type_; 00260 00261 LennardJones van_der_waals_parameters_; 00262 00263 LennardJones van_der_waals_parameters_14_; 00264 00265 CharmmEEF1 solvation_parameters_; 00266 00267 vector<CharmmEEF1::Values> solvation_; 00268 00269 bool use_solvation_component_; 00270 00271 //_@} 00272 00273 }; 00274 } // namespace BALL 00275 00276 #endif // BALL_MOLMEC_CHARMM_CHARMMVDW_H