Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __RD_DISTANCECONSTRAINT_H__
00011 #define __RD_DISTANCECONSTRAINT_H__
00012 #include <iostream>
00013 #include <ForceField/Contrib.h>
00014
00015 namespace ForceFields {
00016 namespace UFF {
00017
00018
00019 class DistanceConstraintContrib : public ForceFieldContrib {
00020 public:
00021 DistanceConstraintContrib() : d_end1Idx(-1), d_end2Idx(-1) {};
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 DistanceConstraintContrib(ForceField *owner,unsigned int idx1,unsigned int idx2,
00033 double minLen,double maxLen,double forceConst);
00034
00035 ~DistanceConstraintContrib() {
00036
00037 }
00038 double getEnergy(double *pos) const;
00039
00040 void getGrad(double *pos,double *grad) const;
00041 private:
00042 int d_end1Idx,d_end2Idx;
00043 double d_minLen,d_maxLen;
00044 double d_forceConstant;
00045
00046 };
00047 }
00048 }
00049 #endif