5#ifndef __RD_CHIRALVIOLATIONCONTRIB_H__
6#define __RD_CHIRALVIOLATIONCONTRIB_H__
39 void getGrad(
double *pos,
double *grad)
const override;
45 unsigned int idx3,
unsigned int idx4,
46 const double *pos,
unsigned int dim) {
50 pos[idx1 * dim + 1] - pos[idx4 * dim + 1],
51 pos[idx1 * dim + 2] - pos[idx4 * dim + 2]);
54 pos[idx2 * dim + 1] - pos[idx4 * dim + 1],
55 pos[idx2 * dim + 2] - pos[idx4 * dim + 2]);
58 pos[idx3 * dim + 1] - pos[idx4 * dim + 1],
59 pos[idx3 * dim + 2] - pos[idx4 * dim + 2]);
67 unsigned int idx3,
unsigned int idx4,
72 (*pts[idx1])[1] - (*pts[idx4])[1],
73 (*pts[idx1])[2] - (*pts[idx4])[2]);
76 (*pts[idx2])[1] - (*pts[idx4])[1],
77 (*pts[idx2])[2] - (*pts[idx4])[2]);
80 (*pts[idx3])[1] - (*pts[idx4])[1],
81 (*pts[idx3])[2] - (*pts[idx4])[2]);
90 unsigned int d_idx1{0}, d_idx2{0}, d_idx3{0}, d_idx4{0};
91 double d_volLower{0.0};
92 double d_volUpper{0.0};
Class used to store a quartet of points and chiral volume bounds on them.
double getEnergy(double *pos) const override
return the contribution of this contrib to the energy of a given state
static double calcChiralVolume(unsigned int idx1, unsigned int idx2, unsigned int idx3, unsigned int idx4, const RDGeom::PointPtrVect &pts)
ChiralViolationContrib * copy() const override
return a copy
static double calcChiralVolume(unsigned int idx1, unsigned int idx2, unsigned int idx3, unsigned int idx4, const double *pos, unsigned int dim)
ChiralViolationContrib(ForceFields::ForceField *owner, const ChiralSet *cset, double weight=1.0)
Constructor.
void getGrad(double *pos, double *grad) const override
abstract base class for contributions to ForceFields
A class to store forcefields and handle minimization.
double dotProduct(const Point3D &other) const
Point3D crossProduct(const Point3D &other) const
Cross product of this point with the another point.
#define RDKIT_DISTGEOMETRY_EXPORT
std::vector< RDGeom::Point * > PointPtrVect