5 #ifndef __RD_CHIRALVIOLATIONCONTRIB_H__
6 #define __RD_CHIRALVIOLATIONCONTRIB_H__
40 void getGrad(
double *pos,
double *grad)
const;
46 unsigned int idx3,
unsigned int idx4,
47 const double *pos,
unsigned int dim) {
51 pos[idx1 * dim + 1] - pos[idx4 * dim + 1],
52 pos[idx1 * dim + 2] - pos[idx4 * dim + 2]);
55 pos[idx2 * dim + 1] - pos[idx4 * dim + 1],
56 pos[idx2 * dim + 2] - pos[idx4 * dim + 2]);
59 pos[idx3 * dim + 1] - pos[idx4 * dim + 1],
60 pos[idx3 * dim + 2] - pos[idx4 * dim + 2]);
68 unsigned int idx3,
unsigned int idx4,
73 (*pts[idx1])[1] - (*pts[idx4])[1],
74 (*pts[idx1])[2] - (*pts[idx4])[2]);
77 (*pts[idx2])[1] - (*pts[idx4])[1],
78 (*pts[idx2])[2] - (*pts[idx4])[2]);
81 (*pts[idx3])[1] - (*pts[idx4])[1],
82 (*pts[idx3])[2] - (*pts[idx4])[2]);
91 unsigned int d_idx1{0}, d_idx2{0}, d_idx3{0}, d_idx4{0};
92 double d_volLower{0.0};
93 double d_volUpper{0.0};
Class used to store a quartet of points and chiral volume bounds on them.
void getGrad(double *pos, double *grad) const
calculate the contribution of this contrib to the gradient at a given
static double calcChiralVolume(unsigned int idx1, unsigned int idx2, unsigned int idx3, unsigned int idx4, const RDGeom::PointPtrVect &pts)
static double calcChiralVolume(unsigned int idx1, unsigned int idx2, unsigned int idx3, unsigned int idx4, const double *pos, unsigned int dim)
double getEnergy(double *pos) const
return the contribution of this contrib to the energy of a given state
ChiralViolationContrib(ForceFields::ForceField *owner, const ChiralSet *cset, double weight=1.0)
Constructor.
virtual ChiralViolationContrib * copy() const
return a copy
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