RDKit: ForceFields::DistanceConstraintContribs Class Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Public Member Functions | List of all members
ForceFields::DistanceConstraintContribs Class Reference

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

`#include <DistanceConstraints.h>`

Inheritance diagram for ForceFields::DistanceConstraintContribs:

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

## Additional Inherited Members
Protected Attributes inherited from ForceFields::ForceFieldContrib
ForceField * | dp_forceField {nullptr}
| our owning ForceField

## Detailed Description

A term to capture all flat bottom distance constraint potentials.

Definition at line 36 of file DistanceConstraints.h.

## Constructor & Destructor Documentation

## ◆ DistanceConstraintContribs() [1/2]

ForceFields::DistanceConstraintContribs::DistanceConstraintContribs | ( |  | ) |
| default

Referenced by copy().

## ◆ DistanceConstraintContribs() [2/2]

ForceFields::DistanceConstraintContribs::DistanceConstraintContribs | ( | ForceField * | owner | ) |

Constructor.

Parameters

  owner | pointer to the owning ForceField

References ForceFields::ForceFieldContrib::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

  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()

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

Copy constructor.

Implements ForceFields::ForceFieldContrib.

Definition at line 86 of file DistanceConstraints.h.

References DistanceConstraintContribs().

## ◆ empty()

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

Return true if there are no contributions in this contrib.

Definition at line 91 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

  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

Get number of contributions in this contrib.

Definition at line 94 of file DistanceConstraints.h.

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

- DistanceConstraints.h