![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Calculates the total MMFF94 force field energy and its gradient for a set of atom 3D coordinates. More...
#include <MMFF94GradientCalculator.hpp>
Public Member Functions | |
| MMFF94GradientCalculator () | |
| Constructs the calculator without an associated ForceField::MMFF94InteractionData instance. More... | |
| MMFF94GradientCalculator (const MMFF94InteractionData &ia_data, std::size_t num_atoms) | |
| Constructs the calculator and associates it with the supplied ForceField::MMFF94InteractionData instance. More... | |
| void | setEnabledInteractionTypes (unsigned int types) |
| Enables/disables specific MMFF94 interaction-type contributions. More... | |
| unsigned int | getEnabledInteractionTypes () const |
| Returns the currently enabled interaction-type contributions. More... | |
| void | setup (const MMFF94InteractionData &ia_data, std::size_t num_atoms) |
| Associates the calculator with the supplied ForceField::MMFF94InteractionData instance and atom count. More... | |
| template<typename CoordsArray > | |
| const ValueType & | operator() (const CoordsArray &coords) |
| Computes the total MMFF94 energy of the conformation specified by coords without calculating the gradient. More... | |
| template<typename CoordsArray , typename GradVector > | |
| const ValueType & | operator() (const CoordsArray &coords, GradVector &grad) |
| Computes the total MMFF94 energy and the per-atom gradient of the conformation specified by coords. More... | |
| const ValueType & | getTotalEnergy () const |
| Returns the total MMFF94 energy computed by the most recent operator()() call. More... | |
| const ValueType & | getBondStretchingEnergy () const |
| Returns the bond-stretching energy contribution computed by the most recent operator()() call. More... | |
| const ValueType & | getAngleBendingEnergy () const |
| Returns the angle-bending energy contribution computed by the most recent operator()() call. More... | |
| const ValueType & | getStretchBendEnergy () const |
| Returns the stretch-bend coupling energy contribution computed by the most recent operator()() call. More... | |
| const ValueType & | getOutOfPlaneBendingEnergy () const |
| Returns the out-of-plane bending energy contribution computed by the most recent operator()() call. More... | |
| const ValueType & | getTorsionEnergy () const |
| Returns the torsion energy contribution computed by the most recent operator()() call. More... | |
| const ValueType & | getElectrostaticEnergy () const |
| Returns the electrostatic energy contribution computed by the most recent operator()() call. More... | |
| const ValueType & | getVanDerWaalsEnergy () const |
| Returns the Van der Waals energy contribution computed by the most recent operator()() call. More... | |
| const Util::BitSet & | getFixedAtomMask () const |
| Returns the bit mask flagging atoms whose gradient components are zeroed after evaluation. More... | |
| void | setFixedAtomMask (const Util::BitSet &mask) |
| Sets the bit mask flagging atoms whose gradient components shall be zeroed after calculation. More... | |
| void | resetFixedAtomMask () |
| Clears the fixed-atom mask so that all atoms contribute to the gradient. More... | |
Calculates the total MMFF94 force field energy and its gradient for a set of atom 3D coordinates.
The calculator takes a ForceField::MMFF94InteractionData instance and the atom count of the molecule and computes both the total MMFF94 energy and the analytical Cartesian gradient \( \partial E / \partial \mathbf{r}_i \) for each atom. The per-component energies are retained and made available via the dedicated accessors. A bit mask can be set to mark atoms whose gradient contributions are zeroed, freezing them during an energy minimization run.
| ValueType | The floating-point value type used to represent the computed energies and gradient vector elements. |
| CDPL::ForceField::MMFF94GradientCalculator< ValueType >::MMFF94GradientCalculator | ( | ) |
Constructs the calculator without an associated ForceField::MMFF94InteractionData instance.
operator()() will return zero until setup() has been called.
| CDPL::ForceField::MMFF94GradientCalculator< ValueType >::MMFF94GradientCalculator | ( | const MMFF94InteractionData & | ia_data, |
| std::size_t | num_atoms | ||
| ) |
Constructs the calculator and associates it with the supplied ForceField::MMFF94InteractionData instance.
| ia_data | The MMFF94 interaction data to use during energy/gradient calculation. |
| num_atoms | The number of atoms in the parameterized molecular graph. |
| void CDPL::ForceField::MMFF94GradientCalculator< ValueType >::setEnabledInteractionTypes | ( | unsigned int | types | ) |
Enables/disables specific MMFF94 interaction-type contributions.
| types | Bitwise-OR combination of ForceField::InteractionType flags. |
| unsigned int CDPL::ForceField::MMFF94GradientCalculator< ValueType >::getEnabledInteractionTypes | ( | ) | const |
Returns the currently enabled interaction-type contributions.
| void CDPL::ForceField::MMFF94GradientCalculator< ValueType >::setup | ( | const MMFF94InteractionData & | ia_data, |
| std::size_t | num_atoms | ||
| ) |
Associates the calculator with the supplied ForceField::MMFF94InteractionData instance and atom count.
| ia_data | The new MMFF94 interaction data to use for energy/gradient calculation. |
| num_atoms | The number of atoms in the parameterized molecular graph. |
| const ValueType& CDPL::ForceField::MMFF94GradientCalculator< ValueType >::operator() | ( | const CoordsArray & | coords | ) |
Computes the total MMFF94 energy of the conformation specified by coords without calculating the gradient.
| CoordsArray | The atom coordinate array type. |
| coords | The 3D coordinates of the molecule. |
const reference to the computed total energy. | const ValueType& CDPL::ForceField::MMFF94GradientCalculator< ValueType >::operator() | ( | const CoordsArray & | coords, |
| GradVector & | grad | ||
| ) |
Computes the total MMFF94 energy and the per-atom gradient of the conformation specified by coords.
Gradients of atoms marked in the fixed-atom mask (see setFixedAtomMask()) are zeroed after calculation.
| CoordsArray | The atom coordinate array type. |
| GradVector | The gradient vector type (must satisfy ForceField::GradientVectorTraits requirements). |
| coords | The atom 3D coordinates. |
| grad | The output gradient vector. |
const reference to the computed total energy. | const ValueType& CDPL::ForceField::MMFF94GradientCalculator< ValueType >::getTotalEnergy | ( | ) | const |
Returns the total MMFF94 energy computed by the most recent operator()() call.
const reference to the total energy. | const ValueType& CDPL::ForceField::MMFF94GradientCalculator< ValueType >::getBondStretchingEnergy | ( | ) | const |
Returns the bond-stretching energy contribution computed by the most recent operator()() call.
const reference to the bond-stretching energy. | const ValueType& CDPL::ForceField::MMFF94GradientCalculator< ValueType >::getAngleBendingEnergy | ( | ) | const |
Returns the angle-bending energy contribution computed by the most recent operator()() call.
const reference to the angle-bending energy. | const ValueType& CDPL::ForceField::MMFF94GradientCalculator< ValueType >::getStretchBendEnergy | ( | ) | const |
Returns the stretch-bend coupling energy contribution computed by the most recent operator()() call.
const reference to the stretch-bend energy. | const ValueType& CDPL::ForceField::MMFF94GradientCalculator< ValueType >::getOutOfPlaneBendingEnergy | ( | ) | const |
Returns the out-of-plane bending energy contribution computed by the most recent operator()() call.
const reference to the out-of-plane bending energy. | const ValueType& CDPL::ForceField::MMFF94GradientCalculator< ValueType >::getTorsionEnergy | ( | ) | const |
Returns the torsion energy contribution computed by the most recent operator()() call.
const reference to the torsion energy. | const ValueType& CDPL::ForceField::MMFF94GradientCalculator< ValueType >::getElectrostaticEnergy | ( | ) | const |
Returns the electrostatic energy contribution computed by the most recent operator()() call.
const reference to the electrostatic energy. | const ValueType& CDPL::ForceField::MMFF94GradientCalculator< ValueType >::getVanDerWaalsEnergy | ( | ) | const |
Returns the Van der Waals energy contribution computed by the most recent operator()() call.
const reference to the Van der Waals energy. | const Util::BitSet& CDPL::ForceField::MMFF94GradientCalculator< ValueType >::getFixedAtomMask | ( | ) | const |
Returns the bit mask flagging atoms whose gradient components are zeroed after evaluation.
const reference to the fixed-atom bit mask. | void CDPL::ForceField::MMFF94GradientCalculator< ValueType >::setFixedAtomMask | ( | const Util::BitSet & | mask | ) |
Sets the bit mask flagging atoms whose gradient components shall be zeroed after calculation.
| mask | The new fixed-atom bit mask (bit i set freezes atom i during minimization). |
| void CDPL::ForceField::MMFF94GradientCalculator< ValueType >::resetFixedAtomMask | ( | ) |
Clears the fixed-atom mask so that all atoms contribute to the gradient.