MMFF94NonBonded.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: MMFF94NonBonded.h,v 1.1.8.4 2007/05/16 20:34:22 amoll Exp $
00005 //
00006 
00007 #ifndef BALL_MOLMEC_MMFF94_NONBONDED_H
00008 #define BALL_MOLMEC_MMFF94_NONBONDED_H
00009 
00010 #ifndef BALL_MOLMEC_COMMON_FORCEFIELDCOMPONENT_H
00011 # include <BALL/MOLMEC/COMMON/forceFieldComponent.h>
00012 #endif
00013 
00014 #ifndef BALL_MOLMEC_COMMON_SUPPORT_H
00015 # include <BALL/MOLMEC/COMMON/support.h>
00016 #endif
00017 
00018 #ifndef BALL_MOLMEC_MMFF94_MMFF94PARAMETERS_H
00019 # include <BALL/MOLMEC/MMFF94/MMFF94Parameters.h>
00020 #endif
00021 
00022 #ifndef BALL_MOLMEC_MMFF94_PROCESSORS_H
00023 # include <BALL/MOLMEC/MMFF94/MMFF94Processors.h>
00024 #endif
00025 
00026 namespace BALL 
00027 {
00031   class BALL_EXPORT MMFF94NonBonded 
00032     : public ForceFieldComponent
00033   {
00034     public:
00035 
00036     struct NonBondedPairData
00037     {
00038       NonBondedPairData();
00039 
00040       double eij;
00041       double rij;
00042       double rij_7;
00043       double vdw_energy; // for debugging
00044       // for electrostatics:
00045       bool   is_1_4;     
00046       double qi;
00047       double qj;
00048       double es_energy;  // for debugging
00049     };
00050 
00052     #define MMFF94_ES_ENABLED "enable ES"
00053     
00055     #define MMFF94_VDW_ENABLED "enable VDW"
00056 
00057     BALL_CREATE(MMFF94NonBonded)
00058 
00059     
00060     MMFF94NonBonded()
00061       ;
00062 
00064     MMFF94NonBonded(ForceField& force_field)
00065       ;
00066 
00068     MMFF94NonBonded(const MMFF94NonBonded& MMFF94_non_bonded)
00069       ;
00070 
00072     virtual ~MMFF94NonBonded()
00073       ;
00074     
00076     const MMFF94NonBonded& operator = (const MMFF94NonBonded& anb)
00077       ;
00078 
00080     virtual void clear()
00081       ;
00082 
00084     bool operator == (const MMFF94NonBonded& anb)
00085       ;
00086 
00088     virtual bool setup()
00089       throw(Exception::TooManyErrors);
00090 
00092     virtual double updateEnergy()
00093       ;
00094 
00096     virtual void updateForces()
00097       ;
00098 
00104     virtual void update()
00105       throw(Exception::TooManyErrors);
00106 
00108     virtual MolmecSupport::PairListAlgorithmType
00109       determineMethodOfAtomPairGeneration()
00110       ;
00111 
00113     const ForceField::PairVector& getAtomPairs() const { return atom_pair_vector_;}
00114 
00116     const vector<NonBondedPairData>& getNonBondedData() const { return non_bonded_data_;}
00117 
00119     double getVDWEnergy() const;
00120 
00122     double getESEnergy() const;
00123 
00124     protected:
00125 
00126     //_ Value of the electrostatic energy
00127     double  es_energy_;
00128 
00129     //_ Value of the vdw energy
00130     double  vdw_energy_;
00131 
00132     private:
00133 
00134     /*_ The most efficient algorithm to calculate the non-bonded atom pairs.
00135         {\tt BRUTE\_FORCE}: brute force: all against all\\
00136         {\tt HASH\_GRID}: box grid
00137     */
00138     ForceField::PairVector                atom_pair_vector_;
00139     vector<NonBondedPairData>             non_bonded_data_;
00140     MolmecSupport::PairListAlgorithmType  algorithm_type_;
00141     double                                cut_off_;
00142     double                                vdw_cut_on_, vdw_cut_off_;
00143     double                                es_cut_on_, es_cut_off_;
00144     MMFF94VDWParameters                   vdw_parameters_;
00145     // dielectric constant
00146     double                                dc_; 
00147     // dielectric model exponent
00148     double                                n_;
00149     bool                                  es_enabled_;
00150     bool                                  vdw_enabled_;
00151     bool                                  enable_es_switch_;
00152     bool                                  enable_vdw_switch_;
00153     double  es_d_on2_, es_d_off2_, 
00154             es_d_on_, es_d_off_,
00155             es_ac_, es_bc_, 
00156             es_cc_, es_dc_, es_denom_, es_con_, es_cover3_, es_dover5_,
00157             es_eadd_, es_eaddr_, es_const_, es_constr_;
00158   };
00159 } // namespace BALL
00160 
00161 #endif // BALL_MOLMEC_MMFF94_MMFF94VDW_H