RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
ForceFields::DistanceConstraintContribs Class Reference

A term to capture all flat bottom distance constraint potentials. More...

#include <DistanceConstraints.h>

Inheritance diagram for ForceFields::DistanceConstraintContribs:
ForceFields::ForceFieldContrib

Public Member Functions

 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
 
DistanceConstraintContribscopy () 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.
 
- Public Member Functions inherited from ForceFields::ForceFieldContrib
 ForceFieldContrib ()
 
 ForceFieldContrib (ForceFields::ForceField *owner)
 
virtual ~ForceFieldContrib ()
 

Additional Inherited Members

- Protected Attributes inherited from ForceFields::ForceFieldContrib
ForceFielddp_forceField {nullptr}
 our owning ForceField
 

Detailed Description

A term to capture all flat bottom distance constraint potentials.

Definition at line 37 of file DistanceConstraints.h.

Constructor & Destructor Documentation

◆ DistanceConstraintContribs() [1/2]

ForceFields::DistanceConstraintContribs::DistanceConstraintContribs ( )
default

◆ DistanceConstraintContribs() [2/2]

ForceFields::DistanceConstraintContribs::DistanceConstraintContribs ( ForceField owner)

Constructor.

Parameters
ownerpointer to the owning ForceField

◆ ~DistanceConstraintContribs()

ForceFields::DistanceConstraintContribs::~DistanceConstraintContribs ( )
overridedefault

Member Function Documentation

◆ 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
idx1index of atom1 in the ForceField's positions
idx2index of atom2 in the ForceField's positions
relativewhether to add the provided distance to the current distance
minLenminimum distance
maxLenmaximum distance
forceConstforce 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
idx1index of atom1 in the ForceField's positions
idx2index of atom2 in the ForceField's positions
minLenminimum distance
maxLenmaximum distance
forceConstforce Constant

◆ copy()

DistanceConstraintContribs * ForceFields::DistanceConstraintContribs::copy ( ) const
inlineoverridevirtual

Copy constructor.

Implements ForceFields::ForceFieldContrib.

Definition at line 87 of file DistanceConstraints.h.

◆ empty()

bool ForceFields::DistanceConstraintContribs::empty ( ) const
inline

Return true if there are no contributions in this contrib.

Definition at line 92 of file DistanceConstraints.h.

◆ getEnergy()

double ForceFields::DistanceConstraintContribs::getEnergy ( double *  pos) const
overridevirtual

return the contribution of this contrib to the energy of a given state

Parameters
pospositions 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
pospositions of the atoms in the current state
gradgradients to be adapted

Implements ForceFields::ForceFieldContrib.

◆ size()

unsigned int ForceFields::DistanceConstraintContribs::size ( ) const
inline

Get number of contributions in this contrib.

Definition at line 95 of file DistanceConstraints.h.


The documentation for this class was generated from the following file: