A term to capture all flat bottom distance constraint potentials.
More...
#include <DistanceConstraints.h>
|
| DistanceConstraintContribs ()=default |
|
| DistanceConstraintContribs (ForceField *owner) |
| Constructor.
|
|
| ~DistanceConstraintContribs () override=default |
|
void | addContrib (unsigned int idx1, unsigned int idx2, double minLen, double maxLen, double forceConstant) |
| Add contribution to this contrib.
|
|
void | addContrib (unsigned int idx1, unsigned int idx2, bool relative, double minLen, double maxLen, double forceConstant) |
| Add contribution to this contrib.
|
|
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 |
|
DistanceConstraintContribs * | copy () const override |
| Copy constructor.
|
|
bool | empty () const |
| Return true if there are no contributions in this contrib.
|
|
unsigned int | size () const |
| Get number of contributions in this contrib.
|
|
| ForceFieldContrib () |
|
| ForceFieldContrib (ForceFields::ForceField *owner) |
|
virtual | ~ForceFieldContrib () |
|
A term to capture all flat bottom distance constraint potentials.
Definition at line 37 of file DistanceConstraints.h.
◆ DistanceConstraintContribs() [1/2]
ForceFields::DistanceConstraintContribs::DistanceConstraintContribs |
( |
| ) |
|
|
default |
◆ DistanceConstraintContribs() [2/2]
ForceFields::DistanceConstraintContribs::DistanceConstraintContribs |
( |
ForceField * |
owner | ) |
|
◆ ~DistanceConstraintContribs()
ForceFields::DistanceConstraintContribs::~DistanceConstraintContribs |
( |
| ) |
|
|
overridedefault |
◆ addContrib() [1/2]
void ForceFields::DistanceConstraintContribs::addContrib |
( |
unsigned int |
idx1, |
|
|
unsigned int |
idx2, |
|
|
bool |
relative, |
|
|
double |
minLen, |
|
|
double |
maxLen, |
|
|
double |
forceConstant |
|
) |
| |
Add contribution to this contrib.
- Parameters
-
idx1 | index of atom1 in the ForceField's positions |
idx2 | index of atom2 in the ForceField's positions |
relative | whether to add the provided distance to the current distance |
minLen | minimum distance |
maxLen | maximum distance |
forceConst | force Constant |
◆ addContrib() [2/2]
void ForceFields::DistanceConstraintContribs::addContrib |
( |
unsigned int |
idx1, |
|
|
unsigned int |
idx2, |
|
|
double |
minLen, |
|
|
double |
maxLen, |
|
|
double |
forceConstant |
|
) |
| |
Add contribution to this contrib.
- Parameters
-
idx1 | index of atom1 in the ForceField's positions |
idx2 | index of atom2 in the ForceField's positions |
minLen | minimum distance |
maxLen | maximum distance |
forceConst | force Constant |
◆ copy()
◆ empty()
bool ForceFields::DistanceConstraintContribs::empty |
( |
| ) |
const |
|
inline |
◆ getEnergy()
double ForceFields::DistanceConstraintContribs::getEnergy |
( |
double * |
pos | ) |
const |
|
overridevirtual |
return the contribution of this contrib to the energy of a given state
- Parameters
-
pos | positions of the atoms in the current state |
Implements ForceFields::ForceFieldContrib.
◆ getGrad()
void ForceFields::DistanceConstraintContribs::getGrad |
( |
double * |
pos, |
|
|
double * |
grad |
|
) |
| const |
|
overridevirtual |
calculate the contribution of this contrib to the gradient at a given state
- Parameters
-
pos | positions of the atoms in the current state |
grad | gradients to be adapted |
Implements ForceFields::ForceFieldContrib.
◆ size()
unsigned int ForceFields::DistanceConstraintContribs::size |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: