12#ifndef RD_TORSIONANGLECONTRIBS_H
13#define RD_TORSIONANGLECONTRIBS_H
36 std::vector<double> forceConstants{6, 1.0};
37 std::vector<int> signs{6, 1};
39 unsigned int idx3,
unsigned int idx4,
40 std::vector<double> forceConstants,
41 std::vector<int> signs)
46 forceConstants(forceConstants),
71 void addContrib(
unsigned int idx1,
unsigned int idx2,
unsigned int idx3,
72 unsigned int idx4, std::vector<double> forceConstants,
73 std::vector<int> signs);
85 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<TorsionAngleContribsParams> d_contribs;
109 const std::vector<double> &forceConstants,
const std::vector<int> &signs,
110 const double cosPhi);
~TorsionAngleContribs()=default
unsigned int size() const
Get number of contributions in this contrib.
TorsionAngleContribs()=default
void addContrib(unsigned int idx1, unsigned int idx2, unsigned int idx3, unsigned int idx4, std::vector< double > forceConstants, std::vector< int > signs)
Add contribution to this collection.
double getEnergy(double *pos) const override
return the contribution of this contrib to the energy of a given state
TorsionAngleContribs * copy() const override
Copy constructor.
void getGrad(double *pos, double *grad) const override
TorsionAngleContribs(ForceField *owner)
Constructor.
bool empty() const
Return true if there are no contributions in this contrib.
abstract base class for contributions to ForceFields
A class to store forcefields and handle minimization.
#define RDKIT_FORCEFIELDHELPERS_EXPORT
RDKIT_FORCEFIELDHELPERS_EXPORT double calcTorsionEnergy(const std::vector< double > &forceConstants, const std::vector< int > &signs, const double cosPhi)
TorsionAngleContribsParams(unsigned int idx1, unsigned int idx2, unsigned int idx3, unsigned int idx4, std::vector< double > forceConstants, std::vector< int > signs)