12#ifndef RD_ANGLECONSTRAINTS_H
13#define RD_ANGLECONSTRAINTS_H
61 void addContrib(
unsigned int idx1,
unsigned int idx2,
unsigned int idx3,
62 double minAngleDeg,
double maxAngleDeg,
double forceConst);
74 void addContrib(
unsigned int idx1,
unsigned int idx2,
unsigned int idx3,
75 bool relative,
double minAngleDeg,
double maxAngleDeg,
88 void getGrad(
double *pos,
double *grad)
const override;
96 bool empty()
const {
return d_contribs.empty(); }
99 unsigned int size()
const {
return d_contribs.size(); }
102 std::vector<AngleConstraintContribsParams> d_contribs;
103 double computeAngleTerm(
const double &angle,
A term to capture all flat bottom angle constraint potentials.
double getEnergy(double *pos) const override
return the contribution of this contrib to the energy of a given state
void getGrad(double *pos, double *grad) const override
AngleConstraintContribs()=default
AngleConstraintContribs(ForceField *owner)
Constructor.
bool empty() const
Return true if there are no contributions in this contrib.
~AngleConstraintContribs() override=default
void addContrib(unsigned int idx1, unsigned int idx2, unsigned int idx3, bool relative, double minAngleDeg, double maxAngleDeg, double forceConst)
Add a contribution to this contrib collection.
AngleConstraintContribs * copy() const override
Copy constructor.
unsigned int size() const
Get number of contributions in this contrib.
void addContrib(unsigned int idx1, unsigned int idx2, unsigned int idx3, double minAngleDeg, double maxAngleDeg, double forceConst)
Add a contribution to this contrib collection.
abstract base class for contributions to ForceFields
A class to store forcefields and handle minimization.
#define RDKIT_FORCEFIELD_EXPORT
double maxAngle
upper bound of the flat bottom potential
double minAngle
lower bound of the flat bottom potential
unsigned int idx3
index of atom3 of the angle constraint
AngleConstraintContribsParams(unsigned int idx1, unsigned int idx2, unsigned int idx3, double minAngle, double maxAngle, double forceConstant=1.0)
unsigned int idx1
index of atom1 of the angle constraint
unsigned int idx2
index of atom2 of the angle constraint
double forceConstant
force constant for angle constraint