5 #ifndef __RD_CHIRALVIOLATIONCONTRIB_H__ 6 #define __RD_CHIRALVIOLATIONCONTRIB_H__ 40 double getEnergy(
double *pos)
const;
44 void getGrad(
double *pos,
double *grad)
const;
50 unsigned int idx3,
unsigned int idx4,
51 const double *pos,
unsigned int dim) {
55 pos[idx1 * dim + 1] - pos[idx4 * dim + 1],
56 pos[idx1 * dim + 2] - pos[idx4 * dim + 2]);
59 pos[idx2 * dim + 1] - pos[idx4 * dim + 1],
60 pos[idx2 * dim + 2] - pos[idx4 * dim + 2]);
63 pos[idx3 * dim + 1] - pos[idx4 * dim + 1],
64 pos[idx3 * dim + 2] - pos[idx4 * dim + 2]);
72 unsigned int idx3,
unsigned int idx4,
77 (*pts[idx1])[1] - (*pts[idx4])[1],
78 (*pts[idx1])[2] - (*pts[idx4])[2]);
81 (*pts[idx2])[1] - (*pts[idx4])[1],
82 (*pts[idx2])[2] - (*pts[idx4])[2]);
85 (*pts[idx3])[1] - (*pts[idx4])[1],
86 (*pts[idx3])[2] - (*pts[idx4])[2]);
95 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
#define RDKIT_DISTGEOMETRY_EXPORT
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)
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.
double dotProduct(const Point3D &other) const