12#ifndef RD_DISTANCECONSTRAINTS_H
13#define RD_DISTANCECONSTRAINTS_H
57 void addContrib(
unsigned int idx1,
unsigned int idx2,
double minLen,
58 double maxLen,
double forceConstant);
70 void addContrib(
unsigned int idx1,
unsigned int idx2,
bool relative,
71 double minLen,
double maxLen,
double forceConstant);
84 void getGrad(
double *pos,
double *grad)
const override;
92 bool empty()
const {
return d_contribs.empty(); }
95 unsigned int size()
const {
return d_contribs.size(); }
98 std::vector<DistanceConstraintContribsParams> d_contribs;
A term to capture all flat bottom distance constraint potentials.
bool empty() const
Return true if there are no contributions in this contrib.
void getGrad(double *pos, double *grad) const override
DistanceConstraintContribs(ForceField *owner)
Constructor.
unsigned int size() const
Get number of contributions in this contrib.
void addContrib(unsigned int idx1, unsigned int idx2, bool relative, double minLen, double maxLen, double forceConstant)
Add contribution to this contrib.
void addContrib(unsigned int idx1, unsigned int idx2, double minLen, double maxLen, double forceConstant)
Add contribution to this contrib.
~DistanceConstraintContribs() override=default
DistanceConstraintContribs * copy() const override
Copy constructor.
DistanceConstraintContribs()=default
double getEnergy(double *pos) const override
return the contribution of this contrib to the energy of a given state
abstract base class for contributions to ForceFields
A class to store forcefields and handle minimization.
#define RDKIT_FORCEFIELD_EXPORT
unsigned int idx2
index of atom2 of the distance constraint
DistanceConstraintContribsParams(unsigned int idx1, unsigned int idx2, double minLen, double maxLen, double forceConstant=1.0)
double minLen
lower bound of the flat bottom potential
unsigned int idx1
index of atom1 of the distance constraint
double forceConstant
force constant for distance constraint
double maxLen
upper bound of the flat bottom potential