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

#include <GaussianTorsionAngleContribs.h>

Inheritance diagram for ForceFields::CrystalFF::GaussianTorsionAngleContribs:
ForceFields::ForceFieldContrib

Public Member Functions

 GaussianTorsionAngleContribs ()=default
 GaussianTorsionAngleContribs (ForceField *owner)
 Constructor.
 ~GaussianTorsionAngleContribs ()=default
void addContrib (std::size_t idx1, std::size_t idx2, std::size_t idx3, std::size_t idx4, std::vector< double > energies, std::vector< double > gradients, double scaling=1.0)
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
GaussianTorsionAngleContribs * 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

Definition at line 58 of file GaussianTorsionAngleContribs.h.

Constructor & Destructor Documentation

◆ GaussianTorsionAngleContribs() [1/2]

ForceFields::CrystalFF::GaussianTorsionAngleContribs::GaussianTorsionAngleContribs ( )
default

Referenced by copy().

◆ GaussianTorsionAngleContribs() [2/2]

ForceFields::CrystalFF::GaussianTorsionAngleContribs::GaussianTorsionAngleContribs ( ForceField * owner)

Constructor.

Parameters
ownerpointer to the owning ForceField

References ForceFields::ForceFieldContrib::ForceField.

◆ ~GaussianTorsionAngleContribs()

ForceFields::CrystalFF::GaussianTorsionAngleContribs::~GaussianTorsionAngleContribs ( )
default

Member Function Documentation

◆ addContrib()

void ForceFields::CrystalFF::GaussianTorsionAngleContribs::addContrib ( std::size_t idx1,
std::size_t idx2,
std::size_t idx3,
std::size_t idx4,
std::vector< double > energies,
std::vector< double > gradients,
double scaling = 1.0 )

Add contribution to this collection. The caller is responsible that the energies and gradient lookuptables have at least to elements each!

Parameters
idx1index of atom1 in the ForceField's positions
idx2index of atom2 in the ForceField's positions
idx3index of atom3 in the ForceField's positions
idx4index of atom4 in the ForceField's positions
energieslookup table for the energies
gradientslookup table for the gradients
scalingScaling factor for energy and gradient (for K terms)

◆ copy()

GaussianTorsionAngleContribs * ForceFields::CrystalFF::GaussianTorsionAngleContribs::copy ( ) const
inlineoverridevirtual

Copy constructor.

Implements ForceFields::ForceFieldContrib.

Definition at line 97 of file GaussianTorsionAngleContribs.h.

References GaussianTorsionAngleContribs().

◆ empty()

bool ForceFields::CrystalFF::GaussianTorsionAngleContribs::empty ( ) const
inline

Return true if there are no contributions in this contrib.

Definition at line 102 of file GaussianTorsionAngleContribs.h.

◆ getEnergy()

double ForceFields::CrystalFF::GaussianTorsionAngleContribs::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::CrystalFF::GaussianTorsionAngleContribs::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::CrystalFF::GaussianTorsionAngleContribs::size ( ) const
inline

Get number of contributions in this contrib.

Definition at line 105 of file GaussianTorsionAngleContribs.h.


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