Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __RD_DISTVIOLATIONCONTRIB_H__
00011 #define __RD_DISTVIOLATIONCONTRIB_H__
00012
00013 #include <ForceField/Contrib.h>
00014
00015 namespace DistGeom {
00016
00017
00018 class DistViolationContrib : public ForceFields::ForceFieldContrib {
00019 public:
00020 DistViolationContrib() : d_end1Idx(0), d_end2Idx(0), d_ub(1000.0), d_lb(0.0), d_weight(1.0) {};
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 DistViolationContrib(ForceFields::ForceField *owner,unsigned int idx1,unsigned int idx2,
00032 double ub, double lb, double weight=1.0);
00033
00034 double getEnergy(double *pos) const;
00035
00036 void getGrad(double *pos, double *grad) const;
00037
00038 private:
00039 unsigned int d_end1Idx,d_end2Idx;
00040 double d_ub;
00041 double d_lb;
00042 double d_weight;
00043 };
00044 }
00045
00046 #endif