4 #ifndef __RD_CHIRALVIOLATIONCONTRIB_H__ 5 #define __RD_CHIRALVIOLATIONCONTRIB_H__ 43 void getGrad(
double *pos,
double *grad)
const;
49 unsigned int idx3,
unsigned int idx4,
50 const double *pos,
unsigned int dim) {
54 pos[idx1 * dim + 1] - pos[idx4 * dim + 1],
55 pos[idx1 * dim + 2] - pos[idx4 * dim + 2]);
58 pos[idx2 * dim + 1] - pos[idx4 * dim + 1],
59 pos[idx2 * dim + 2] - pos[idx4 * dim + 2]);
62 pos[idx3 * dim + 1] - pos[idx4 * dim + 1],
63 pos[idx3 * dim + 2] - pos[idx4 * dim + 2]);
71 unsigned int idx3,
unsigned int idx4,
76 (*pts[idx1])[1] - (*pts[idx4])[1],
77 (*pts[idx1])[2] - (*pts[idx4])[2]);
80 (*pts[idx2])[1] - (*pts[idx4])[1],
81 (*pts[idx2])[2] - (*pts[idx4])[2]);
84 (*pts[idx3])[1] - (*pts[idx4])[1],
85 (*pts[idx3])[2] - (*pts[idx4])[2]);
94 unsigned int d_idx1, d_idx2, d_idx3, d_idx4;
static double calcChiralVolume(unsigned int idx1, unsigned int idx2, unsigned int idx3, unsigned int idx4, const double *pos, unsigned int dim)
std::vector< RDGeom::Point * > PointPtrVect
abstract base class for contributions to ForceFields
static double calcChiralVolume(unsigned int idx1, unsigned int idx2, unsigned int idx3, unsigned int idx4, const RDGeom::PointPtrVect &pts)
double getEnergy(double *pos) const
return the contribution of this contrib to the energy of a given state
virtual ChiralViolationContrib * copy() const
return a copy
Class used to store a quartet of points and chiral volume bounds on them.
Point3D crossProduct(const Point3D &other) const
Cross product of this point with the another point.
A class to store forcefields and handle minimization.
void getGrad(double *pos, double *grad) const
calculate the contribution of this contrib to the gradient at a given
double dotProduct(const Point3D &other) const