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

A position constraint of the type 0.5k * deltaX^2. More...

#include <PositionConstraint.h>

Inheritance diagram for ForceFields::PositionConstraintContrib:
ForceFields::ForceFieldContrib

Public Member Functions

 PositionConstraintContrib ()
 
 PositionConstraintContrib (ForceField *owner, unsigned int idx, double maxDispl, double forceConst)
 Constructor.
 
 ~PositionConstraintContrib () override=default
 
double getEnergy (double *pos) const override
 returns our contribution to the energy of a position
 
void getGrad (double *pos, double *grad) const override
 calculates our contribution to the gradients of a position
 
PositionConstraintContribcopy () const override
 return a copy
 
- 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 position constraint of the type 0.5k * deltaX^2.

Definition at line 19 of file PositionConstraint.h.

Constructor & Destructor Documentation

◆ PositionConstraintContrib() [1/2]

ForceFields::PositionConstraintContrib::PositionConstraintContrib ( )
inline

Definition at line 22 of file PositionConstraint.h.

◆ PositionConstraintContrib() [2/2]

ForceFields::PositionConstraintContrib::PositionConstraintContrib ( ForceField owner,
unsigned int  idx,
double  maxDispl,
double  forceConst 
)

Constructor.

Parameters
ownerpointer to the owning ForceField
idxindex of the atom in the ForceField's positions
minDisplminimum displacement
maxDisplmaximum displacement
forceConstforce constant

◆ ~PositionConstraintContrib()

ForceFields::PositionConstraintContrib::~PositionConstraintContrib ( )
overridedefault

Member Function Documentation

◆ copy()

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

return a copy

Implements ForceFields::ForceFieldContrib.

Definition at line 39 of file PositionConstraint.h.

◆ getEnergy()

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

returns our contribution to the energy of a position

Implements ForceFields::ForceFieldContrib.

◆ getGrad()

void ForceFields::PositionConstraintContrib::getGrad ( double *  pos,
double *  grad 
) const
overridevirtual

calculates our contribution to the gradients of a position

Implements ForceFields::ForceFieldContrib.


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