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