00001 // 00002 // Copyright (C) 2004-2006 Rational Discovery LLC 00003 // 00004 // @@ All Rights Reserved @@ 00005 // 00006 #ifndef __RD_NONBONDED_H__ 00007 #define __RD_NONBONDED_H__ 00008 #include <ForceField/Contrib.h> 00009 00010 namespace ForceFields { 00011 namespace UFF { 00012 class AtomicParams; 00013 00014 //! the van der Waals term for the Universal Force Field 00015 /*! 00016 <b>The Distance Threshold</b> 00017 For the sake of efficiency, each vdwContrib maintains a threshold 00018 distance. When the distance between the two atoms exceeds this 00019 threshold, the vdwContrib makes no contribution to either the 00020 energy or the gradient. 00021 00022 The threshold is set to a multiple of the vdW distance's preferred 00023 length. This multiplier can be supplied to the constructor. 00024 00025 */ 00026 class vdWContrib : public ForceFieldContrib { 00027 public: 00028 vdWContrib() : d_at1Idx(-1), d_at2Idx(-1) {}; 00029 00030 //! Constructor 00031 /*! 00032 \param owner pointer to the owning ForceField 00033 \param idx1 index of end1 in the ForceField's positions 00034 \param idx2 index of end2 in the ForceField's positions 00035 \param at1Params pointer to the parameters for end1 00036 \param at2Params pointer to the parameters for end2 00037 \param threshMultiplier (optional) multiplier for the threshold 00038 calculation. See class documentation for details. 00039 00040 */ 00041 vdWContrib(ForceField *owner,unsigned int idx1,unsigned int idx2, 00042 const AtomicParams *at1Params, 00043 const AtomicParams *at2Params, 00044 double threshMultiplier=2.0); 00045 double getEnergy(double *pos) const; 00046 void getGrad(double *pos,double *grad) const; 00047 00048 private: 00049 int d_at1Idx,d_at2Idx; 00050 double d_xij; //!< the preferred length of the contact 00051 double d_wellDepth; //!< the vdW well depth (strength of the interaction) 00052 double d_thresh; //!< the distance threshold 00053 00054 }; 00055 namespace Utils { 00056 //! calculates and returns the UFF minimum position for a vdW contact 00057 /*! 00058 00059 \param at1Params pointer to the parameters for end1 00060 \param at2Params pointer to the parameters for end2 00061 00062 \return the position of the minimum 00063 00064 */ 00065 double calcNonbondedMinimum(const AtomicParams *at1Params, 00066 const AtomicParams *at2Params); 00067 00068 //! calculates and returns the UFF well depth for a vdW contact 00069 /*! 00070 00071 \param at1Params pointer to the parameters for end1 00072 \param at2Params pointer to the parameters for end2 00073 00074 \return the depth of the well 00075 00076 */ 00077 double calcNonbondedDepth(const AtomicParams *at1Params, 00078 const AtomicParams *at2Params); 00079 00080 00081 } 00082 00083 } 00084 } 00085 #endif
1.5.6