Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __RD_BONDSTRETCH_H__
00011 #define __RD_BONDSTRETCH_H__
00012 #include <ForceField/Contrib.h>
00013
00014 namespace ForceFields {
00015 namespace UFF {
00016 class AtomicParams;
00017
00018
00019 class BondStretchContrib : public ForceFieldContrib {
00020 public:
00021 BondStretchContrib() : d_end1Idx(-1), d_end2Idx(-1) {};
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 BondStretchContrib(ForceField *owner,unsigned int idx1,unsigned int idx2,
00033 double bondOrder,
00034 const AtomicParams *end1Params,
00035 const AtomicParams *end2Params);
00036
00037 double getEnergy(double *pos) const;
00038
00039 void getGrad(double *pos,double *grad) const;
00040
00041 private:
00042 int d_end1Idx,d_end2Idx;
00043 double d_restLen;
00044 double d_forceConstant;
00045
00046 };
00047
00048 namespace Utils {
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059 double calcBondRestLength(double bondOrder,
00060 const AtomicParams *end1Params,
00061 const AtomicParams *end2Params);
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 double calcBondForceConstant(double restLength,
00074 const AtomicParams *end1Params,
00075 const AtomicParams *end2Params);
00076
00077 }
00078 }
00079 }
00080 #endif