Chemical Data Processing Library C++ API - Version 1.4.0
Namespaces | Classes | Typedefs | Functions
CDPL::ForceField Namespace Reference

Contains classes and functions related to molecular force fields. More...

Namespaces

 AtomProperty
 Provides keys for built-in Chem::Atom properties.
 
 BondProperty
 Provides keys for built-in Chem::Bond properties.
 
 InteractionType
 Provides flags for the specification of a set of force field interaction types.
 
 MMFF94ParameterSet
 Provides flags for the specification of the MMFF94 parameter set to use.
 
 MolecularGraphProperty
 Provides keys for built-in Chem::MolecularGraph properties.
 
 UFFAtomType
 Provides constants for the specification of Universal Force Field (UFF) atom types.
 

Classes

class  ElasticPotential
 Stores parameters for an elastic potential (harmonic distance restraint) between a pair of atoms. More...
 
class  Error
 Base class of the ForceField subsystem exception hierarchy. More...
 
class  ParameterizationFailed
 Thrown when force field parameterization has failed. More...
 
struct  GradientVectorTraits
 Generic primary traits template providing zero-initialization for a 3D gradient vector container of type GV. More...
 
struct  GradientVectorTraits< Math::VectorArray< V > >
 ForceField::GradientVectorTraits specialization for containers of type Math::VectorArray. More...
 
struct  GradientVectorTraits< std::vector< V > >
 ForceField::GradientVectorTraits specialization for containers of type std::vector. More...
 
class  MMFF94AngleBendingInteraction
 Stores parameters for a single MMFF94 angle-bending interaction defined over an atom triplet. More...
 
class  MMFF94AngleBendingInteractionParameterizer
 Detects and parameterizes the MMFF94 angle-bending interactions of a molecular graph. More...
 
class  MMFF94AngleBendingParameterTable
 Data structure for the storage and lookup of MMFF94 angle-bending interaction parameters. More...
 
class  MMFF94AromaticAtomTypeDefinitionTable
 Definitions for the second-stage MMFF94 aromatic atom typing. More...
 
class  MMFF94AromaticSSSRSubset
 Implements the extraction of all rings in the SSSR of a molecular graph that are aromatic according to MMFF94 conventions. More...
 
class  MMFF94AtomTypePropertyTable
 Lookup table mapping numeric MMFF94 atom types to per-atom-type structural and chemical property data used during MMFF94 atom and bond typing. More...
 
class  MMFF94AtomTyper
 Assigns MMFF94 symbolic and numeric atom types to the atoms of a molecular graph. More...
 
class  MMFF94BondChargeIncrementTable
 Lookup table mapping (bond type, atom-type 1, atom-type 2) triples to MMFF94 bond charge increments. More...
 
class  MMFF94BondStretchingInteraction
 Stores parameters for a single MMFF94 bond-stretching interaction between two bonded atoms. More...
 
class  MMFF94BondStretchingInteractionParameterizer
 Detects and parameterizes the MMFF94 bond-stretching interactions of a molecular graph. More...
 
class  MMFF94BondStretchingParameterTable
 Data structure for the storage and lookup of MMFF94 bond-stretching interaction parameters. More...
 
class  MMFF94BondStretchingRuleParameterTable
 Lookup table mapping (atomic-number 1, atomic-number 2) pairs to fallback MMFF94 bond-stretching parameters used when no atom-type-specific entry is available. More...
 
class  MMFF94BondTyper
 Assigns MMFF94 bond type indices to the bonds of a molecular graph. More...
 
class  MMFF94ChargeCalculator
 Calculator for the MMFF94 partial atomic charges of a molecular graph. More...
 
class  MMFF94DefaultStretchBendParameterTable
 Lookup table mapping (terminal-atom-1 PTE row, center-atom PTE row, terminal-atom-2 PTE row) triples to fallback MMFF94 stretch-bend coupling force constants used when no atom-type-specific entry is available. More...
 
class  MMFF94ElectrostaticInteraction
 Stores parameters for a single MMFF94 electrostatic interaction between two non-bonded atoms. More...
 
class  MMFF94ElectrostaticInteractionParameterizer
 Detects and parameterizes the MMFF94 electrostatic interactions of a molecular graph. More...
 
class  MMFF94EnergyCalculator
 Calculates the total MMFF94 force field energy for a set of atom 3D coordinates. More...
 
class  MMFF94FormalAtomChargeDefinitionTable
 Lookup table mapping symbolic MMFF94 atom types to their formal-charge definitions used by the MMFF94 charge model. More...
 
class  MMFF94GradientCalculator
 Calculates the total MMFF94 force field energy and its gradient for a set of atom 3D coordinates. More...
 
class  MMFF94HeavyToHydrogenAtomTypeMap
 Lookup table mapping each heavy atom symbolic MMFF94 type to the symbolic MMFF94 type used for hydrogen atoms bonded to it. More...
 
class  MMFF94InteractionData
 Container holding the full set of MMFF94 interaction parameters for a molecular graph. More...
 
class  MMFF94InteractionParameterizer
 One-stop MMFF94 parameterizer that combines atom typing, bond typing, partial-charge assignment and per-interaction-type parameter look-up into a single parameterize() call. More...
 
class  MMFF94OutOfPlaneBendingInteraction
 Stores parameters for a single MMFF94 out-of-plane bending interaction at a trigonal center. More...
 
class  MMFF94OutOfPlaneBendingInteractionParameterizer
 Detects and parameterizes the MMFF94 out-of-plane bending interactions of a molecular graph. More...
 
class  MMFF94OutOfPlaneBendingParameterTable
 Lookup table mapping (terminal-atom-1 type, center-atom type, terminal-atom-2 type, out-of-plane-atom type) quadruples to MMFF94 out-of-plane bending force constants. More...
 
class  MMFF94PartialBondChargeIncrementTable
 Lookup table mapping numeric MMFF94 atom types to per-atom partial bond charge increments and formal-charge adjustment factors used by the MMFF94 charge model. More...
 
class  MMFF94PrimaryToParameterAtomTypeMap
 Lookup table mapping each primary numeric MMFF94 atom type to the ordered list of fallback numeric atom types used when looking up missing interaction parameters. More...
 
class  MMFF94StretchBendInteraction
 Stores paramters for a single MMFF94 stretch-bend coupling interaction. More...
 
class  MMFF94StretchBendInteractionParameterizer
 
class  MMFF94StretchBendParameterTable
 Lookup table mapping (stretch-bend type, terminal-atom-1 type, center-atom type, terminal-atom-2 type) quadruples to MMFF94 stretch-bend coupling force constants. More...
 
class  MMFF94SymbolicAtomTypePatternTable
 Ordered list of SMARTS-style substructure patterns used to assign symbolic MMFF94 atom types during atom typing. More...
 
class  MMFF94SymbolicToNumericAtomTypeMap
 Lookup table mapping each symbolic MMFF94 atom type to its corresponding numeric MMFF94 atom type. More...
 
class  MMFF94TorsionInteraction
 Stores parameters for a single MMFF94 torsion interaction over an atom quadruplet i-j-k-l. More...
 
class  MMFF94TorsionInteractionParameterizer
 Detects and parameterizes the MMFF94 torsion interactions of a molecular graph. More...
 
class  MMFF94TorsionParameterTable
 Lookup table mapping (torsion type, terminal-atom-1 type, center-atom-1 type, center-atom-2 type, terminal-atom-2 type) quintuples to the three MMFF94 torsion-energy Fourier-series parameters (V1, V2, V3). More...
 
class  MMFF94VanDerWaalsInteraction
 Stores parameters for a single MMFF94 Van der Waals interaction between two non-bonded atoms. More...
 
class  MMFF94VanDerWaalsInteractionParameterizer
 Detects and parameterizes the MMFF94 Van der Waals interactions of a molecular graph. More...
 
class  MMFF94VanDerWaalsParameterTable
 Lookup table mapping numeric MMFF94 atom types to per-atom-type Van der Waals parameters (atomic polarizability, effective electron number, scaling factors A/G, and H-donor/-acceptor classification). More...
 
class  UFFAtomTypePropertyTable
 Lookup table mapping numeric UFF atom types to the per-atom-type parameters used by the Universal Force Field (UFF). More...
 

Typedefs

typedef Util::Array< ElasticPotentialElasticPotentialList
 Data structure for the storage of elastic potential parameter set records. More...
 
typedef std::function< bool(const Chem::Atom &, const Chem::Atom &)> InteractionFilterFunction2
 Generic wrapper for storing user-defined two-atom interaction filtering functions (see [FUNWRP]). More...
 
typedef std::function< bool(const Chem::Atom &, const Chem::Atom &, const Chem::Atom &)> InteractionFilterFunction3
 Generic wrapper for storing user-defined three-atom interaction filtering functions (see [FUNWRP]). More...
 
typedef std::function< bool(const Chem::Atom &, const Chem::Atom &, const Chem::Atom &, const Chem::Atom &)> InteractionFilterFunction4
 Generic wrapper for storing user-defined four-atom interaction filtering functions (see [FUNWRP]). More...
 
typedef Util::Array< MMFF94AngleBendingInteractionMMFF94AngleBendingInteractionList
 Data structure for the storage of MMFF94 angle-bending interaction parameter set records. More...
 
typedef Util::Array< MMFF94BondStretchingInteractionMMFF94BondStretchingInteractionList
 Data structure for the storage of MMFF94 bond-stretching interaction parameter set records. More...
 
typedef Util::Array< MMFF94ElectrostaticInteractionMMFF94ElectrostaticInteractionList
 Data structure for the storage of MMFF94 electrostatic interaction parameter set records. More...
 
typedef Util::Array< MMFF94OutOfPlaneBendingInteractionMMFF94OutOfPlaneBendingInteractionList
 Data structure for the storage of MMFF94 out-of-plane bending interaction parameter set records. More...
 
typedef std::function< unsigned int(const Chem::Atom &)> MMFF94NumericAtomTypeFunction
 Generic wrapper class used to store a user-defined numeric MMFF94 atom type function. More...
 
typedef std::function< const std::string &(const Chem::Atom &)> MMFF94SymbolicAtomTypeFunction
 Generic wrapper class used to store a user-defined symbolic MMFF94 atom type function. More...
 
typedef std::function< double(const Chem::Atom &)> MMFF94AtomChargeFunction
 Generic wrapper class used to store a user-defined MMFF94 partial atom charge function. More...
 
typedef std::function< unsigned int(const Chem::Bond &)> MMFF94BondTypeIndexFunction
 Generic wrapper class used to store a user-defined MMFF94 bond type index function. More...
 
typedef std::function< const Chem::FragmentList::SharedPointer &(const Chem::MolecularGraph &)> MMFF94RingSetFunction
 Generic wrapper class used to store a user-defined MMFF94 ring set function. More...
 
typedef Util::Array< MMFF94StretchBendInteractionMMFF94StretchBendInteractionList
 Data structure for the storage of MMFF94 stretch-bend coupling interaction parameter set records. More...
 
typedef Util::Array< MMFF94TorsionInteractionMMFF94TorsionInteractionList
 Data structure for the storage of MMFF94 torsion interaction parameter set records. More...
 
typedef Util::Array< MMFF94VanDerWaalsInteractionMMFF94VanDerWaalsInteractionList
 Data structure for the storage of MMFF94 Van der Waals interaction parameter set records. More...
 
typedef std::function< std::size_t(const Chem::Atom &, const Chem::Atom &, const Chem::MolecularGraph &)> TopologicalAtomDistanceFunction
 Generic wrapper class used to store a user-defined topological atom-pair distance function. More...
 

Functions

CDPL_FORCEFIELD_API const std::string & getMMFF94SymbolicType (const Chem::Atom &atom)
 Returns the value of the ForceField::AtomProperty::MMFF94_SYMBOLIC_TYPE property of atom. More...
 
CDPL_FORCEFIELD_API void setMMFF94SymbolicType (Chem::Atom &atom, const std::string &type)
 Sets the value of the ForceField::AtomProperty::MMFF94_SYMBOLIC_TYPE property of atom to type. More...
 
CDPL_FORCEFIELD_API void clearMMFF94SymbolicType (Chem::Atom &atom)
 Removes the ForceField::AtomProperty::MMFF94_SYMBOLIC_TYPE property from atom. More...
 
CDPL_FORCEFIELD_API bool hasMMFF94SymbolicType (const Chem::Atom &atom)
 Tells whether atom carries an explicit ForceField::AtomProperty::MMFF94_SYMBOLIC_TYPE property. More...
 
CDPL_FORCEFIELD_API unsigned int getMMFF94NumericType (const Chem::Atom &atom)
 Returns the value of the ForceField::AtomProperty::MMFF94_NUMERIC_TYPE property of atom. More...
 
CDPL_FORCEFIELD_API void setMMFF94NumericType (Chem::Atom &atom, unsigned int type)
 Sets the value of the ForceField::AtomProperty::MMFF94_NUMERIC_TYPE property of atom to type. More...
 
CDPL_FORCEFIELD_API void clearMMFF94NumericType (Chem::Atom &atom)
 Removes the ForceField::AtomProperty::MMFF94_NUMERIC_TYPE property from atom. More...
 
CDPL_FORCEFIELD_API bool hasMMFF94NumericType (const Chem::Atom &atom)
 Tells whether atom carries an explicit ForceField::AtomProperty::MMFF94_NUMERIC_TYPE property. More...
 
CDPL_FORCEFIELD_API double getMMFF94Charge (const Chem::Atom &atom)
 Returns the value of the ForceField::AtomProperty::MMFF94_CHARGE property of atom. More...
 
CDPL_FORCEFIELD_API void setMMFF94Charge (Chem::Atom &atom, double charge)
 Sets the value of the ForceField::AtomProperty::MMFF94_CHARGE property of atom to charge. More...
 
CDPL_FORCEFIELD_API void clearMMFF94Charge (Chem::Atom &atom)
 Removes the ForceField::AtomProperty::MMFF94_CHARGE property from atom. More...
 
CDPL_FORCEFIELD_API bool hasMMFF94Charge (const Chem::Atom &atom)
 Tells whether atom carries an explicit ForceField::AtomProperty::MMFF94_CHARGE property. More...
 
CDPL_FORCEFIELD_API unsigned int getUFFType (const Chem::Atom &atom)
 Returns the value of the ForceField::AtomProperty::UFF_TYPE property of atom. More...
 
CDPL_FORCEFIELD_API void setUFFType (Chem::Atom &atom, unsigned int type)
 Sets the value of the ForceField::AtomProperty::UFF_TYPE property of atom to type. More...
 
CDPL_FORCEFIELD_API void clearUFFType (Chem::Atom &atom)
 Removes the ForceField::AtomProperty::UFF_TYPE property from atom. More...
 
CDPL_FORCEFIELD_API bool hasUFFType (const Chem::Atom &atom)
 Tells whether atom carries an explicit ForceField::AtomProperty::UFF_TYPE property. More...
 
CDPL_FORCEFIELD_API unsigned int perceiveUFFType (const Chem::Atom &atom, const Chem::MolecularGraph &molgraph)
 Perceives the UFF atom type of atom in the context of the molecular graph molgraph. More...
 
CDPL_FORCEFIELD_API unsigned int getMMFF94TypeIndex (const Chem::Bond &bond)
 Returns the value of the ForceField::BondProperty::MMFF94_TYPE_INDEX property of bond. More...
 
CDPL_FORCEFIELD_API void setMMFF94TypeIndex (Chem::Bond &bond, unsigned int type_idx)
 Sets the value of the ForceField::BondProperty::MMFF94_TYPE_INDEX property of bond to type_idx. More...
 
CDPL_FORCEFIELD_API void clearMMFF94TypeIndex (Chem::Bond &bond)
 Removes the ForceField::BondProperty::MMFF94_TYPE_INDEX property from bond. More...
 
CDPL_FORCEFIELD_API bool hasMMFF94TypeIndex (const Chem::Bond &bond)
 Tells whether bond carries an explicit ForceField::BondProperty::MMFF94_TYPE_INDEX property. More...
 
template<typename ValueType , typename Iter , typename CoordsArray >
ValueType calcElasticPotentialEnergy (Iter beg, const Iter &end, const CoordsArray &coords)
 Accumulates the energies calculated for the elastic potentials specified by the iterators in the given range. More...
 
template<typename ValueType , typename CoordsArray >
ValueType calcElasticPotentialEnergy (const ElasticPotential &pot, const CoordsArray &coords)
 Calculates the energy of a single elastic potential pot for the supplied atom coordinates coords. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcElasticPotentialEnergy (const CoordsVec &atom1_pos, const CoordsVec &atom2_pos, const ValueType &force_const, const ValueType &ref_length)
 Calculates the energy \( E_{ij} \) of an elastic potential applied on a pair of atoms i-j. More...
 
template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType calcElasticPotentialGradient (Iter beg, const Iter &end, const CoordsArray &coords, GradVector &grad)
 Accumulates the energies and gradient contributions calculated for the elastic potentials specified by the iterators in the given range. More...
 
template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType calcElasticPotentialGradient (const ElasticPotential &pot, const CoordsArray &coords, GradVector &grad)
 Calculates the energy and gradient contribution of a single elastic potential pot for the supplied atom coordinates coords. More...
 
template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType calcElasticPotentialGradient (const CoordsVec &atom1_pos, const CoordsVec &atom2_pos, GradVec &atom1_grad, GradVec &atom2_grad, const ValueType &force_const, const ValueType &ref_length)
 Calculates the elastic potential energy gradient \( \nabla E_{ij} \) for a pair of atoms i-j. More...
 
template<typename ValueType , typename Iter , typename CoordsArray >
ValueType calcMMFF94BondStretchingEnergy (Iter beg, const Iter &end, const CoordsArray &coords)
 Sums the bond-stretching interaction energies of all MMFF94 bond-stretching interactions in the iterator range [beg, end). More...
 
template<typename ValueType , typename CoordsArray >
ValueType calcMMFF94BondStretchingEnergy (const MMFF94BondStretchingInteraction &iaction, const CoordsArray &coords)
 Calculates the bond-stretching interaction energy of iaction using the geometry from coords. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcMMFF94BondStretchingEnergy (const CoordsVec &atom1_pos, const CoordsVec &atom2_pos, const ValueType &force_const, const ValueType &ref_length)
 Calculates the bond stretching interaction energy \( EB_{ij} \) for the bond i-j. More...
 
template<typename ValueType >
ValueType calcMMFF94BondStretchingEnergy (const ValueType &r_ij, const ValueType &force_const, const ValueType &ref_length)
 Calculates the bond stretching interaction energy \( EB_{ij} \) for the bond i-j. More...
 
template<typename ValueType , typename Iter , typename CoordsArray >
ValueType calcMMFF94AngleBendingEnergy (Iter beg, const Iter &end, const CoordsArray &coords)
 Sums the angle-bending interaction energies of all MMFF94 angle-bending interactions in the iterator range [beg, end). More...
 
template<typename ValueType , typename CoordsArray >
ValueType calcMMFF94AngleBendingEnergy (const MMFF94AngleBendingInteraction &iaction, const CoordsArray &coords)
 Calculates the angle-bending interaction energy of iaction using the geometry from coords. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcMMFF94AngleBendingEnergy (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, bool linear, const ValueType &force_const, const ValueType &ref_angle)
 Calculates the angle bending interaction energy \( EA_{ijk} \) for two bonds i-j and j-k. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcMMFF94AngleBendingEnergy (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, const ValueType &r_ij, const ValueType &r_jk, bool linear, const ValueType &force_const, const ValueType &ref_angle)
 Calculates the angle bending interaction energy \( EA_{ijk} \) for two bonds i-j and j-k. More...
 
template<typename ValueType , typename Iter , typename CoordsArray >
ValueType calcMMFF94StretchBendEnergy (Iter beg, const Iter &end, const CoordsArray &coords)
 Sums the stretch-bend coupling interaction energies of all MMFF94 stretch-bend interactions in the iterator range [beg, end). More...
 
template<typename ValueType , typename CoordsArray >
ValueType calcMMFF94StretchBendEnergy (const MMFF94StretchBendInteraction &iaction, const CoordsArray &coords)
 Calculates the stretch-bend coupling interaction energy of iaction using the geometry from coords. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcMMFF94StretchBendEnergy (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, const ValueType &ijk_force_const, const ValueType &kji_force_const, const ValueType &ref_angle, const ValueType &ref_length1, const ValueType &ref_length2)
 Calculates the stretch-bend interaction energy \( EBA_{ijk} \) for two bonds i-j and j-k. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcMMFF94StretchBendEnergy (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, const ValueType &r_ij, const ValueType &r_jk, const ValueType &ijk_force_const, const ValueType &kji_force_const, const ValueType &ref_angle, const ValueType &ref_length1, const ValueType &ref_length2)
 Calculates the stretch-bend interaction energy \( EBA_{ijk} \) for two bonds i-j and j-k. More...
 
template<typename ValueType , typename Iter , typename CoordsArray >
ValueType calcMMFF94OutOfPlaneBendingEnergy (Iter beg, const Iter &end, const CoordsArray &coords)
 Sums the out-of-plane bending interaction energies of all MMFF94 out-of-plane bending interactions in the iterator range [beg, end). More...
 
template<typename ValueType , typename CoordsArray >
ValueType calcMMFF94OutOfPlaneBendingEnergy (const MMFF94OutOfPlaneBendingInteraction &iaction, const CoordsArray &coords)
 Calculates the out-of-plane bending interaction energy of iaction using the geometry from coords. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcMMFF94OutOfPlaneBendingEnergy (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, const CoordsVec &oop_atom_pos, const ValueType &force_const)
 Calculates the out-of-plane bending interaction energy \( EOOP_{ijk;l} \) for the bond j-l and the plane i-j-k. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcMMFF94OutOfPlaneBendingEnergy (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, const CoordsVec &oop_atom_pos, const ValueType &r_jl, const ValueType &force_const)
 Calculates the out-of-plane bending interaction energy \( EOOP_{ijk;l} \) for the bond j-l and the plane i-j-k. More...
 
template<typename ValueType , typename Iter , typename CoordsArray >
ValueType calcMMFF94TorsionEnergy (Iter beg, const Iter &end, const CoordsArray &coords)
 Sums the torsion interaction energies of all MMFF94 torsion interactions in the iterator range [beg, end). More...
 
template<typename ValueType , typename CoordsArray >
ValueType calcMMFF94TorsionEnergy (const MMFF94TorsionInteraction &iaction, const CoordsArray &coords)
 Calculates the torsion interaction energy of iaction using the geometry from coords. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcMMFF94TorsionEnergy (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom1_pos, const CoordsVec &ctr_atom2_pos, const CoordsVec &term_atom2_pos, const ValueType &tor_param1, const ValueType &tor_param2, const ValueType &tor_param3)
 Calculates the torsion interaction energy \( ET_{ijkl} \) for the central bond j-k and the connected bonds i-j and k-l. More...
 
template<typename ValueType , typename Iter , typename CoordsArray >
ValueType calcMMFF94ElectrostaticEnergy (Iter beg, const Iter &end, const CoordsArray &coords)
 Sums the electrostatic interaction energies of all MMFF94 electrostatic interactions in the iterator range [beg, end). More...
 
template<typename ValueType , typename CoordsArray >
ValueType calcMMFF94ElectrostaticEnergy (const MMFF94ElectrostaticInteraction &iaction, const CoordsArray &coords)
 Calculates the electrostatic interaction energy of iaction using the geometry from coords. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcMMFF94ElectrostaticEnergy (const CoordsVec &atom1_pos, const CoordsVec &atom2_pos, const ValueType &atom1_chg, const ValueType &atom2_chg, const ValueType &scale_fact, const ValueType &de_const, const ValueType &dist_expo)
 Calculates the electrostatic interaction energy \( EQ_{ij} \) for the atom pair i-j. More...
 
template<typename ValueType >
ValueType calcMMFF94ElectrostaticEnergy (const ValueType &r_ij, const ValueType &atom1_chg, const ValueType &atom2_chg, const ValueType &scale_fact, const ValueType &de_const, const ValueType &dist_expo)
 Calculates the electrostatic interaction energy \( EQ_{ij} \) for the atom pair i-j. More...
 
template<typename ValueType , typename Iter , typename CoordsArray >
ValueType calcMMFF94VanDerWaalsEnergy (Iter beg, const Iter &end, const CoordsArray &coords)
 Sums the Van der Waals interaction energies of all MMFF94 Van der Waals interactions in the iterator range [beg, end). More...
 
template<typename ValueType , typename CoordsArray >
ValueType calcMMFF94VanDerWaalsEnergy (const MMFF94VanDerWaalsInteraction &iaction, const CoordsArray &coords)
 Calculates the Van der Waals interaction energy of iaction using the geometry from coords. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcMMFF94VanDerWaalsEnergy (const CoordsVec &atom1_pos, const CoordsVec &atom2_pos, const ValueType &e_IJ, const ValueType &r_IJ, const ValueType &r_IJ_7)
 Calculates the Van der Waals interaction energy \( E_{vdW_{ij}} \) for the atom pair i-j. More...
 
template<typename ValueType >
ValueType calcMMFF94VanDerWaalsEnergy (const ValueType &r_ij, const ValueType &e_IJ, const ValueType &r_IJ, const ValueType &r_IJ_7)
 Calculates the Van der Waals interaction energy \( E_{vdW_{ij}} \) for the atom pair i-j. More...
 
template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType calcMMFF94BondStretchingGradient (Iter beg, const Iter &end, const CoordsArray &coords, GradVector &grad)
 Sums the MMFF94 bond-stretching interaction energies of the interactions in [beg, end) and accumulates the corresponding atom-position gradient contributions into grad. More...
 
template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType calcMMFF94BondStretchingGradient (const MMFF94BondStretchingInteraction &iaction, const CoordsArray &coords, GradVector &grad)
 Calculates the bond-stretching interaction energy of iaction and accumulates the corresponding atom-position gradient contribution into grad. More...
 
template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType calcMMFF94BondStretchingGradient (const CoordsVec &atom1_pos, const CoordsVec &atom2_pos, GradVec &atom1_grad, GradVec &atom2_grad, const ValueType &force_const, const ValueType &ref_length)
 Calculates the bond stretching interaction energy gradient \( \nabla EB_{ij} \) for the bond i-j. More...
 
template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType calcMMFF94AngleBendingGradient (Iter beg, const Iter &end, const CoordsArray &coords, GradVector &grad)
 Sums the MMFF94 angle-bending interaction energies of the interactions in [beg, end) and accumulates the corresponding atom-position gradient contributions into grad. More...
 
template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType calcMMFF94AngleBendingGradient (const MMFF94AngleBendingInteraction &iaction, const CoordsArray &coords, GradVector &grad)
 Calculates the angle-bending interaction energy of iaction and accumulates the corresponding atom-position gradient contribution into grad. More...
 
template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType calcMMFF94AngleBendingGradient (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, GradVec &term_atom1_grad, GradVec &ctr_atom_grad, GradVec &term_atom2_grad, bool linear, const ValueType &force_const, const ValueType &ref_angle)
 Calculates the angle bending interaction energy gradient \( \nabla EA_{ijk} \) for two bonds i-j and j-k. More...
 
template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType calcMMFF94StretchBendGradient (Iter beg, const Iter &end, const CoordsArray &coords, GradVector &grad)
 Sums the MMFF94 stretch-bend coupling interaction energies of the interactions in [beg, end) and accumulates the corresponding atom-position gradient contributions into grad. More...
 
template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType calcMMFF94StretchBendGradient (const MMFF94StretchBendInteraction &iaction, const CoordsArray &coords, GradVector &grad)
 Calculates the stretch-bend coupling interaction energy of iaction and accumulates the corresponding atom-position gradient contribution into grad. More...
 
template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType calcMMFF94StretchBendGradient (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, GradVec &term_atom1_grad, GradVec &ctr_atom_grad, GradVec &term_atom2_grad, const ValueType &ijk_force_const, const ValueType &kji_force_const, const ValueType &ref_angle, const ValueType &ref_length1, const ValueType &ref_length2)
 Calculates the stretch-bend interaction energy gradient \( \nabla EBA_{ijk} \) for two bonds i-j and j-k. More...
 
template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType calcMMFF94OutOfPlaneBendingGradient (Iter beg, const Iter &end, const CoordsArray &coords, GradVector &grad)
 Sums the MMFF94 out-of-plane bending interaction energies of the interactions in [beg, end) and accumulates the corresponding atom-position gradient contributions into grad. More...
 
template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType calcMMFF94OutOfPlaneBendingGradient (const MMFF94OutOfPlaneBendingInteraction &iaction, const CoordsArray &coords, GradVector &grad)
 Calculates the out-of-plane bending interaction energy of iaction and accumulates the corresponding atom-position gradient contribution into grad. More...
 
template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType calcMMFF94OutOfPlaneBendingGradient (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, const CoordsVec &oop_atom_pos, GradVec &term_atom1_grad, GradVec &ctr_atom_grad, GradVec &term_atom2_grad, GradVec &oop_atom_grad, const ValueType &force_const)
 Calculates the out-of-plane bending interaction energy gradient \( \nabla EOOP_{ijk;l} \) for the bond j-l and the plane i-j-k. More...
 
template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType calcMMFF94TorsionGradient (Iter beg, const Iter &end, const CoordsArray &coords, GradVector &grad)
 Sums the MMFF94 torsion interaction energies of the interactions in [beg, end) and accumulates the corresponding atom-position gradient contributions into grad. More...
 
template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType calcMMFF94TorsionGradient (const MMFF94TorsionInteraction &iaction, const CoordsArray &coords, GradVector &grad)
 Calculates the torsion interaction energy of iaction and accumulates the corresponding atom-position gradient contribution into grad. More...
 
template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType calcMMFF94TorsionGradient (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom1_pos, const CoordsVec &ctr_atom2_pos, const CoordsVec &term_atom2_pos, GradVec &term_atom1_grad, GradVec &ctr_atom1_grad, GradVec &ctr_atom2_grad, GradVec &term_atom2_grad, const ValueType &tor_param1, const ValueType &tor_param2, const ValueType &tor_param3)
 Calculates the torsion interaction energy gradient \( \nabla ET_{ijkl} \) for the central bond j-k and the connected bonds i-j and k-l. More...
 
template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType calcMMFF94ElectrostaticGradient (Iter beg, const Iter &end, const CoordsArray &coords, GradVector &grad)
 Sums the MMFF94 electrostatic interaction energies of the interactions in [beg, end) and accumulates the corresponding atom-position gradient contributions into grad. More...
 
template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType calcMMFF94ElectrostaticGradient (const MMFF94ElectrostaticInteraction &iaction, const CoordsArray &coords, GradVector &grad)
 Calculates the electrostatic interaction energy of iaction and accumulates the corresponding atom-position gradient contribution into grad. More...
 
template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType calcMMFF94ElectrostaticGradient (const CoordsVec &atom1_pos, const CoordsVec &atom2_pos, GradVec &atom1_grad, GradVec &atom2_grad, const ValueType &atom1_chg, const ValueType &atom2_chg, const ValueType &scale_fact, const ValueType &de_const, const ValueType &dist_expo)
 Calculates the electrostatic interaction energy gradient \( \nabla EQ_{ij} \) for the atom pair i-j. More...
 
template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType calcMMFF94VanDerWaalsGradient (Iter beg, const Iter &end, const CoordsArray &coords, GradVector &grad)
 Sums the MMFF94 Van der Waals interaction energies of the interactions in [beg, end) and accumulates the corresponding atom-position gradient contributions into grad. More...
 
template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType calcMMFF94VanDerWaalsGradient (const MMFF94VanDerWaalsInteraction &iaction, const CoordsArray &coords, GradVector &grad)
 Calculates the Van der Waals interaction energy of iaction and accumulates the corresponding atom-position gradient contribution into grad. More...
 
template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType calcMMFF94VanDerWaalsGradient (const CoordsVec &atom1_pos, const CoordsVec &atom2_pos, GradVec &atom1_grad, GradVec &atom2_grad, const ValueType &e_IJ, const ValueType &r_IJ, const ValueType &r_IJ_7)
 Calculates the Van der Waals interaction energy gradient \( \nabla E_{vdW_{ij}} \) for the atom pair i-j. More...
 
CDPL_FORCEFIELD_API const Chem::FragmentList::SharedPointergetMMFF94AromaticRings (const Chem::MolecularGraph &molgraph)
 Returns the value of the ForceField::MolecularGraphProperty::MMFF94_AROMATIC_RINGS property of molgraph. More...
 
CDPL_FORCEFIELD_API void setMMFF94AromaticRings (Chem::MolecularGraph &molgraph, const Chem::FragmentList::SharedPointer &rings)
 Sets the value of the ForceField::MolecularGraphProperty::MMFF94_AROMATIC_RINGS property of molgraph to rings. More...
 
CDPL_FORCEFIELD_API void clearMMFF94AromaticRings (Chem::MolecularGraph &molgraph)
 Removes the ForceField::MolecularGraphProperty::MMFF94_AROMATIC_RINGS property from molgraph. More...
 
CDPL_FORCEFIELD_API bool hasMMFF94AromaticRings (const Chem::MolecularGraph &molgraph)
 Tells whether molgraph carries an explicit ForceField::MolecularGraphProperty::MMFF94_AROMATIC_RINGS property. More...
 
CDPL_FORCEFIELD_API Chem::FragmentList::SharedPointer perceiveMMFF94AromaticRings (const Chem::MolecularGraph &molgraph)
 Perceives the list of MMFF94 aromatic rings of the molecular graph molgraph without storing the result. More...
 
CDPL_FORCEFIELD_API Chem::FragmentList::SharedPointer perceiveMMFF94AromaticRings (Chem::MolecularGraph &molgraph, bool overwrite)
 Perceives the list of MMFF94 aromatic rings of molgraph and stores the result as the value of the ForceField::MolecularGraphProperty::MMFF94_AROMATIC_RINGS property. More...
 
CDPL_FORCEFIELD_API void assignMMFF94AtomTypes (Chem::MolecularGraph &molgraph, bool strict, bool overwrite)
 Assigns MMFF94 atom types to the atoms of molgraph. More...
 
CDPL_FORCEFIELD_API void assignMMFF94BondTypeIndices (Chem::MolecularGraph &molgraph, bool strict, bool overwrite)
 Assigns MMFF94 bond type indices to the bonds of molgraph. More...
 
CDPL_FORCEFIELD_API void calcMMFF94AtomCharges (Chem::MolecularGraph &molgraph, bool strict, bool overwrite)
 Calculates and assigns MMFF94 partial atomic charges to the atoms of molgraph. More...
 
CDPL_FORCEFIELD_API void assignUFFAtomTypes (Chem::MolecularGraph &molgraph, bool overwrite)
 Assigns UFF atom types to the atoms of molgraph. More...
 
CDPL_FORCEFIELD_API void filterInteractions (const MMFF94InteractionData &ia_data, MMFF94InteractionData &filtered_ia_data, const Util::BitSet &inc_atom_mask)
 Filters an MMFF94 interaction-data set, retaining only those interactions that exclusively reference atoms in inc_atom_mask. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcSquaredDistance (const CoordsVec &atom1_pos, const CoordsVec &atom2_pos)
 Calculates the squared distance \( r_{ij}^2 \) between two atoms i and j. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcDistance (const CoordsVec &atom1_pos, const CoordsVec &atom2_pos)
 Calculates the distance \( r_{ij} \) between two atoms i and j. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcBondLengthsAndAngleCos (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, ValueType &bond_length1, ValueType &bond_length2)
 Calculates bond lengths \( r_{ij} \) and \( r_{jk} \) and the cosine of the bond angle \( \vartheta_{ijk} \) between the two bonds i-j and j-k. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcBondLengthsAndAngle (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, ValueType &bond_length1, ValueType &bond_length2)
 Calculates bond lengths \( r_{ij} \) and \( r_{jk} \) and the bond angle \( \vartheta_{ijk} \) between the two bonds i-j and j-k. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcBondAngleCos (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos)
 Calculates the cosine of the bond angle \( \vartheta_{ijk} \) between the two bonds i-j and j-k. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcBondAngleCos (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, const ValueType &r_ij, const ValueType &r_jk)
 Calculates the cosine of the bond angle \( \vartheta_{ijk} \) between the two bonds i-j and j-k. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcBondAngle (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos)
 Calculates the bond angle \( \vartheta_{ijk} \) between the two bonds i-j and j-k. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcBondAngle (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, const ValueType &r_ij, const ValueType &r_jk)
 Calculates the bond angle \( \vartheta_{ijk} \) between the two bonds i-j and j-k. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcOutOfPlaneAngle (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, const CoordsVec &oop_atom_pos)
 Calculates the out-of-plane angle \( \chi_{ijk;l} \) between the bond j-l and the plane defined by the atoms i-j-k. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcOutOfPlaneAngle (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, const CoordsVec &oop_atom_pos, const ValueType &r_jl)
 Calculates the out-of-plane angle \( \chi_{ijk;l} \) between the bond j-l and the plane defined by the atoms i-j-k. More...
 
template<typename ValueType , typename CoordsVec >
ValueType calcDihedralAngleCos (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom1_pos, const CoordsVec &ctr_atom2_pos, const CoordsVec &term_atom2_pos)
 Calculates the cosine of the dihedral angle \( \Phi_{ijkl} \) between the planes defined by the atom triplets i-j-k and j-k-l. More...
 
template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType calcDistanceDerivatives (const CoordsVec &atom1_pos, const CoordsVec &atom2_pos, GradVec &atom1_deriv, GradVec &atom2_deriv)
 Calculates the partial derivatives \( \frac{\partial r_{ij}}{\partial \vec{p_x}} \) of the distance \( r_{ij} \) between two atoms i and j. More...
 
template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType calcBondAngleCosDerivatives (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, GradVec &term_atom1_deriv, GradVec &ctr_atom_deriv, GradVec &term_atom2_deriv)
 Calculates the partial derivatives \( \frac{\partial \cos(\vartheta_{ijk})}{\partial \vec{p_x}} \) of the of the cosine of the angle \( \vartheta_{ijk} \) between the bonds i-j and j-k. More...
 
template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType calcDihedralAngleCosDerivatives (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom1_pos, const CoordsVec &ctr_atom2_pos, const CoordsVec &term_atom2_pos, GradVec &term_atom1_deriv, GradVec &ctr_atom1_deriv, GradVec &ctr_atom2_deriv, GradVec &term_atom2_deriv)
 Calculates the partial derivatives \( \frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_x}} \) of the cosine of the angle \( \Phi_{ijkl} \) between the planes defined by the atom triplets i-j-k and j-k-l. More...
 
template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType calcOutOfPlaneAngleCosDerivatives (const CoordsVec &term_atom1_pos, const CoordsVec &ctr_atom_pos, const CoordsVec &term_atom2_pos, const CoordsVec &oop_atom_pos, GradVec &term_atom1_deriv, GradVec &ctr_atom_deriv, GradVec &term_atom2_deriv, GradVec &oop_atom_deriv)
 Calculates the partial derivatives \( \frac{\partial \cos(\omega_{ijk;l})}{\partial \vec{p_x}} \) of the cosine of the angle \( \omega_{ijk;l} \) between the bond j-l and the normal of the plane defined by the atoms i-j-k. More...
 

Detailed Description

Contains classes and functions related to molecular force fields.

Typedef Documentation

◆ ElasticPotentialList

Data structure for the storage of elastic potential parameter set records.

Since
1.1

◆ InteractionFilterFunction2

Generic wrapper for storing user-defined two-atom interaction filtering functions (see [FUNWRP]).

The function is invoked with the two interacting atoms and is expected to return true if the interaction should be considered, and false if it should be skipped.

◆ InteractionFilterFunction3

typedef std::function<bool(const Chem::Atom&, const Chem::Atom&, const Chem::Atom&)> CDPL::ForceField::InteractionFilterFunction3

Generic wrapper for storing user-defined three-atom interaction filtering functions (see [FUNWRP]).

The function is invoked with the three interacting atoms (typically used for angle-bending and stretch-bend interactions) and is expected to return true if the interaction should be considered, and false if it should be skipped.

◆ InteractionFilterFunction4

typedef std::function<bool(const Chem::Atom&, const Chem::Atom&, const Chem::Atom&, const Chem::Atom&)> CDPL::ForceField::InteractionFilterFunction4

Generic wrapper for storing user-defined four-atom interaction filtering functions (see [FUNWRP]).

The function is invoked with the four interacting atoms (typically used for torsion and out-of-plane bending interactions) and is expected to return true if the interaction should be considered, and false if it should be skipped.

◆ MMFF94AngleBendingInteractionList

Data structure for the storage of MMFF94 angle-bending interaction parameter set records.

◆ MMFF94BondStretchingInteractionList

Data structure for the storage of MMFF94 bond-stretching interaction parameter set records.

◆ MMFF94ElectrostaticInteractionList

Data structure for the storage of MMFF94 electrostatic interaction parameter set records.

◆ MMFF94OutOfPlaneBendingInteractionList

Data structure for the storage of MMFF94 out-of-plane bending interaction parameter set records.

◆ MMFF94NumericAtomTypeFunction

typedef std::function<unsigned int(const Chem::Atom&)> CDPL::ForceField::MMFF94NumericAtomTypeFunction

Generic wrapper class used to store a user-defined numeric MMFF94 atom type function.

◆ MMFF94SymbolicAtomTypeFunction

typedef std::function<const std::string&(const Chem::Atom&)> CDPL::ForceField::MMFF94SymbolicAtomTypeFunction

Generic wrapper class used to store a user-defined symbolic MMFF94 atom type function.

◆ MMFF94AtomChargeFunction

typedef std::function<double(const Chem::Atom&)> CDPL::ForceField::MMFF94AtomChargeFunction

Generic wrapper class used to store a user-defined MMFF94 partial atom charge function.

◆ MMFF94BondTypeIndexFunction

typedef std::function<unsigned int(const Chem::Bond&)> CDPL::ForceField::MMFF94BondTypeIndexFunction

Generic wrapper class used to store a user-defined MMFF94 bond type index function.

◆ MMFF94RingSetFunction

Generic wrapper class used to store a user-defined MMFF94 ring set function.

◆ MMFF94StretchBendInteractionList

Data structure for the storage of MMFF94 stretch-bend coupling interaction parameter set records.

◆ MMFF94TorsionInteractionList

Data structure for the storage of MMFF94 torsion interaction parameter set records.

◆ MMFF94VanDerWaalsInteractionList

Data structure for the storage of MMFF94 Van der Waals interaction parameter set records.

◆ TopologicalAtomDistanceFunction

typedef std::function<std::size_t(const Chem::Atom&, const Chem::Atom&, const Chem::MolecularGraph&)> CDPL::ForceField::TopologicalAtomDistanceFunction

Generic wrapper class used to store a user-defined topological atom-pair distance function.

Function Documentation

◆ getMMFF94SymbolicType()

CDPL_FORCEFIELD_API const std::string& CDPL::ForceField::getMMFF94SymbolicType ( const Chem::Atom atom)

Returns the value of the ForceField::AtomProperty::MMFF94_SYMBOLIC_TYPE property of atom.

Parameters
atomThe atom.
Returns
The symbolic MMFF94 atom type.

◆ setMMFF94SymbolicType()

CDPL_FORCEFIELD_API void CDPL::ForceField::setMMFF94SymbolicType ( Chem::Atom atom,
const std::string &  type 
)

Sets the value of the ForceField::AtomProperty::MMFF94_SYMBOLIC_TYPE property of atom to type.

Parameters
atomThe atom.
typeThe new symbolic MMFF94 atom type.

◆ clearMMFF94SymbolicType()

CDPL_FORCEFIELD_API void CDPL::ForceField::clearMMFF94SymbolicType ( Chem::Atom atom)

Removes the ForceField::AtomProperty::MMFF94_SYMBOLIC_TYPE property from atom.

Parameters
atomThe atom.

◆ hasMMFF94SymbolicType()

CDPL_FORCEFIELD_API bool CDPL::ForceField::hasMMFF94SymbolicType ( const Chem::Atom atom)

Tells whether atom carries an explicit ForceField::AtomProperty::MMFF94_SYMBOLIC_TYPE property.

Parameters
atomThe atom.
Returns
true if the symbolic MMFF94 atom type is set, and false otherwise.

◆ getMMFF94NumericType()

CDPL_FORCEFIELD_API unsigned int CDPL::ForceField::getMMFF94NumericType ( const Chem::Atom atom)

Returns the value of the ForceField::AtomProperty::MMFF94_NUMERIC_TYPE property of atom.

Parameters
atomThe atom.
Returns
The numeric MMFF94 atom type.

◆ setMMFF94NumericType()

CDPL_FORCEFIELD_API void CDPL::ForceField::setMMFF94NumericType ( Chem::Atom atom,
unsigned int  type 
)

Sets the value of the ForceField::AtomProperty::MMFF94_NUMERIC_TYPE property of atom to type.

Parameters
atomThe atom.
typeThe new numeric MMFF94 atom type.

◆ clearMMFF94NumericType()

CDPL_FORCEFIELD_API void CDPL::ForceField::clearMMFF94NumericType ( Chem::Atom atom)

Removes the ForceField::AtomProperty::MMFF94_NUMERIC_TYPE property from atom.

Parameters
atomThe atom.

◆ hasMMFF94NumericType()

CDPL_FORCEFIELD_API bool CDPL::ForceField::hasMMFF94NumericType ( const Chem::Atom atom)

Tells whether atom carries an explicit ForceField::AtomProperty::MMFF94_NUMERIC_TYPE property.

Parameters
atomThe atom.
Returns
true if the numeric MMFF94 atom type is set, and false otherwise.

◆ getMMFF94Charge()

CDPL_FORCEFIELD_API double CDPL::ForceField::getMMFF94Charge ( const Chem::Atom atom)

Returns the value of the ForceField::AtomProperty::MMFF94_CHARGE property of atom.

Parameters
atomThe atom.
Returns
The MMFF94 partial atomic charge.

◆ setMMFF94Charge()

CDPL_FORCEFIELD_API void CDPL::ForceField::setMMFF94Charge ( Chem::Atom atom,
double  charge 
)

Sets the value of the ForceField::AtomProperty::MMFF94_CHARGE property of atom to charge.

Parameters
atomThe atom.
chargeThe new MMFF94 partial atomic charge.

◆ clearMMFF94Charge()

CDPL_FORCEFIELD_API void CDPL::ForceField::clearMMFF94Charge ( Chem::Atom atom)

Removes the ForceField::AtomProperty::MMFF94_CHARGE property from atom.

Parameters
atomThe atom.

◆ hasMMFF94Charge()

CDPL_FORCEFIELD_API bool CDPL::ForceField::hasMMFF94Charge ( const Chem::Atom atom)

Tells whether atom carries an explicit ForceField::AtomProperty::MMFF94_CHARGE property.

Parameters
atomThe atom.
Returns
true if the MMFF94 partial atomic charge is set, and false otherwise.

◆ getUFFType()

CDPL_FORCEFIELD_API unsigned int CDPL::ForceField::getUFFType ( const Chem::Atom atom)

Returns the value of the ForceField::AtomProperty::UFF_TYPE property of atom.

Parameters
atomThe atom.
Returns
The numeric UFF atom type.

◆ setUFFType()

CDPL_FORCEFIELD_API void CDPL::ForceField::setUFFType ( Chem::Atom atom,
unsigned int  type 
)

Sets the value of the ForceField::AtomProperty::UFF_TYPE property of atom to type.

Parameters
atomThe atom.
typeThe new numeric UFF atom type.

◆ clearUFFType()

CDPL_FORCEFIELD_API void CDPL::ForceField::clearUFFType ( Chem::Atom atom)

Removes the ForceField::AtomProperty::UFF_TYPE property from atom.

Parameters
atomThe atom.

◆ hasUFFType()

CDPL_FORCEFIELD_API bool CDPL::ForceField::hasUFFType ( const Chem::Atom atom)

Tells whether atom carries an explicit ForceField::AtomProperty::UFF_TYPE property.

Parameters
atomThe atom.
Returns
true if the numeric UFF atom type is set, and false otherwise.

◆ perceiveUFFType()

CDPL_FORCEFIELD_API unsigned int CDPL::ForceField::perceiveUFFType ( const Chem::Atom atom,
const Chem::MolecularGraph molgraph 
)

Perceives the UFF atom type of atom in the context of the molecular graph molgraph.

Parameters
atomThe atom whose UFF type is to be perceived.
molgraphThe molecular graph providing the atom environment for type perception.
Returns
The perceived numeric UFF atom type.

◆ getMMFF94TypeIndex()

CDPL_FORCEFIELD_API unsigned int CDPL::ForceField::getMMFF94TypeIndex ( const Chem::Bond bond)

Returns the value of the ForceField::BondProperty::MMFF94_TYPE_INDEX property of bond.

Parameters
bondThe bond.
Returns
The MMFF94 bond type index.

◆ setMMFF94TypeIndex()

CDPL_FORCEFIELD_API void CDPL::ForceField::setMMFF94TypeIndex ( Chem::Bond bond,
unsigned int  type_idx 
)

Sets the value of the ForceField::BondProperty::MMFF94_TYPE_INDEX property of bond to type_idx.

Parameters
bondThe bond.
type_idxThe new MMFF94 bond type index.

◆ clearMMFF94TypeIndex()

CDPL_FORCEFIELD_API void CDPL::ForceField::clearMMFF94TypeIndex ( Chem::Bond bond)

Removes the ForceField::BondProperty::MMFF94_TYPE_INDEX property from bond.

Parameters
bondThe bond.

◆ hasMMFF94TypeIndex()

CDPL_FORCEFIELD_API bool CDPL::ForceField::hasMMFF94TypeIndex ( const Chem::Bond bond)

Tells whether bond carries an explicit ForceField::BondProperty::MMFF94_TYPE_INDEX property.

Parameters
bondThe bond.
Returns
true if the MMFF94 bond type index is set, and false otherwise.

◆ calcElasticPotentialEnergy() [1/3]

template<typename ValueType , typename Iter , typename CoordsArray >
ValueType CDPL::ForceField::calcElasticPotentialEnergy ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords 
)

Accumulates the energies calculated for the elastic potentials specified by the iterators in the given range.

Template Parameters
ValueTypeThe energy/atom coordinate value type.
IterThe iterator type yielding ForceField::ElasticPotential instances.
CoordsArrayThe array type storing the atom 3D coordinates.
Parameters
begIterator pointing to the first elastic potential parameter set.
endIterator pointing past the last elastic potential parameter set.
coordsThe atom 3D coordinates for which the energies shall be accumulated.
Returns
The accumulated elastic potential energies.
Since
1.1

◆ calcElasticPotentialEnergy() [2/3]

template<typename ValueType , typename CoordsArray >
ValueType CDPL::ForceField::calcElasticPotentialEnergy ( const ElasticPotential pot,
const CoordsArray &  coords 
)

Calculates the energy of a single elastic potential pot for the supplied atom coordinates coords.

Template Parameters
ValueTypeThe energy/atom coordinate value type.
CoordsArrayThe array type storing the atom 3D coordinates.
Parameters
potThe parameters of the elastic potential to evaluate.
coordsThe atom 3D coordinates for which the energy shall be calculated.
Returns
The calculated elastic potential energy.
Since
1.1

◆ calcElasticPotentialEnergy() [3/3]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcElasticPotentialEnergy ( const CoordsVec &  atom1_pos,
const CoordsVec &  atom2_pos,
const ValueType &  force_const,
const ValueType &  ref_length 
)

Calculates the energy \( E_{ij} \) of an elastic potential applied on a pair of atoms i-j.

\( E_{ij} = k_{ij} \: \Delta r_{ij}^2 \)

where
\( k_{ij} \) = the force constant of the elastic potential.
\( \Delta r_{ij} \) = \( r_{ij} - r_{ij}^0 \), the difference between actual and reference distance of the atoms i and j.

Parameters
atom1_posThe position of atom i.
atom2_posThe position of atom j.
force_constThe force constant \( k_{ij} \).
ref_lengthThe reference distance \( r_{ij}^0 \).
Returns
The calculated elastic potential energy \( E_{ij} \).
Since
1.1

◆ calcElasticPotentialGradient() [1/3]

template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcElasticPotentialGradient ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords,
GradVector &  grad 
)

Accumulates the energies and gradient contributions calculated for the elastic potentials specified by the iterators in the given range.

Template Parameters
ValueTypeThe energy/atom coordinate value type.
IterThe iterator type yielding ForceField::ElasticPotential instances.
CoordsArrayThe array type storing the atom 3D coordinates.
GradVectorThe array type storing the atom gradient vectors.
Parameters
begIterator pointing to the first elastic potential parameter set.
endIterator pointing past the last elastic potential parameter set.
coordsThe atom 3D coordinates for which the energies/gradients shall be accumulated.
gradThe atom gradient vector array receiving the accumulated contributions.
Returns
The accumulated elastic potential energies.
Note
Gradient contributions for an atom are added to the corresponding entry of grad.
Since
1.1

◆ calcElasticPotentialGradient() [2/3]

template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcElasticPotentialGradient ( const ElasticPotential pot,
const CoordsArray &  coords,
GradVector &  grad 
)

Calculates the energy and gradient contribution of a single elastic potential pot for the supplied atom coordinates coords.

Template Parameters
ValueTypeThe energy/atom coordinate value type.
CoordsArrayThe array type storing the atom 3D coordinates.
GradVectorThe array type storing the atom gradient vectors.
Parameters
potThe parameters of the elastic potential to evaluate.
coordsThe atom 3D coordinates for which the energies/gradients shall be calculated.
gradThe atom gradient vector array receiving the accumulated contributions.
Returns
The calculated elastic potential energy.
Note
Gradient contributions for the two atoms are added to the corresponding entries of grad.
Since
1.1

◆ calcElasticPotentialGradient() [3/3]

template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType CDPL::ForceField::calcElasticPotentialGradient ( const CoordsVec &  atom1_pos,
const CoordsVec &  atom2_pos,
GradVec &  atom1_grad,
GradVec &  atom2_grad,
const ValueType &  force_const,
const ValueType &  ref_length 
)

Calculates the elastic potential energy gradient \( \nabla E_{ij} \) for a pair of atoms i-j.

Energy function:

\( E_{ij} = k_{ij} \: \Delta r_{ij}^2 \)

The partial derivatives with respect to the atom coordinates \( \vec{p_x} \) are calculated by:

\( \frac{\partial E_{ij}}{\partial \vec{p_x}} = \frac{\partial E_{ij}}{\partial \Delta r_{ij}} \: \frac{\partial \Delta r_{ij}}{\partial \vec{p_x}} \)

\( \frac{\partial E_{ij}}{\partial \Delta r_{ij}} = 2 \: \Delta r_{ij} \: k_{ij} \)

for the calculation of the partial derivatives \( \frac{\partial \Delta r_{ij}}{\partial \vec{p_x}} \) see calcDistanceDerivatives().

where
\( k_{ij} \) = the force constant of the elastic potential.
\( \Delta r_{ij} \) = \( r_{ij} - r_{ij}^0 \), the difference between actual and reference distance of the atoms i and j.
\( \vec{p_x} \) = coordinates of the atoms i and j.

Parameters
atom1_posThe position \( \vec{p_i} \) of atom i.
atom2_posThe position \( \vec{p_j} \) of atom j.
atom1_gradThe output variable storing the accumulated energy gradient contributions for atom i.
atom2_gradThe output variable storing the accumulated energy gradient contributions for atom j.
force_constThe force constant \( k_{ij} \).
ref_lengthThe reference distance \( r_{ij}^0 \).
Returns
The calculated elastic potential energy \( E_{ij} \).
Note
The calculated partial energy derivative (see above) for an atom gets added to the corresponding output variable!
Since
1.1

◆ calcMMFF94BondStretchingEnergy() [1/4]

template<typename ValueType , typename Iter , typename CoordsArray >
ValueType CDPL::ForceField::calcMMFF94BondStretchingEnergy ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords 
)

Sums the bond-stretching interaction energies of all MMFF94 bond-stretching interactions in the iterator range [beg, end).

Template Parameters
ValueTypeThe result value type.
IterThe iterator type over MMFF94BondStretchingInteraction records.
CoordsArrayThe atom-coordinates array type (indexable via atom index).
Parameters
begAn iterator pointing to the first interaction.
endAn iterator pointing one past the last interaction.
coordsThe atom-coordinates array providing the geometry.
Returns
The summed bond-stretching interaction energy.

◆ calcMMFF94BondStretchingEnergy() [2/4]

template<typename ValueType , typename CoordsArray >
ValueType CDPL::ForceField::calcMMFF94BondStretchingEnergy ( const MMFF94BondStretchingInteraction iaction,
const CoordsArray &  coords 
)

Calculates the bond-stretching interaction energy of iaction using the geometry from coords.

Template Parameters
ValueTypeThe result value type.
CoordsArrayThe atom-coordinates array type (indexable via atom index).
Parameters
iactionThe MMFF94 bond-stretching interaction record.
coordsThe atom-coordinates array providing the geometry.
Returns
The bond-stretching interaction energy of iaction.

◆ calcMMFF94BondStretchingEnergy() [3/4]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcMMFF94BondStretchingEnergy ( const CoordsVec &  atom1_pos,
const CoordsVec &  atom2_pos,
const ValueType &  force_const,
const ValueType &  ref_length 
)

Calculates the bond stretching interaction energy \( EB_{ij} \) for the bond i-j.

\( EB_{ij} = 143.9325 \: \frac{kb_{IJ}}{2} \: \Delta r_{ij}^2 \: (1 + cs \: \Delta r_{ij} + \frac{7}{12} \: cs^2 \: \Delta r_{ij}^2) \)

where
\( kb_{IJ} \) = the bond stretching force constant in \( \frac{md}{Ang} \) for bonded atoms i and j of types I and J.
\( \Delta r_{ij} \) = \( r_{ij} - r_{IJ}^0 \), the difference in angstroms between actual and reference bond lengths between bonded atoms i and j of types I and J (see calcDistance()).
\( cs \) = \( -2 \: Ang^{-1} \), the "cubic stretch" constant.

Note: throughout this description, the indices i, j, k, ... represent atoms; I, J, K, ... denote the corresponding numerical MMFF atom types (or, occasionally, the atomic species).

Parameters
atom1_posThe position of atom i.
atom2_posThe position of atom j.
force_constThe bond stretching force constant \( kb_{IJ} \).
ref_lengthThe reference bond length \( r_{IJ}^0 \).
Returns
The calculated bond stretching interaction energy \( EB_{ij} \).

◆ calcMMFF94BondStretchingEnergy() [4/4]

template<typename ValueType >
ValueType CDPL::ForceField::calcMMFF94BondStretchingEnergy ( const ValueType &  r_ij,
const ValueType &  force_const,
const ValueType &  ref_length 
)

Calculates the bond stretching interaction energy \( EB_{ij} \) for the bond i-j.

\( EB_{ij} = 143.9325 \: \frac{kb_{IJ}}{2} \: \Delta r_{ij}^2 \: (1 + cs \: \Delta r_{ij} + \frac{7}{12} \: cs^2 \: \Delta r_{ij}^2) \)

where
\( kb_{IJ} \) = the bond stretching force constant in \( \frac{md}{Ang} \) for bonded atoms i and j of types I and J.
\( \Delta r_{ij} \) = \( r_{ij} - r_{IJ}^0 \), the difference in angstroms between actual and reference bond lengths between bonded atoms i and j of types I and J (see calcDistance()).
\( cs \) = \( -2 \: Ang^{-1} \), the "cubic stretch" constant.

Note: throughout this description, the indices i, j, k, ... represent atoms; I, J, K, ... denote the corresponding numerical MMFF atom types (or, occasionally, the atomic species).

Parameters
r_ijThe length of the bond between atom i and j.
force_constThe bond stretching force constant \( kb_{IJ} \).
ref_lengthThe reference bond length \( r_{IJ}^0 \).
Returns
The calculated bond stretching interaction energy \( EB_{ij} \).

◆ calcMMFF94AngleBendingEnergy() [1/4]

template<typename ValueType , typename Iter , typename CoordsArray >
ValueType CDPL::ForceField::calcMMFF94AngleBendingEnergy ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords 
)

Sums the angle-bending interaction energies of all MMFF94 angle-bending interactions in the iterator range [beg, end).

Template Parameters
ValueTypeThe result value type.
IterThe iterator type over MMFF94AngleBendingInteraction records.
CoordsArrayThe atom-coordinates array type (indexable via atom index).
Parameters
begAn iterator pointing to the first interaction.
endAn iterator pointing one past the last interaction.
coordsThe atom-coordinates array providing the geometry.
Returns
The summed angle-bending interaction energy.

◆ calcMMFF94AngleBendingEnergy() [2/4]

template<typename ValueType , typename CoordsArray >
ValueType CDPL::ForceField::calcMMFF94AngleBendingEnergy ( const MMFF94AngleBendingInteraction iaction,
const CoordsArray &  coords 
)

Calculates the angle-bending interaction energy of iaction using the geometry from coords.

Template Parameters
ValueTypeThe result value type.
CoordsArrayThe atom-coordinates array type (indexable via atom index).
Parameters
iactionThe MMFF94 angle-bending interaction record.
coordsThe atom-coordinates array providing the geometry.
Returns
The angle-bending interaction energy of iaction.

◆ calcMMFF94AngleBendingEnergy() [3/4]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcMMFF94AngleBendingEnergy ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
bool  linear,
const ValueType &  force_const,
const ValueType &  ref_angle 
)

Calculates the angle bending interaction energy \( EA_{ijk} \) for two bonds i-j and j-k.

\( EA_{ijk} = 0.043844 \: \frac{ka_{IJK}}{2} \: \Delta \vartheta_{ijk}^2 \: (1 + cb \: \Delta \vartheta_{ijk}) \)

where
\( ka_{IJK} \) = angle bending force constant in \( \frac{md Ang}{rad^2} \) for the angle between atoms i, j and k of atom types I, J and K.
\( \Delta \vartheta_{ijk} \) = \( \vartheta_{ijk} - \vartheta_{IJK}^0 \), the difference between actual and reference i-j-k bond angles in degrees (see calcBondAngle()).
\( cb \) = \( -0.007 \: deg^{-1} \), the "cubic-bend" constant.

For linear or near-linear bond angles such as those which occur in alkynes, nitriles, isonitriles, azides, and diazo compounds, the form used in DREIDING and UFF is employed:

\( EA_{ijk} = 143.9325 \: ka_{IJK} \:(1 + \cos(\vartheta_{ijk})) \)

where \( ka_{IJK} \) and \( \vartheta_{ijk} \) are defined as above.

Parameters
term_atom1_posThe position of atom i.
ctr_atom_posThe position of the central atom j.
term_atom2_posThe position of atom k.
linearIf true, the bond angle is linear.
force_constThe angle bending force constant \( ka_{IJK} \).
ref_angleThe reference bond angle \( \vartheta_{IJK}^0 \).
Returns
The calculated angle bending interaction energy \( EA_{ijk} \).

◆ calcMMFF94AngleBendingEnergy() [4/4]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcMMFF94AngleBendingEnergy ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
const ValueType &  r_ij,
const ValueType &  r_jk,
bool  linear,
const ValueType &  force_const,
const ValueType &  ref_angle 
)

Calculates the angle bending interaction energy \( EA_{ijk} \) for two bonds i-j and j-k.

\( EA_{ijk} = 0.043844 \: \frac{ka_{IJK}}{2} \: \Delta \vartheta_{ijk}^2 \: (1 + cb \: \Delta \vartheta_{ijk}) \)

where
\( ka_{IJK} \) = angle bending force constant in \( \frac{md Ang}{rad^2} \) for the angle between atoms i, j and k of atom types I, J and K.
\( \Delta \vartheta_{ijk} \) = \( \vartheta_{ijk} - \vartheta_{IJK}^0 \), the difference between actual and reference i-j-k bond angles in degrees (see calcBondAngle()).
\( cb \) = \( -0.007 \: deg^{-1} \), the "cubic-bend" constant.

For linear or near-linear bond angles such as those which occur in alkynes, nitriles, isonitriles, azides, and diazo compounds, the form used in DREIDING and UFF is employed:

\( EA_{ijk} = 143.9325 \: ka_{IJK} \:(1 + \cos(\vartheta_{ijk})) \)

where \( ka_{IJK} \) and \( \vartheta_{ijk} \) are defined as above.

Parameters
term_atom1_posThe position of atom i.
ctr_atom_posThe position of the central atom j.
term_atom2_posThe position of atom k.
r_ijThe length of the bond between atom i and j.
r_jkThe length of the bond between atom j and k.
linearIf true, the bond angle is linear.
force_constThe angle bending force constant \( ka_{IJK} \).
ref_angleThe reference bond angle \( \vartheta_{IJK}^0 \).
Returns
The calculated angle bending interaction energy \( EA_{ijk} \).

◆ calcMMFF94StretchBendEnergy() [1/4]

template<typename ValueType , typename Iter , typename CoordsArray >
ValueType CDPL::ForceField::calcMMFF94StretchBendEnergy ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords 
)

Sums the stretch-bend coupling interaction energies of all MMFF94 stretch-bend interactions in the iterator range [beg, end).

Template Parameters
ValueTypeThe result value type.
IterThe iterator type over MMFF94StretchBendInteraction records.
CoordsArrayThe atom-coordinates array type (indexable via atom index).
Parameters
begAn iterator pointing to the first interaction.
endAn iterator pointing one past the last interaction.
coordsThe atom-coordinates array providing the geometry.
Returns
The summed stretch-bend interaction energy.

◆ calcMMFF94StretchBendEnergy() [2/4]

template<typename ValueType , typename CoordsArray >
ValueType CDPL::ForceField::calcMMFF94StretchBendEnergy ( const MMFF94StretchBendInteraction iaction,
const CoordsArray &  coords 
)

Calculates the stretch-bend coupling interaction energy of iaction using the geometry from coords.

Template Parameters
ValueTypeThe result value type.
CoordsArrayThe atom-coordinates array type (indexable via atom index).
Parameters
iactionThe MMFF94 stretch-bend interaction record.
coordsThe atom-coordinates array providing the geometry.
Returns
The stretch-bend interaction energy of iaction.

◆ calcMMFF94StretchBendEnergy() [3/4]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcMMFF94StretchBendEnergy ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
const ValueType &  ijk_force_const,
const ValueType &  kji_force_const,
const ValueType &  ref_angle,
const ValueType &  ref_length1,
const ValueType &  ref_length2 
)

Calculates the stretch-bend interaction energy \( EBA_{ijk} \) for two bonds i-j and j-k.

\( EBA_{ijk} = 2.51210 \: (kba_{IJK} \: \Delta r_{ij} + kba_{KJI} \: \Delta r_{kj}) \: \Delta \vartheta_{ijk} \)

where
\( kba_{IJK} \) = force constant in \( \frac{md}{rad} \) for i-j stretch coupled to i-j-k bend.
\( kba_{KJI} \) = force constant in \( \frac{md}{rad} \) for k-j stretch coupled to i-j-k bend.
\( \Delta r_{ij} \) = \( r_{ij} - r_{IJ}^0 \), the difference in angstroms between actual and reference bond lengths between bonded atoms i and j of types I and J.
\( \Delta r_{kj} \) = \( r_{kj} - r_{KJ}^0 \), the difference in angstroms between actual and reference bond lengths between bonded atoms k and j of types K and J.
\( \Delta \vartheta_{ijk} \) = \( \vartheta_{ijk} - \vartheta_{IJK}^0 \), the difference between actual and reference i-j-k bond angles in degrees.

For the calculation of \( r_{ij} \), \( r_{kj} \), and \( \vartheta_{ijk} \) see calcBondLengthsAndAngle().

Currently, stretch-bend interactions are omitted when the i-j-k interaction corresponds to a linear bond angle.

Parameters
term_atom1_posThe position of atom i.
ctr_atom_posThe position of the central atom j.
term_atom2_posThe position of atom k.
ijk_force_constThe stretch-bend force constant \( kba_{IJK} \).
kji_force_constThe stretch-bend force constant \( kba_{KJI} \).
ref_angleThe reference bond angle \( \vartheta_{IJK}^0 \).
ref_length1The reference bond length \( r_{IJ}^0 \).
ref_length2The reference bond length \( r_{KJ}^0 \).
Returns
The calculated stretch-bend interaction energy \( EBA_{ijk} \).

◆ calcMMFF94StretchBendEnergy() [4/4]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcMMFF94StretchBendEnergy ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
const ValueType &  r_ij,
const ValueType &  r_jk,
const ValueType &  ijk_force_const,
const ValueType &  kji_force_const,
const ValueType &  ref_angle,
const ValueType &  ref_length1,
const ValueType &  ref_length2 
)

Calculates the stretch-bend interaction energy \( EBA_{ijk} \) for two bonds i-j and j-k.

\( EBA_{ijk} = 2.51210 \: (kba_{IJK} \: \Delta r_{ij} + kba_{KJI} \: \Delta r_{kj}) \: \Delta \vartheta_{ijk} \)

where
\( kba_{IJK} \) = force constant in \( \frac{md}{rad} \) for i-j stretch coupled to i-j-k bend.
\( kba_{KJI} \) = force constant in \( \frac{md}{rad} \) for k-j stretch coupled to i-j-k bend.
\( \Delta r_{ij} \) = \( r_{ij} - r_{IJ}^0 \), the difference in angstroms between actual and reference bond lengths between bonded atoms i and j of types I and J.
\( \Delta r_{kj} \) = \( r_{kj} - r_{KJ}^0 \), the difference in angstroms between actual and reference bond lengths between bonded atoms k and j of types K and J.
\( \Delta \vartheta_{ijk} \) = \( \vartheta_{ijk} - \vartheta_{IJK}^0 \), the difference between actual and reference i-j-k bond angles in degrees.

For the calculation of \( r_{ij} \), \( r_{kj} \), and \( \vartheta_{ijk} \) see calcBondLengthsAndAngle().

Currently, stretch-bend interactions are omitted when the i-j-k interaction corresponds to a linear bond angle.

Parameters
term_atom1_posThe position of atom i.
ctr_atom_posThe position of the central atom j.
term_atom2_posThe position of atom k.
r_ijThe length of the bond between atom i and j.
r_jkThe length of the bond between atom j and k.
ijk_force_constThe stretch-bend force constant \( kba_{IJK} \).
kji_force_constThe stretch-bend force constant \( kba_{KJI} \).
ref_angleThe reference bond angle \( \vartheta_{IJK}^0 \).
ref_length1The reference bond length \( r_{IJ}^0 \).
ref_length2The reference bond length \( r_{KJ}^0 \).
Returns
The calculated stretch-bend interaction energy \( EBA_{ijk} \).

◆ calcMMFF94OutOfPlaneBendingEnergy() [1/4]

template<typename ValueType , typename Iter , typename CoordsArray >
ValueType CDPL::ForceField::calcMMFF94OutOfPlaneBendingEnergy ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords 
)

Sums the out-of-plane bending interaction energies of all MMFF94 out-of-plane bending interactions in the iterator range [beg, end).

Template Parameters
ValueTypeThe result value type.
IterThe iterator type over MMFF94OutOfPlaneBendingInteraction records.
CoordsArrayThe atom-coordinates array type (indexable via atom index).
Parameters
begAn iterator pointing to the first interaction.
endAn iterator pointing one past the last interaction.
coordsThe atom-coordinates array providing the geometry.
Returns
The summed out-of-plane bending interaction energy.

◆ calcMMFF94OutOfPlaneBendingEnergy() [2/4]

template<typename ValueType , typename CoordsArray >
ValueType CDPL::ForceField::calcMMFF94OutOfPlaneBendingEnergy ( const MMFF94OutOfPlaneBendingInteraction iaction,
const CoordsArray &  coords 
)

Calculates the out-of-plane bending interaction energy of iaction using the geometry from coords.

Template Parameters
ValueTypeThe result value type.
CoordsArrayThe atom-coordinates array type (indexable via atom index).
Parameters
iactionThe MMFF94 out-of-plane bending interaction record.
coordsThe atom-coordinates array providing the geometry.
Returns
The out-of-plane bending interaction energy of iaction.

◆ calcMMFF94OutOfPlaneBendingEnergy() [3/4]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcMMFF94OutOfPlaneBendingEnergy ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
const CoordsVec &  oop_atom_pos,
const ValueType &  force_const 
)

Calculates the out-of-plane bending interaction energy \( EOOP_{ijk;l} \) for the bond j-l and the plane i-j-k.

\( EOOP_{ijk;l} = 0.043844 \: \frac{koop_{IJK \colon L}}{2} \: \chi_{ijk;l}^2 \)

where
\( koop_{IJK \colon L} \) = out-of-plane bending force constant in \( \frac{md Ang}{rad^2} \).
\( \chi_{ijk;l} \) = angle in degrees between the bond j-l and the plane i-j-k, where j is the central atom (see calcOutOfPlaneAngle()).

Parameters
term_atom1_posThe position of atom i.
ctr_atom_posThe position of the central atom j.
term_atom2_posThe position of atom k.
oop_atom_posThe position of the out-of-plane atom l.
force_constThe out-of-plane bending force constant \( koop_{IJK \colon L} \).
Returns
The calculated out-of-plane bending interaction energy \( EOOP_{ijk;l} \).

◆ calcMMFF94OutOfPlaneBendingEnergy() [4/4]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcMMFF94OutOfPlaneBendingEnergy ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
const CoordsVec &  oop_atom_pos,
const ValueType &  r_jl,
const ValueType &  force_const 
)

Calculates the out-of-plane bending interaction energy \( EOOP_{ijk;l} \) for the bond j-l and the plane i-j-k.

\( EOOP_{ijk;l} = 0.043844 \: \frac{koop_{IJK \colon L}}{2} \: \chi_{ijk;l}^2 \)

where
\( koop_{IJK \colon L} \) = out-of-plane bending force constant in \( \frac{md Ang}{rad^2} \).
\( \chi_{ijk;l} \) = angle in degrees between the bond j-l and the plane i-j-k, where j is the central atom (see calcOutOfPlaneAngle()).

Parameters
term_atom1_posThe position of atom i.
ctr_atom_posThe position of the central atom j.
term_atom2_posThe position of atom k.
oop_atom_posThe position of the out-of-plane atom l.
r_jlThe length of the bond between atom j and atom l.
force_constThe out-of-plane bending force constant \( koop_{IJK \colon L} \).
Returns
The calculated out-of-plane bending interaction energy \( EOOP_{ijk;l} \).

◆ calcMMFF94TorsionEnergy() [1/3]

template<typename ValueType , typename Iter , typename CoordsArray >
ValueType CDPL::ForceField::calcMMFF94TorsionEnergy ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords 
)

Sums the torsion interaction energies of all MMFF94 torsion interactions in the iterator range [beg, end).

Template Parameters
ValueTypeThe result value type.
IterThe iterator type over MMFF94TorsionInteraction records.
CoordsArrayThe atom-coordinates array type (indexable via atom index).
Parameters
begAn iterator pointing to the first interaction.
endAn iterator pointing one past the last interaction.
coordsThe atom-coordinates array providing the geometry.
Returns
The summed torsion interaction energy.

◆ calcMMFF94TorsionEnergy() [2/3]

template<typename ValueType , typename CoordsArray >
ValueType CDPL::ForceField::calcMMFF94TorsionEnergy ( const MMFF94TorsionInteraction iaction,
const CoordsArray &  coords 
)

Calculates the torsion interaction energy of iaction using the geometry from coords.

Template Parameters
ValueTypeThe result value type.
CoordsArrayThe atom-coordinates array type (indexable via atom index).
Parameters
iactionThe MMFF94 torsion interaction record.
coordsThe atom-coordinates array providing the geometry.
Returns
The torsion interaction energy of iaction.

◆ calcMMFF94TorsionEnergy() [3/3]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcMMFF94TorsionEnergy ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom1_pos,
const CoordsVec &  ctr_atom2_pos,
const CoordsVec &  term_atom2_pos,
const ValueType &  tor_param1,
const ValueType &  tor_param2,
const ValueType &  tor_param3 
)

Calculates the torsion interaction energy \( ET_{ijkl} \) for the central bond j-k and the connected bonds i-j and k-l.

\( ET_{ijkl} = 0.5 \: (V_1 \: (1 + \cos(\Phi_{ijkl})) + V_2 \: (1 - \cos(2 \: \Phi_{ijkl})) + V_3 \: (1 + \cos(3 \: \Phi_{ijkl}))) \)

where \( \Phi_{ijkl} \) is the i-j-k-l dihedral angle. The constants \( V_1 \), \( V_2 \) and \( V_3 \) depend on the atom types I, J, K and L for atoms i, j, k and l, where i-j, j-k and k-l are bonded pairs and i is not equal to l.

For the calculation of \( \cos(\Phi_{ijkl}) \) see calcDihedralAngleCos().

Parameters
term_atom1_posThe position of the terminal atom i.
ctr_atom1_posThe position of the central atom j.
ctr_atom2_posThe position of the central atom k.
term_atom2_posThe position of the terminal atom l.
tor_param1The torsion parameter \( V_1 \).
tor_param2The torsion parameter \( V_2 \).
tor_param3The torsion parameter \( V_3 \).
Returns
The calculated torsion interaction energy \( ET_{ijkl} \).

◆ calcMMFF94ElectrostaticEnergy() [1/4]

template<typename ValueType , typename Iter , typename CoordsArray >
ValueType CDPL::ForceField::calcMMFF94ElectrostaticEnergy ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords 
)

Sums the electrostatic interaction energies of all MMFF94 electrostatic interactions in the iterator range [beg, end).

Template Parameters
ValueTypeThe result value type.
IterThe iterator type over MMFF94ElectrostaticInteraction records.
CoordsArrayThe atom-coordinates array type (indexable via atom index).
Parameters
begAn iterator pointing to the first interaction.
endAn iterator pointing one past the last interaction.
coordsThe atom-coordinates array providing the geometry.
Returns
The summed electrostatic interaction energy.

◆ calcMMFF94ElectrostaticEnergy() [2/4]

template<typename ValueType , typename CoordsArray >
ValueType CDPL::ForceField::calcMMFF94ElectrostaticEnergy ( const MMFF94ElectrostaticInteraction iaction,
const CoordsArray &  coords 
)

Calculates the electrostatic interaction energy of iaction using the geometry from coords.

Template Parameters
ValueTypeThe result value type.
CoordsArrayThe atom-coordinates array type (indexable via atom index).
Parameters
iactionThe MMFF94 electrostatic interaction record.
coordsThe atom-coordinates array providing the geometry.
Returns
The electrostatic interaction energy of iaction.

◆ calcMMFF94ElectrostaticEnergy() [3/4]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcMMFF94ElectrostaticEnergy ( const CoordsVec &  atom1_pos,
const CoordsVec &  atom2_pos,
const ValueType &  atom1_chg,
const ValueType &  atom2_chg,
const ValueType &  scale_fact,
const ValueType &  de_const,
const ValueType &  dist_expo 
)

Calculates the electrostatic interaction energy \( EQ_{ij} \) for the atom pair i-j.

\( EQ_{ij} = S \: 332.0716 \: \frac{q_i \: q_j}{D \: (R_{ij} + \delta)^n} \)

where
\( S \) = a scaling factor depending on the topological distance of i-j.
\( q_i \) and \( q_j \) = Partial atomic charges.
\( D \) = Dielectric constant.
\( R_{ij} \) = Interatomic distance (Ã…) (see calcDistance()).
\( \delta \) = Electrostatic buffering constant (0.05 Ã…).
\( n \) = Exponent (normally 1, but can be 2 for distance-dependent dielectric constant).

Note: 1-4 electrostatic interactions are scaled by 0.75 (thus, the electrostatic energy term becomes \( EQ_{14} \: 0.75 \)).

Parameters
atom1_posThe position of atom i.
atom2_posThe position of atom j.
atom1_chgThe partial atom charge \( q_i \) of atom i.
atom2_chgThe partial atom charge \( q_j \) of atom j.
scale_factThe scaling factor for \( S \) depending on the topological i-j distance.
de_constThe dielectric constant \( D \).
dist_expoThe exponent \( n \).
Returns
The calculated electrostatic interaction energy \( EQ_{ij} \).

◆ calcMMFF94ElectrostaticEnergy() [4/4]

template<typename ValueType >
ValueType CDPL::ForceField::calcMMFF94ElectrostaticEnergy ( const ValueType &  r_ij,
const ValueType &  atom1_chg,
const ValueType &  atom2_chg,
const ValueType &  scale_fact,
const ValueType &  de_const,
const ValueType &  dist_expo 
)

Calculates the electrostatic interaction energy \( EQ_{ij} \) for the atom pair i-j.

\( EQ_{ij} = S \: 332.0716 \: \frac{q_i \: q_j}{D \: (R_{ij} + \delta)^n} \)

where
\( S \) = a scaling factor depending on the topological distance of i-j.
\( q_i \) and \( q_j \) = Partial atomic charges.
\( D \) = Dielectric constant.
\( R_{ij} \) = Interatomic distance (Ã…) (see calcDistance()).
\( \delta \) = Electrostatic buffering constant (0.05 Ã…).
\( n \) = Exponent (normally 1, but can be 2 for distance-dependent dielectric constant).

Note: 1-4 electrostatic interactions are scaled by 0.75 (thus, the electrostatic energy term becomes \( EQ_{14} \: 0.75 \)).

Parameters
r_ijThe interatomic distance \( R_{ij} \) of atom i and atom j.
atom1_chgThe partial atom charge \( q_i \) of atom i.
atom2_chgThe partial atom charge \( q_j \) of atom j.
scale_factThe scaling factor for \( S \) depending on the topological i-j distance.
de_constThe dielectric constant \( D \).
dist_expoThe exponent \( n \).
Returns
The calculated electrostatic interaction energy \( EQ_{ij} \).

◆ calcMMFF94VanDerWaalsEnergy() [1/4]

template<typename ValueType , typename Iter , typename CoordsArray >
ValueType CDPL::ForceField::calcMMFF94VanDerWaalsEnergy ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords 
)

Sums the Van der Waals interaction energies of all MMFF94 Van der Waals interactions in the iterator range [beg, end).

Template Parameters
ValueTypeThe result value type.
IterThe iterator type over MMFF94VanDerWaalsInteraction records.
CoordsArrayThe atom-coordinates array type (indexable via atom index).
Parameters
begAn iterator pointing to the first interaction.
endAn iterator pointing one past the last interaction.
coordsThe atom-coordinates array providing the geometry.
Returns
The summed Van der Waals interaction energy.

◆ calcMMFF94VanDerWaalsEnergy() [2/4]

template<typename ValueType , typename CoordsArray >
ValueType CDPL::ForceField::calcMMFF94VanDerWaalsEnergy ( const MMFF94VanDerWaalsInteraction iaction,
const CoordsArray &  coords 
)

Calculates the Van der Waals interaction energy of iaction using the geometry from coords.

Template Parameters
ValueTypeThe result value type.
CoordsArrayThe atom-coordinates array type (indexable via atom index).
Parameters
iactionThe MMFF94 Van der Waals interaction record.
coordsThe atom-coordinates array providing the geometry.
Returns
The Van der Waals interaction energy of iaction.

◆ calcMMFF94VanDerWaalsEnergy() [3/4]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcMMFF94VanDerWaalsEnergy ( const CoordsVec &  atom1_pos,
const CoordsVec &  atom2_pos,
const ValueType &  e_IJ,
const ValueType &  r_IJ,
const ValueType &  r_IJ_7 
)

Calculates the Van der Waals interaction energy \( E_{vdW_{ij}} \) for the atom pair i-j.

\( E_{vdW_{ij}} = \varepsilon_{IJ} \: (\frac{1.07 \: R_{IJ}^*}{(R_{ij} + 0.07 \: R_{IJ}^*)})^7 \: (\frac{1.12 \: R_{IJ}^{*^7}}{(R_{ij}^7 + 0.12 \: R_{IJ}^{*^7})} - 2) \;\;\;\; (1) \)

where
\( R_{ij} \) = the interatomic distance (see calcDistance()).
\( R_{II}^* = A_I \: \alpha_I^{PEXP} \;\;\;\; (2) \)
\( R_{IJ}^* = 0.5 \: (R_{II}^* + R_{JJ}^*) \: (1 + AFACT(1 - \exp(-BFACT \: \gamma_{IJ}^2))) \;\;\;\; (3) \)
\( \gamma_{IJ} = \frac{(R_{II}^* - R_{JJ}^*)}{(R_{II}^* + R_{JJ}^*)} \;\;\;\; (4) \)
\( \varepsilon_{IJ} = \frac{181.16 \: G_I \: GJ \: \alpha_I \: \alpha_J}{((\alpha_I / N_I)^{1/2} + (\alpha_J / N_J)^{1/2})} \: \frac{1}{R_{IJ}^{*^6}} \;\;\;\; (5) \)

MMFF employs a "Buffered 14-7" form (eq 1) together with an expression which relates the minimum-energy separation \( R_{II}^* \) to the atomic polarizability \( \alpha_I \) (eq 2), a specially formulated combination rule (eqs 3, 4), and a Slater-Kirkwood expression for the well depth \( \varepsilon_{IJ} \) (eq 5): The first non-comment line in the parameter file "MMFFVDW.PAR" contains five floating point numbers which define the variables PEXP, AFACT, BFACT, DARAD, and DAEPS, respectively. PEXP (currently 0.25), AFACT (currently 0.2) and BFACT (currently 12.0) are used in the equations shown above; DARAD and DAEPS are used as follows:

When either i or j is a hydrogen-bond donor, MMFF uses the simple arithmetic mean \( 0.5 \: (R_{II}^* + R_{JJ}^*) \) instead of eq 3 to obtain \( R_{IJ}^* \). If the i-j interaction is a donor-acceptor interaction, MMFF also scales \( R_{IJ}^* \) as given by eq 3 by DARAD (currently 0.8) and \( \varepsilon_{IJ} \) as given by eq 5 by DAEPS (currently 0.5).

Parameters
atom1_posThe position of atom i.
atom2_posThe position of atom j.
e_IJThe precalculated value \( \varepsilon_{IJ} \).
r_IJThe precalculated value \( R_{IJ}^* \).
r_IJ_7The precalculated value \( R_{IJ}^{*^7} \).
Returns
The calculated Van der Waals interaction energy \( E_{vdW_{ij}} \).

◆ calcMMFF94VanDerWaalsEnergy() [4/4]

template<typename ValueType >
ValueType CDPL::ForceField::calcMMFF94VanDerWaalsEnergy ( const ValueType &  r_ij,
const ValueType &  e_IJ,
const ValueType &  r_IJ,
const ValueType &  r_IJ_7 
)

Calculates the Van der Waals interaction energy \( E_{vdW_{ij}} \) for the atom pair i-j.

\( E_{vdW_{ij}} = \varepsilon_{IJ} \: (\frac{1.07 \: R_{IJ}^*}{(R_{ij} + 0.07 \: R_{IJ}^*)})^7 \: (\frac{1.12 \: R_{IJ}^{*^7}}{(R_{ij}^7 + 0.12 \: R_{IJ}^{*^7})} - 2) \;\;\;\; (1) \)

where
\( R_{ij} \) = the interatomic distance (see calcDistance()).
\( R_{II}^* = A_I \: \alpha_I^{PEXP} \;\;\;\; (2) \)
\( R_{IJ}^* = 0.5 \: (R_{II}^* + R_{JJ}^*) \: (1 + AFACT(1 - \exp(-BFACT \: \gamma_{IJ}^2))) \;\;\;\; (3) \)
\( \gamma_{IJ} = \frac{(R_{II}^* - R_{JJ}^*)}{(R_{II}^* + R_{JJ}^*)} \;\;\;\; (4) \)
\( \varepsilon_{IJ} = \frac{181.16 \: G_I \: GJ \: \alpha_I \: \alpha_J}{((\alpha_I / N_I)^{1/2} + (\alpha_J / N_J)^{1/2})} \: \frac{1}{R_{IJ}^{*^6}} \;\;\;\; (5) \)

MMFF employs a "Buffered 14-7" form (eq 1) together with an expression which relates the minimum-energy separation \( R_{II}^* \) to the atomic polarizability \( \alpha_I \) (eq 2), a specially formulated combination rule (eqs 3, 4), and a Slater-Kirkwood expression for the well depth \( \varepsilon_{IJ} \) (eq 5): The first non-comment line in the parameter file "MMFFVDW.PAR" contains five floating point numbers which define the variables PEXP, AFACT, BFACT, DARAD, and DAEPS, respectively. PEXP (currently 0.25), AFACT (currently 0.2) and BFACT (currently 12.0) are used in the equations shown above; DARAD and DAEPS are used as follows:

When either i or j is a hydrogen-bond donor, MMFF uses the simple arithmetic mean \( 0.5 \: (R_{II}^* + R_{JJ}^*) \) instead of eq 3 to obtain \( R_{IJ}^* \). If the i-j interaction is a donor-acceptor interaction, MMFF also scales \( R_{IJ}^* \) as given by eq 3 by DARAD (currently 0.8) and \( \varepsilon_{IJ} \) as given by eq 5 by DAEPS (currently 0.5).

Parameters
r_ijThe interatomic distance \( R_{ij} \) of atom i and atom j.
e_IJThe precalculated value \( \varepsilon_{IJ} \).
r_IJThe precalculated value \( R_{IJ}^* \).
r_IJ_7The precalculated value \( R_{IJ}^{*^7} \).
Returns
The calculated Van der Waals interaction energy \( E_{vdW_{ij}} \).

◆ calcMMFF94BondStretchingGradient() [1/3]

template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcMMFF94BondStretchingGradient ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords,
GradVector &  grad 
)

Sums the MMFF94 bond-stretching interaction energies of the interactions in [beg, end) and accumulates the corresponding atom-position gradient contributions into grad.

Template Parameters
ValueTypeThe result value type.
IterThe iterator type over MMFF94BondStretchingInteraction records.
CoordsArrayThe atom-coordinates array type.
GradVectorThe atom-position gradient vector type.
Parameters
begAn iterator pointing to the first interaction.
endAn iterator pointing one past the last interaction.
coordsThe atom-coordinates array providing the geometry.
gradThe gradient vector to accumulate into.
Returns
The summed bond-stretching interaction energy.

◆ calcMMFF94BondStretchingGradient() [2/3]

template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcMMFF94BondStretchingGradient ( const MMFF94BondStretchingInteraction iaction,
const CoordsArray &  coords,
GradVector &  grad 
)

Calculates the bond-stretching interaction energy of iaction and accumulates the corresponding atom-position gradient contribution into grad.

Template Parameters
ValueTypeThe result value type.
CoordsArrayThe atom-coordinates array type.
GradVectorThe atom-position gradient vector type.
Parameters
iactionThe MMFF94 bond-stretching interaction record.
coordsThe atom-coordinates array providing the geometry.
gradThe gradient vector to accumulate into.
Returns
The bond-stretching interaction energy of iaction.

◆ calcMMFF94BondStretchingGradient() [3/3]

template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType CDPL::ForceField::calcMMFF94BondStretchingGradient ( const CoordsVec &  atom1_pos,
const CoordsVec &  atom2_pos,
GradVec &  atom1_grad,
GradVec &  atom2_grad,
const ValueType &  force_const,
const ValueType &  ref_length 
)

Calculates the bond stretching interaction energy gradient \( \nabla EB_{ij} \) for the bond i-j.

Energy function:

\( EB_{ij} = 143.9325 \: \frac{kb_{IJ}}{2} \: \Delta r_{ij}^2 \: (1 + cs \: \Delta r_{ij} + \frac{7}{12} \: cs^2 \: \Delta r_{ij}^2) \)

The partial derivatives with respect to the atom coordinates \( \vec{p_x} \) are calculated by:

\( \frac{\partial EB_{ij}}{\partial \vec{p_x}} = \frac{\partial EB_{ij}}{\partial \Delta r_{ij}} \: \frac{\partial \Delta r_{ij}}{\partial \vec{p_x}} \)

\( \frac{\partial EB_{ij}}{\partial \Delta r_{ij}} = (167.92125 \: \Delta r_{ij}^3 \: cs^2 + 215.89875 \: \Delta r_{ij}^2 \: cs + 143.9325 \: \Delta r_{ij}) \: kb_{IJ} \)

for the calculation of the partial derivatives \( \frac{\partial \Delta r_{ij}}{\partial \vec{p_x}} \) see calcDistanceDerivatives().

where
\( kb_{IJ} \) = the bond stretching force constant in \( \frac{md}{Ang} \) for bonded atoms i and j of types I and J.
\( \Delta r_{ij} \) = \( r_{ij} - r_{IJ}^0 \), the difference in angstroms between actual and reference bond lengths between bonded atoms i and j of types I and J.
\( cs \) = \( -2 \: Ang^{-1} \), the "cubic stretch" constant.
\( \vec{p_x} \) = coordinates of the involved atoms i and j.

Note: throughout this description, the indices i, j, k, ... represent atoms; I, J, K, ... denote the corresponding numerical MMFF atom types (or, occasionally, the atomic species).

Parameters
atom1_posThe position \( \vec{p_i} \) of atom i.
atom2_posThe position \( \vec{p_j} \) of atom j.
atom1_gradThe output variable storing the accumulated energy gradient contributions for atom i.
atom2_gradThe output variable storing the accumulated energy gradient contributions for atom j.
force_constThe bond stretching force constant \( kb_{IJ} \).
ref_lengthThe reference bond length \( r_{IJ}^0 \).
Returns
The calculated bond stretching interaction energy \( EB_{ij} \).
Note
The calculated partial energy derivative (see above) for an atom gets added to the corresponding output variable!

◆ calcMMFF94AngleBendingGradient() [1/3]

template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcMMFF94AngleBendingGradient ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords,
GradVector &  grad 
)

Sums the MMFF94 angle-bending interaction energies of the interactions in [beg, end) and accumulates the corresponding atom-position gradient contributions into grad.

Template Parameters
ValueTypeThe result value type.
IterThe iterator type over MMFF94AngleBendingInteraction records.
CoordsArrayThe atom-coordinates array type.
GradVectorThe atom-position gradient vector type.
Parameters
begAn iterator pointing to the first interaction.
endAn iterator pointing one past the last interaction.
coordsThe atom-coordinates array providing the geometry.
gradThe gradient vector to accumulate into.
Returns
The summed angle-bending interaction energy.

◆ calcMMFF94AngleBendingGradient() [2/3]

template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcMMFF94AngleBendingGradient ( const MMFF94AngleBendingInteraction iaction,
const CoordsArray &  coords,
GradVector &  grad 
)

Calculates the angle-bending interaction energy of iaction and accumulates the corresponding atom-position gradient contribution into grad.

Template Parameters
ValueTypeThe result value type.
CoordsArrayThe atom-coordinates array type.
GradVectorThe atom-position gradient vector type.
Parameters
iactionThe MMFF94 angle-bending interaction record.
coordsThe atom-coordinates array providing the geometry.
gradThe gradient vector to accumulate into.
Returns
The angle-bending interaction energy of iaction.

◆ calcMMFF94AngleBendingGradient() [3/3]

template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType CDPL::ForceField::calcMMFF94AngleBendingGradient ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
GradVec &  term_atom1_grad,
GradVec &  ctr_atom_grad,
GradVec &  term_atom2_grad,
bool  linear,
const ValueType &  force_const,
const ValueType &  ref_angle 
)

Calculates the angle bending interaction energy gradient \( \nabla EA_{ijk} \) for two bonds i-j and j-k.

Energy function employed for the non-linear case:

\( EA_{ijk} = 0.043844 \: \frac{ka_{IJK}}{2} \: \Delta \vartheta_{ijk}^2 \: (1 + cb \: \Delta \vartheta_{ijk}) \)

The partial derivatives with respect to the atom coordinates \( \vec{p_x} \) are calculated by:

\( \frac{\partial EA_{ijk}}{\partial \vec{p_x}} = \frac{\partial EA_{ijk}}{\partial \vartheta_{ijk}} \: \frac{\partial \vartheta_{ijk}}{\partial \cos(\vartheta_{ijk})} \: \frac{\partial \cos(\vartheta_{ijk})}{\vec{p_x}} \)

\( \frac{\partial EA_{ijk}}{\partial \vartheta_{ijk}} = -ka_{IJK} \: (86.58992538 \: \vartheta_{ijk}^2 - 3.022558594 \: \vartheta_{ijk} \: \vartheta_{IJK}^0 - 143.9313616 \: \vartheta_{ijk} + 0.02637679965 \: \vartheta_{IJK}^{0^2} + 2.512076157 \: \vartheta_{IJK}^0) \)

\( \frac{\partial \vartheta_{ijk}}{\partial \cos(\vartheta_{ijk})} = \frac{-1}{\sqrt{1 - \cos(\vartheta_{ijk})^2}} \)

for the calculation of the partial derivatives \( \frac{\partial \cos(\vartheta_{ijk})}{\vec{p_x}} \) see calcBondAngleCosDerivatives().

For linear or near-linear bond angles such as those which occur in alkynes, nitriles, isonitriles, azides, and diazo compounds, the energy function form used in DREIDING and UFF is employed:

\( EA_{ijk} = 143.9325 \: ka_{IJK} \:(1 + \cos(\vartheta_{ijk})) \)

The partial derivatives with respect to the atom coordinates \( \vec{p_x} \) are calculated by:

\( \frac{\partial EA_{ijk}}{\partial \vec{p_x}} = 143.9325 \: ka_{IJK} \: \frac{\partial \cos(\vartheta_{ijk})}{\vec{p_x}} \)

where
\( ka_{IJK} \) = angle bending force constant in \( \frac{md Ang}{rad^2} \) for the angle between atoms i, j and k of atom types I, J and K.
\( \Delta \vartheta_{ijk} \) = \( \vartheta_{ijk} - \vartheta_{IJK}^0 \), the difference between actual and reference i-j-k bond angles in degrees.
\( cb \) = \( -0.007 \: deg^{-1} \), the "cubic-bend" constant.
\( \vec{p_x} \) = coordinates of the involved atoms i, j and k.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of atom i.
ctr_atom_posThe position \( \vec{p_j} \) of the central atom j.
term_atom2_posThe position \( \vec{p_k} \) of atom k.
term_atom1_gradThe output variable storing the accumulated energy gradient contributions for atom i.
ctr_atom_gradThe output variable storing the accumulated energy gradient contributions for atom j.
term_atom2_gradThe output variable storing the accumulated energy gradient contributions for atom k.
linearIf true, the bond angle is linear.
force_constThe angle bending force constant \( ka_{IJK} \).
ref_angleThe reference bond angle \( \vartheta_{IJK}^0 \).
Returns
The calculated angle bending interaction energy \( EA_{ijk} \).
Note
The calculated partial energy derivative (see above) for an atom gets added to the corresponding output variable!

◆ calcMMFF94StretchBendGradient() [1/3]

template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcMMFF94StretchBendGradient ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords,
GradVector &  grad 
)

Sums the MMFF94 stretch-bend coupling interaction energies of the interactions in [beg, end) and accumulates the corresponding atom-position gradient contributions into grad.

Template Parameters
ValueTypeThe result value type.
IterThe iterator type over MMFF94StretchBendInteraction records.
CoordsArrayThe atom-coordinates array type.
GradVectorThe atom-position gradient vector type.
Parameters
begAn iterator pointing to the first interaction.
endAn iterator pointing one past the last interaction.
coordsThe atom-coordinates array providing the geometry.
gradThe gradient vector to accumulate into.
Returns
The summed stretch-bend interaction energy.

◆ calcMMFF94StretchBendGradient() [2/3]

template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcMMFF94StretchBendGradient ( const MMFF94StretchBendInteraction iaction,
const CoordsArray &  coords,
GradVector &  grad 
)

Calculates the stretch-bend coupling interaction energy of iaction and accumulates the corresponding atom-position gradient contribution into grad.

Template Parameters
ValueTypeThe result value type.
CoordsArrayThe atom-coordinates array type.
GradVectorThe atom-position gradient vector type.
Parameters
iactionThe MMFF94 stretch-bend interaction record.
coordsThe atom-coordinates array providing the geometry.
gradThe gradient vector to accumulate into.
Returns
The stretch-bend interaction energy of iaction.

◆ calcMMFF94StretchBendGradient() [3/3]

template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType CDPL::ForceField::calcMMFF94StretchBendGradient ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
GradVec &  term_atom1_grad,
GradVec &  ctr_atom_grad,
GradVec &  term_atom2_grad,
const ValueType &  ijk_force_const,
const ValueType &  kji_force_const,
const ValueType &  ref_angle,
const ValueType &  ref_length1,
const ValueType &  ref_length2 
)

Calculates the stretch-bend interaction energy gradient \( \nabla EBA_{ijk} \) for two bonds i-j and j-k.

Energy function:

\( EBA_{ijk} = 2.51210 \: (kba_{IJK} \: \Delta r_{ij} + kba_{KJI} \: \Delta r_{kj}) \: \Delta \vartheta_{ijk} \)

The partial derivatives with respect to the atom coordinates \( \vec{p_x} \) are calculated by:

\( \frac{\partial EBA_{ijk}}{\partial \vec{p_x}} = 2.5121 \: \Delta \vartheta_{ijk} \: (kba_{IJK} \: \frac{\partial \Delta r_{ij}}{\partial \vec{p_x}} + kba_{KJI} \: \frac{\partial \Delta r_{kj}}{\partial \vec{p_x}}) + 2.5121 \: \frac{\partial \Delta \vartheta_{ijk}}{\partial \vec{p_x}} \: (kba_{IJK} \: \Delta r_{ij} + kba_{KJI} \: \Delta r_{kj}) \)

\( \frac{\partial \Delta \vartheta_{ijk}}{\partial \vec{p_x}} = \frac{\partial \Delta \vartheta_{ijk}}{\partial \vartheta_{ijk}} \: \frac{\partial \vartheta_{ijk}}{\partial \cos(\vartheta_{ijk})} \: \frac{\partial \cos(\vartheta_{ijk})}{\vec{p_x}} \)
\( \frac{\partial \Delta \vartheta_{ijk}}{\partial \vartheta_{ijk}} = \frac{180}{\pi} \)
\( \frac{\partial \vartheta_{ijk}}{\partial \cos(\vartheta_{ijk})} = \frac{-1}{\sqrt{1 - \cos(\vartheta_{ijk})^2}} \)

for the calculation of the partial derivatives \( \frac{\partial \cos(\vartheta_{ijk})}{\vec{p_x}} \) see calcBondAngleCosDerivatives() and for the calculation of \( \frac{\partial \Delta r_{ij}}{\partial \vec{p_x}} \) see calcDistanceDerivatives().

where
\( kba_{IJK} \) = force constant in \( \frac{md}{rad} \) for i-j stretch coupled to i-j-k bend.
\( kba_{KJI} \) = force constant in \( \frac{md}{rad} \) for k-j stretch coupled to i-j-k bend.
\( \Delta r_{ij} \) = \( r_{ij} - r_{IJ}^0 \), the difference in angstroms between actual and reference bond lengths between bonded atoms i and j of types I and J.
\( \Delta r_{kj} \) = \( r_{kj} - r_{KJ}^0 \), the difference in angstroms between actual and reference bond lengths between bonded atoms k and j of types K and J.
\( \Delta \vartheta_{ijk} \) = \( \vartheta_{ijk} \: \frac{180}{\pi} - \vartheta_{IJK}^0 \), the difference between actual and reference i-j-k bond angles in degrees.
\( \vec{p_x} \) = coordinates of the involved atoms i, j and k.

Currently, stretch-bend interactions are omitted when the i-j-k interaction corresponds to a linear bond angle.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of atom i.
ctr_atom_posThe position \( \vec{p_j} \) of the central atom j.
term_atom2_posThe position \( \vec{p_k} \) of atom k.
term_atom1_gradThe output variable storing the accumulated energy gradient contributions for atom i.
ctr_atom_gradThe output variable storing the accumulated energy gradient contributions for atom j.
term_atom2_gradThe output variable storing the accumulated energy gradient contributions for atom k.
ijk_force_constThe stretch-bend force constant \( kba_{IJK} \).
kji_force_constThe stretch-bend force constant \( kba_{KJI} \).
ref_angleThe reference bond angle \( \vartheta_{IJK}^0 \).
ref_length1The reference bond length \( r_{IJ}^0 \).
ref_length2The reference bond length \( r_{KJ}^0 \).
Returns
The calculated stretch-bend interaction energy \( EBA_{ijk} \).
Note
The calculated partial energy derivative (see above) for an atom gets added to the corresponding output variable!

◆ calcMMFF94OutOfPlaneBendingGradient() [1/3]

template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcMMFF94OutOfPlaneBendingGradient ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords,
GradVector &  grad 
)

Sums the MMFF94 out-of-plane bending interaction energies of the interactions in [beg, end) and accumulates the corresponding atom-position gradient contributions into grad.

Template Parameters
ValueTypeThe result value type.
IterThe iterator type over MMFF94OutOfPlaneBendingInteraction records.
CoordsArrayThe atom-coordinates array type.
GradVectorThe atom-position gradient vector type.
Parameters
begAn iterator pointing to the first interaction.
endAn iterator pointing one past the last interaction.
coordsThe atom-coordinates array providing the geometry.
gradThe gradient vector to accumulate into.
Returns
The summed out-of-plane bending interaction energy.

◆ calcMMFF94OutOfPlaneBendingGradient() [2/3]

template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcMMFF94OutOfPlaneBendingGradient ( const MMFF94OutOfPlaneBendingInteraction iaction,
const CoordsArray &  coords,
GradVector &  grad 
)

Calculates the out-of-plane bending interaction energy of iaction and accumulates the corresponding atom-position gradient contribution into grad.

Template Parameters
ValueTypeThe result value type.
CoordsArrayThe atom-coordinates array type.
GradVectorThe atom-position gradient vector type.
Parameters
iactionThe MMFF94 out-of-plane bending interaction record.
coordsThe atom-coordinates array providing the geometry.
gradThe gradient vector to accumulate into.
Returns
The out-of-plane bending interaction energy of iaction.

◆ calcMMFF94OutOfPlaneBendingGradient() [3/3]

template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType CDPL::ForceField::calcMMFF94OutOfPlaneBendingGradient ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
const CoordsVec &  oop_atom_pos,
GradVec &  term_atom1_grad,
GradVec &  ctr_atom_grad,
GradVec &  term_atom2_grad,
GradVec &  oop_atom_grad,
const ValueType &  force_const 
)

Calculates the out-of-plane bending interaction energy gradient \( \nabla EOOP_{ijk;l} \) for the bond j-l and the plane i-j-k.

Energy function:

\( EOOP_{ijk;l} = 0.043844 \: \frac{koop_{IJK \colon L}}{2} \: (\chi_{ijk;l} \: \frac{180}{\pi})^2 \)

The partial derivatives with respect to the atom coordinates \( \vec{p_x} \) are calculated by:

\( \frac{\partial EOOP_{ijk;l}}{\partial \vec{p_x}} = \frac{\partial EOOP_{ijk;l}}{\partial \chi_{ijk;l}} \: \frac{\partial \chi_{ijk;l}}{\partial \cos(\alpha_{ijk;l})} \: \frac{\partial \cos(\alpha_{ijk;l})}{\partial \vec{p_x}} \)

\( \frac{\partial EOOP_{ijk;l}}{\partial \chi_{ijk;l}} = 0.043844 \: (\frac{180}{\pi})^2 \: \chi_{ijk;l} \: koop_{IJK \colon L} \)
\( \chi_{ijk;l} = \frac{\pi}{2} - \alpha_{ijk;l} \)
\( \frac{\partial \chi_{ijk;l}}{\partial \cos(\alpha_{ijk;l})} = \frac{-1}{\sqrt{1 - \cos(\alpha_{ijk;l})^2}} \)

for the calculation of the partial derivatives \( \frac{\partial \cos(\alpha_{ijk;l})}{\partial \vec{p_x}} \) see calcOutOfPlaneAngleCosDerivatives().

where
\( koop_{IJK \colon L} \) = out-of-plane bending force constant in \( \frac{md Ang}{rad^2} \).
\( \chi_{ijk;l} \) = angle in radians between the bond j-l and the plane i-j-k, where j is the central atom.
\( \vec{p_x} \) = coordinates of the involved atoms i, j, k and l.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of atom i.
ctr_atom_posThe position \( \vec{p_j} \) of the central atom j.
term_atom2_posThe position \( \vec{p_k} \) of atom k.
oop_atom_posThe position \( \vec{p_l} \) of the out-of-plane atom l.
term_atom1_gradThe output variable storing the accumulated energy gradient contributions for atom i.
ctr_atom_gradThe output variable storing the accumulated energy gradient contributions for atom j.
term_atom2_gradThe output variable storing the accumulated energy gradient contributions for atom k.
oop_atom_gradThe output variable storing the accumulated energy gradient contributions for atom l.
force_constThe out-of-plane bending force constant \( koop_{IJK \colon L} \).
Returns
The calculated out-of-plane bending interaction energy \( EOOP_{ijk;l} \).
Note
The calculated partial energy derivative (see above) for an atom gets added to the corresponding output variable!

◆ calcMMFF94TorsionGradient() [1/3]

template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcMMFF94TorsionGradient ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords,
GradVector &  grad 
)

Sums the MMFF94 torsion interaction energies of the interactions in [beg, end) and accumulates the corresponding atom-position gradient contributions into grad.

Template Parameters
ValueTypeThe result value type.
IterThe iterator type over MMFF94TorsionInteraction records.
CoordsArrayThe atom-coordinates array type.
GradVectorThe atom-position gradient vector type.
Parameters
begAn iterator pointing to the first interaction.
endAn iterator pointing one past the last interaction.
coordsThe atom-coordinates array providing the geometry.
gradThe gradient vector to accumulate into.
Returns
The summed torsion interaction energy.

◆ calcMMFF94TorsionGradient() [2/3]

template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcMMFF94TorsionGradient ( const MMFF94TorsionInteraction iaction,
const CoordsArray &  coords,
GradVector &  grad 
)

Calculates the torsion interaction energy of iaction and accumulates the corresponding atom-position gradient contribution into grad.

Template Parameters
ValueTypeThe result value type.
CoordsArrayThe atom-coordinates array type.
GradVectorThe atom-position gradient vector type.
Parameters
iactionThe MMFF94 torsion interaction record.
coordsThe atom-coordinates array providing the geometry.
gradThe gradient vector to accumulate into.
Returns
The torsion interaction energy of iaction.

◆ calcMMFF94TorsionGradient() [3/3]

template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType CDPL::ForceField::calcMMFF94TorsionGradient ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom1_pos,
const CoordsVec &  ctr_atom2_pos,
const CoordsVec &  term_atom2_pos,
GradVec &  term_atom1_grad,
GradVec &  ctr_atom1_grad,
GradVec &  ctr_atom2_grad,
GradVec &  term_atom2_grad,
const ValueType &  tor_param1,
const ValueType &  tor_param2,
const ValueType &  tor_param3 
)

Calculates the torsion interaction energy gradient \( \nabla ET_{ijkl} \) for the central bond j-k and the connected bonds i-j and k-l.

Energy function:

\( ET_{ijkl} = 0.5 \: (V_1 \: (1 + \cos(\Phi_{ijkl})) + V_2 \: (1 - \cos(2 \: \Phi_{ijkl})) + V_3 \: (1 + \cos(3 \: \Phi_{ijkl}))) \)

The partial derivatives with respect to the atom coordinates \( \vec{p_x} \) are calculated by:

\( \frac{\partial ET_{ijkl}}{\partial \vec{p_x}} = \frac{\partial ET_{ijkl}}{\partial \Phi_{ijkl}} \: \frac{\partial \Phi_{ijkl}}{\partial \cos(\Phi_{ijkl})} \: \frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_x}} \)

\( \frac{\partial ET_{ijkl}}{\partial \Phi_{ijkl}} = V_2 \: \sin(2 \: \Phi_{ijkl}) - 0.5 \: V_1 \: \sin(\Phi_{ijkl}) - 1.5 \: V_3 \: \sin(3 \: \Phi_{ijkl}) \)
\( \frac{\partial \Phi_{ijkl}}{\partial \cos(\Phi_{ijkl})} = \frac{-1}{\sqrt{1 - \cos(\Phi_{ijkl})^2}} \)

for the calculation of the partial derivatives \( \frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_x}} \) see calcDihedralAngleCosDerivatives().

where
\( \Phi_{ijkl} \) is the i-j-k-l dihedral angle. The constants \( V_1 \), \( V_2 \) and \( V_3 \) depend on the atom types I, J, K and L for atoms i, j, k and l, where i-j, j-k and k-l are bonded pairs and i is not equal to l.

\( \vec{p_x} \) = coordinates of the involved atoms i, j, k and l.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of the terminal atom i.
ctr_atom1_posThe position \( \vec{p_j} \) of the central atom j.
ctr_atom2_posThe position \( \vec{p_k} \) of the central atom k.
term_atom2_posThe position \( \vec{p_l} \) of the terminal atom l.
term_atom1_gradThe output variable storing the accumulated energy gradient contributions for atom i.
ctr_atom1_gradThe output variable storing the accumulated energy gradient contributions for atom j.
ctr_atom2_gradThe output variable storing the accumulated energy gradient contributions for atom k.
term_atom2_gradThe output variable storing the accumulated energy gradient contributions for atom l.
tor_param1The torsion parameter \( V_1 \).
tor_param2The torsion parameter \( V_2 \).
tor_param3The torsion parameter \( V_3 \).
Returns
The calculated torsion interaction energy \( ET_{ijkl} \).
Note
The calculated partial energy derivative (see above) for an atom gets added to the corresponding output variable!

◆ calcMMFF94ElectrostaticGradient() [1/3]

template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcMMFF94ElectrostaticGradient ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords,
GradVector &  grad 
)

Sums the MMFF94 electrostatic interaction energies of the interactions in [beg, end) and accumulates the corresponding atom-position gradient contributions into grad.

Template Parameters
ValueTypeThe result value type.
IterThe iterator type over MMFF94ElectrostaticInteraction records.
CoordsArrayThe atom-coordinates array type.
GradVectorThe atom-position gradient vector type.
Parameters
begAn iterator pointing to the first interaction.
endAn iterator pointing one past the last interaction.
coordsThe atom-coordinates array providing the geometry.
gradThe gradient vector to accumulate into.
Returns
The summed electrostatic interaction energy.

◆ calcMMFF94ElectrostaticGradient() [2/3]

template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcMMFF94ElectrostaticGradient ( const MMFF94ElectrostaticInteraction iaction,
const CoordsArray &  coords,
GradVector &  grad 
)

Calculates the electrostatic interaction energy of iaction and accumulates the corresponding atom-position gradient contribution into grad.

Template Parameters
ValueTypeThe result value type.
CoordsArrayThe atom-coordinates array type.
GradVectorThe atom-position gradient vector type.
Parameters
iactionThe MMFF94 electrostatic interaction record.
coordsThe atom-coordinates array providing the geometry.
gradThe gradient vector to accumulate into.
Returns
The electrostatic interaction energy of iaction.

◆ calcMMFF94ElectrostaticGradient() [3/3]

template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType CDPL::ForceField::calcMMFF94ElectrostaticGradient ( const CoordsVec &  atom1_pos,
const CoordsVec &  atom2_pos,
GradVec &  atom1_grad,
GradVec &  atom2_grad,
const ValueType &  atom1_chg,
const ValueType &  atom2_chg,
const ValueType &  scale_fact,
const ValueType &  de_const,
const ValueType &  dist_expo 
)

Calculates the electrostatic interaction energy gradient \( \nabla EQ_{ij} \) for the atom pair i-j.

Energy function:

\( EQ_{ij} = S \: 332.0716 \: \frac{q_i \: q_j}{D \: (R_{ij} + \delta)^n} \)

The partial derivatives with respect to the atom coordinates \( \vec{p_x} \) are calculated by:

\( \frac{\partial EQ_{ij}}{\partial \vec{p_x}} = \frac{\partial EQ_{ij}}{\partial R_{ij}} \: \frac{\partial R_{ij}}{\partial \vec{p_x}} \)

\( \frac{\partial EQ_{ij}}{\partial R_{ij}} = -S \: 332.0716 \: n \: \frac{q_i \: q_j}{D \: (R_{ij} + \delta)^{n + 1}} \)

for the calculation of the partial derivatives \( \frac{\partial R_{ij}}{\partial \vec{p_x}} \) see calcDistanceDerivatives().

where
\( S \) = a scaling factor depending on the topological distance of i-j.
\( q_i \) and \( q_j \) = partial atomic charges.
\( D \) = dielectric constant.
\( R_{ij} \) = interatomic distance (Ã…).
\( \delta \) = electrostatic buffering constant (0.05 Ã…).
\( n \) = exponent (normally 1, but can be 2 for distance-dependent dielectric constant).
\( \vec{p_x} \) = coordinates of the involved atoms i and j.

Note: 1-4 electrostatic interactions are scaled by 0.75 (thus, the electrostatic gradient term becomes \( EQ_{14} \: 0.75 \)).

Parameters
atom1_posThe position \( \vec{p_i} \) of atom i.
atom2_posThe position \( \vec{p_j} \) of atom j.
atom1_gradThe output variable storing the accumulated energy gradient contributions for atom i.
atom2_gradThe output variable storing the accumulated energy gradient contributions for atom j.
atom1_chgThe partial atom charge \( q_i \) of atom i.
atom2_chgThe partial atom charge \( q_j \) of atom j.
scale_factThe scaling factor for \( S \) depending on the topological i-j distance.
de_constThe dielectric constant \( D \).
dist_expoThe exponent \( n \).
Returns
The calculated electrostatic interaction energy \( EQ_{ij} \).
Note
The calculated partial energy derivative (see above) for an atom gets added to the corresponding output variable!

◆ calcMMFF94VanDerWaalsGradient() [1/3]

template<typename ValueType , typename Iter , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcMMFF94VanDerWaalsGradient ( Iter  beg,
const Iter &  end,
const CoordsArray &  coords,
GradVector &  grad 
)

Sums the MMFF94 Van der Waals interaction energies of the interactions in [beg, end) and accumulates the corresponding atom-position gradient contributions into grad.

Template Parameters
ValueTypeThe result value type.
IterThe iterator type over MMFF94VanDerWaalsInteraction records.
CoordsArrayThe atom-coordinates array type.
GradVectorThe atom-position gradient vector type.
Parameters
begAn iterator pointing to the first interaction.
endAn iterator pointing one past the last interaction.
coordsThe atom-coordinates array providing the geometry.
gradThe gradient vector to accumulate into.
Returns
The summed Van der Waals interaction energy.

◆ calcMMFF94VanDerWaalsGradient() [2/3]

template<typename ValueType , typename CoordsArray , typename GradVector >
ValueType CDPL::ForceField::calcMMFF94VanDerWaalsGradient ( const MMFF94VanDerWaalsInteraction iaction,
const CoordsArray &  coords,
GradVector &  grad 
)

Calculates the Van der Waals interaction energy of iaction and accumulates the corresponding atom-position gradient contribution into grad.

Template Parameters
ValueTypeThe result value type.
CoordsArrayThe atom-coordinates array type.
GradVectorThe atom-position gradient vector type.
Parameters
iactionThe MMFF94 Van der Waals interaction record.
coordsThe atom-coordinates array providing the geometry.
gradThe gradient vector to accumulate into.
Returns
The Van der Waals interaction energy of iaction.

◆ calcMMFF94VanDerWaalsGradient() [3/3]

template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType CDPL::ForceField::calcMMFF94VanDerWaalsGradient ( const CoordsVec &  atom1_pos,
const CoordsVec &  atom2_pos,
GradVec &  atom1_grad,
GradVec &  atom2_grad,
const ValueType &  e_IJ,
const ValueType &  r_IJ,
const ValueType &  r_IJ_7 
)

Calculates the Van der Waals interaction energy gradient \( \nabla E_{vdW_{ij}} \) for the atom pair i-j.

Energy function:
\( E_{vdW_{ij}} = \varepsilon_{IJ} \: (\frac{1.07 \: R_{IJ}^*}{(R_{ij} + 0.07 \: R_{IJ}^*)})^7 \: (\frac{1.12 \: R_{IJ}^{*^7}}{(R_{ij}^7 + 0.12 \: R_{IJ}^{*^7})} - 2) \;\;\;\; (1) \)

The partial derivatives with respect to the atom coordinates \( \vec{p_x} \) are calculated by:

\( \frac{\partial E_{vdW_{ij}}}{\partial \vec{p_x}} = \frac{\partial E_{vdW_{ij}}}{\partial R_{ij}} \: \frac{\partial R_{ij}}{\partial \vec{p_x}} \)

\( \frac{\partial E_{vdW_{ij}}}{\partial R_{ij}} = \frac{-R_{IJ}^{*^7} \: \varepsilon_{IJ}}{(R_{ij} + 0.07 \: R_{IJ}^*)^8 \: (R_{ij}^7 + 0.12 \: R_{IJ}^{*^7})^2} \: (-22.48094067 \: R_{ij}^{14} + 19.78322779 \: R_{ij}^7 \: R_{IJ}^{*^7} + 0.8812528743 \: R_{ij}^6 \: R_{IJ}^{*^8} + 1.186993667 \: R_{IJ}^{*^{14}}) \)

for the calculation of the partial derivatives \( \frac{\partial R_{ij}}{\partial \vec{p_x}} \) see calcDistanceDerivatives().

where
\( R_{ij} \) = the interatomic distance.
\( R_{II}^* = A_I \: \alpha_I^{PEXP} \;\;\;\; (2) \)
\( R_{IJ}^* = 0.5 \: (R_{II}^* + R_{JJ}^*) \: (1 + AFACT(1 - \exp(-BFACT \: \gamma_{IJ}^2))) \;\;\;\; (3) \)
\( \gamma_{IJ} = \frac{(R_{II}^* - R_{JJ}^*)}{(R_{II}^* + R_{JJ}^*)} \;\;\;\; (4) \)
\( \varepsilon_{IJ} = \frac{181.16 \: G_I \: GJ \: \alpha_I \: \alpha_J}{((\alpha_I / N_I)^{1/2} + (\alpha_J / N_J)^{1/2})} \: \frac{1}{R_{IJ}^{*6}} \;\;\;\; (5) \)
\( \vec{p_x} \) = coordinates of the involved atoms i and j.

MMFF employs a "Buffered 14-7" form (eq 1) together with an expression which relates the minimum-gradient separation \( R_{II}^* \) to the atomic polarizability \( \alpha_I \) (eq 2), a specially formulated combination rule (eqs 3, 4), and a Slater-Kirkwood expression for the well depth \( \varepsilon_{IJ} \) (eq 5): The first non-comment line in the parameter file "MMFFVDW.PAR" contains five floating point numbers which define the variables PEXP, AFACT, BFACT, DARAD, and DAEPS, respectively. PEXP (currently 0.25), AFACT (currently 0.2) and BFACT (currently 12.0) are used in the equations shown above; DARAD and DAEPS are used as follows:

When either i or j is a hydrogen-bond donor, MMFF uses the simple arithmetic mean \( 0.5 \: (R_{II}^* + R_{JJ}^*) \) instead of eq 3 to obtain \( R_{IJ}^* \). If the i-j interaction is a donor-acceptor interaction, MMFF also scales \( R_{IJ}^* \) as given by eq 3 by DARAD (currently 0.8) and \( \varepsilon_{IJ} \) as given by eq 5 by DAEPS (currently 0.5).

Parameters
atom1_posThe position \( \vec{p_i} \) of atom i.
atom2_posThe position \( \vec{p_j} \) of atom j.
atom1_gradThe output variable storing the accumulated energy gradient contributions for atom i.
atom2_gradThe output variable storing the accumulated energy gradient contributions for atom j.
e_IJThe precalculated value \( \varepsilon_{IJ} \).
r_IJThe precalculated value \( R_{IJ}^* \).
r_IJ_7The precalculated value \( R_{IJ}^{*^7} \).
Returns
The calculated Van der Waals interaction energy \( E_{vdW_{ij}} \).
Note
The calculated partial energy derivative (see above) for an atom gets added to the corresponding output variable!

◆ getMMFF94AromaticRings()

CDPL_FORCEFIELD_API const Chem::FragmentList::SharedPointer& CDPL::ForceField::getMMFF94AromaticRings ( const Chem::MolecularGraph molgraph)

Returns the value of the ForceField::MolecularGraphProperty::MMFF94_AROMATIC_RINGS property of molgraph.

Parameters
molgraphThe molecular graph.
Returns
A const reference to the list of MMFF94 aromatic rings.

◆ setMMFF94AromaticRings()

CDPL_FORCEFIELD_API void CDPL::ForceField::setMMFF94AromaticRings ( Chem::MolecularGraph molgraph,
const Chem::FragmentList::SharedPointer rings 
)

Sets the value of the ForceField::MolecularGraphProperty::MMFF94_AROMATIC_RINGS property of molgraph to rings.

Parameters
molgraphThe molecular graph.
ringsThe new list of MMFF94 aromatic rings.

◆ clearMMFF94AromaticRings()

CDPL_FORCEFIELD_API void CDPL::ForceField::clearMMFF94AromaticRings ( Chem::MolecularGraph molgraph)

Removes the ForceField::MolecularGraphProperty::MMFF94_AROMATIC_RINGS property from molgraph.

Parameters
molgraphThe molecular graph.

◆ hasMMFF94AromaticRings()

CDPL_FORCEFIELD_API bool CDPL::ForceField::hasMMFF94AromaticRings ( const Chem::MolecularGraph molgraph)

Tells whether molgraph carries an explicit ForceField::MolecularGraphProperty::MMFF94_AROMATIC_RINGS property.

Parameters
molgraphThe molecular graph.
Returns
true if the list of MMFF94 aromatic rings is set, and false otherwise.

◆ perceiveMMFF94AromaticRings() [1/2]

CDPL_FORCEFIELD_API Chem::FragmentList::SharedPointer CDPL::ForceField::perceiveMMFF94AromaticRings ( const Chem::MolecularGraph molgraph)

Perceives the list of MMFF94 aromatic rings of the molecular graph molgraph without storing the result.

Parameters
molgraphThe molecular graph.
Returns
A shared pointer to the perceived list of MMFF94 aromatic rings.

◆ perceiveMMFF94AromaticRings() [2/2]

CDPL_FORCEFIELD_API Chem::FragmentList::SharedPointer CDPL::ForceField::perceiveMMFF94AromaticRings ( Chem::MolecularGraph molgraph,
bool  overwrite 
)

Perceives the list of MMFF94 aromatic rings of molgraph and stores the result as the value of the ForceField::MolecularGraphProperty::MMFF94_AROMATIC_RINGS property.

Parameters
molgraphThe molecular graph.
overwriteSpecifies whether an already existing value of the property should be replaced.
Returns
A shared pointer to the perceived list of MMFF94 aromatic rings.

◆ assignMMFF94AtomTypes()

CDPL_FORCEFIELD_API void CDPL::ForceField::assignMMFF94AtomTypes ( Chem::MolecularGraph molgraph,
bool  strict,
bool  overwrite 
)

Assigns MMFF94 atom types to the atoms of molgraph.

Parameters
molgraphThe molecular graph whose atoms will be typed.
strictIf true, atom typing operates in strict MMFF94 mode (rejecting unsupported chemistries).
overwriteSpecifies whether already assigned atom-type properties should be replaced.

◆ assignMMFF94BondTypeIndices()

CDPL_FORCEFIELD_API void CDPL::ForceField::assignMMFF94BondTypeIndices ( Chem::MolecularGraph molgraph,
bool  strict,
bool  overwrite 
)

Assigns MMFF94 bond type indices to the bonds of molgraph.

Parameters
molgraphThe molecular graph whose bonds will be typed.
strictIf true, bond typing operates in strict MMFF94 mode (rejecting unsupported chemistries).
overwriteSpecifies whether already assigned bond-type-index properties should be replaced.

◆ calcMMFF94AtomCharges()

CDPL_FORCEFIELD_API void CDPL::ForceField::calcMMFF94AtomCharges ( Chem::MolecularGraph molgraph,
bool  strict,
bool  overwrite 
)

Calculates and assigns MMFF94 partial atomic charges to the atoms of molgraph.

Parameters
molgraphThe molecular graph whose atoms will be charged.
strictIf true, charge calculation operates in strict MMFF94 mode (rejecting unsupported chemistries).
overwriteSpecifies whether already assigned charge properties should be replaced.

◆ assignUFFAtomTypes()

CDPL_FORCEFIELD_API void CDPL::ForceField::assignUFFAtomTypes ( Chem::MolecularGraph molgraph,
bool  overwrite 
)

Assigns UFF atom types to the atoms of molgraph.

Parameters
molgraphThe molecular graph whose atoms will be typed.
overwriteSpecifies whether already assigned atom-type properties should be replaced.

◆ filterInteractions()

CDPL_FORCEFIELD_API void CDPL::ForceField::filterInteractions ( const MMFF94InteractionData ia_data,
MMFF94InteractionData filtered_ia_data,
const Util::BitSet inc_atom_mask 
)

Filters an MMFF94 interaction-data set, retaining only those interactions that exclusively reference atoms in inc_atom_mask.

Parameters
ia_dataThe input interaction-data set.
filtered_ia_dataThe output interaction-data set receiving the retained interactions.
inc_atom_maskA bit set whose set bits identify the atom indices that may appear in a retained interaction.

◆ calcSquaredDistance()

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcSquaredDistance ( const CoordsVec &  atom1_pos,
const CoordsVec &  atom2_pos 
)

Calculates the squared distance \( r_{ij}^2 \) between two atoms i and j.

\( r_{ij}^2 = |\vec{v_{ij}}|^2 \)

where
\( \vec{v_{ij}} = \vec{p_j} - \vec{p_i} \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.

Parameters
atom1_posThe position \( \vec{p_i} \) of atom i.
atom2_posThe position \( \vec{p_j} \) of atom j.
Returns
The calculated squared distance \( r_{ij}^2 \).

◆ calcDistance()

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcDistance ( const CoordsVec &  atom1_pos,
const CoordsVec &  atom2_pos 
)

Calculates the distance \( r_{ij} \) between two atoms i and j.

\( r_{ij} = |\vec{v_{ij}}| \)

where
\( \vec{v_{ij}} = \vec{p_j} - \vec{p_i} \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.

Parameters
atom1_posThe position \( \vec{p_i} \) of atom i.
atom2_posThe position \( \vec{p_j} \) of atom j.
Returns
The calculated distance \( r_{ij} \).

◆ calcBondLengthsAndAngleCos()

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcBondLengthsAndAngleCos ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
ValueType &  bond_length1,
ValueType &  bond_length2 
)

Calculates bond lengths \( r_{ij} \) and \( r_{jk} \) and the cosine of the bond angle \( \vartheta_{ijk} \) between the two bonds i-j and j-k.

\( r_{ij} = |\vec{v_{ij}}| \)
\( r_{jk} = |\vec{v_{jk}}| \)
\( \cos(\vartheta_{ijk}) = \frac{\vec{v_{ij}} \cdot \vec{v_{jk}}}{r_{ij} \: r_{jk}} \)

where
\( \vec{v_{ij}} = \vec{p_j} - \vec{p_i} \)
\( \vec{v_{jk}} = \vec{p_k} - \vec{p_j} \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.
\( \vec{p_k} \) = coordinates of atom k.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of the terminal atom i.
ctr_atom_posThe position \( \vec{p_j} \) of the central atom j.
term_atom2_posThe position \( \vec{p_k} \) of the terminal atom k.
bond_length1Output variable for the bond length \( r_{ij} \).
bond_length2Output variable for the bond length \( r_{jk} \).
Returns
The calculated cosine of the bond angle \( \vartheta_{ijk} \).

◆ calcBondLengthsAndAngle()

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcBondLengthsAndAngle ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
ValueType &  bond_length1,
ValueType &  bond_length2 
)

Calculates bond lengths \( r_{ij} \) and \( r_{jk} \) and the bond angle \( \vartheta_{ijk} \) between the two bonds i-j and j-k.

\( r_{ij} = |\vec{v_{ij}}| \)
\( r_{jk} = |\vec{v_{jk}}| \)
\( \vartheta_{ijk} = \arccos(\frac{\vec{v_{ij}} \cdot \vec{v_{jk}}}{r_{ij} \: r_{jk}}) \)

where
\( \vec{v_{ij}} = \vec{p_j} - \vec{p_i} \)
\( \vec{v_{jk}} = \vec{p_k} - \vec{p_j} \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.
\( \vec{p_k} \) = coordinates of atom k.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of the terminal atom i.
ctr_atom_posThe position \( \vec{p_j} \) of the central atom j.
term_atom2_posThe position \( \vec{p_k} \) of the terminal atom k.
bond_length1Output variable for the bond length \( r_{ij} \).
bond_length2Output variable for the bond length \( r_{jk} \).
Returns
The calculated bond angle \( \vartheta_{ijk} \).

◆ calcBondAngleCos() [1/2]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcBondAngleCos ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos 
)

Calculates the cosine of the bond angle \( \vartheta_{ijk} \) between the two bonds i-j and j-k.

\( \cos(\vartheta_{ijk}) = \frac{\vec{v_{ij}} \cdot \vec{v_{jk}}}{|\vec{v_{ij}}| \: |\vec{v_{jk}}|} \)

where
\( \vec{v_{ij}} = \vec{p_j} - \vec{p_i} \)
\( \vec{v_{jk}} = \vec{p_k} - \vec{p_j} \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.
\( \vec{p_k} \) = coordinates of atom k.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of the terminal atom i.
ctr_atom_posThe position \( \vec{p_j} \) of the central atom j.
term_atom2_posThe position \( \vec{p_k} \) of the terminal atom k.
Returns
The calculated cosine of the bond angle \( \vartheta_{ijk} \).

◆ calcBondAngleCos() [2/2]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcBondAngleCos ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
const ValueType &  r_ij,
const ValueType &  r_jk 
)

Calculates the cosine of the bond angle \( \vartheta_{ijk} \) between the two bonds i-j and j-k.

\( \cos(\vartheta_{ijk}) = \frac{\vec{v_{ij}} \cdot \vec{v_{jk}}}{|\vec{v_{ij}}| \: |\vec{v_{jk}}|} \)

where
\( \vec{v_{ij}} = \vec{p_j} - \vec{p_i} \)
\( \vec{v_{jk}} = \vec{p_k} - \vec{p_j} \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.
\( \vec{p_k} \) = coordinates of atom k.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of the terminal atom i.
ctr_atom_posThe position \( \vec{p_j} \) of the central atom j.
term_atom2_posThe position \( \vec{p_k} \) of the terminal atom k.
r_ijThe length of the bond between atom i and j.
r_jkThe length of the bond between atom j and k.
Returns
The calculated cosine of the bond angle \( \vartheta_{ijk} \).

◆ calcBondAngle() [1/2]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcBondAngle ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos 
)

Calculates the bond angle \( \vartheta_{ijk} \) between the two bonds i-j and j-k.

\( \vartheta_{ijk} = \arccos(\frac{\vec{v_{ij}} \cdot \vec{v_{jk}}}{|\vec{v_{ij}}| \: |\vec{v_{jk}}|}) \)

where
\( \vec{v_{ij}} = \vec{p_j} - \vec{p_i} \)
\( \vec{v_{jk}} = \vec{p_k} - \vec{p_j} \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.
\( \vec{p_k} \) = coordinates of atom k.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of the terminal atom i.
ctr_atom_posThe position \( \vec{p_j} \) of the central atom j.
term_atom2_posThe position \( \vec{p_k} \) of the terminal atom k.
Returns
The calculated bond angle \( \vartheta_{ijk} \).

◆ calcBondAngle() [2/2]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcBondAngle ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
const ValueType &  r_ij,
const ValueType &  r_jk 
)

Calculates the bond angle \( \vartheta_{ijk} \) between the two bonds i-j and j-k.

\( \vartheta_{ijk} = \arccos(\frac{\vec{v_{ij}} \cdot \vec{v_{jk}}}{|\vec{v_{ij}}| \: |\vec{v_{jk}}|}) \)

where
\( \vec{v_{ij}} = \vec{p_j} - \vec{p_i} \)
\( \vec{v_{jk}} = \vec{p_k} - \vec{p_j} \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.
\( \vec{p_k} \) = coordinates of atom k.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of the terminal atom i.
ctr_atom_posThe position \( \vec{p_j} \) of the central atom j.
term_atom2_posThe position \( \vec{p_k} \) of the terminal atom k.
r_ijThe length of the bond between atom i and j.
r_jkThe length of the bond between atom j and k.
Returns
The calculated bond angle \( \vartheta_{ijk} \).

◆ calcOutOfPlaneAngle() [1/2]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcOutOfPlaneAngle ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
const CoordsVec &  oop_atom_pos 
)

Calculates the out-of-plane angle \( \chi_{ijk;l} \) between the bond j-l and the plane defined by the atoms i-j-k.

\( \chi_{ijk;l} = \frac{\pi}{2} - \arccos(\frac{\vec{n_{ijk}} \cdot \vec{v_{jl}}}{|\vec{n_{ijk}}| \: |\vec{v_{jl}}|}) \)

where
\( \vec{v_{ji}} = \vec{p_i} - \vec{p_j} \)
\( \vec{v_{jk}} = \vec{p_k} - \vec{p_j} \)
\( \vec{v_{jl}} = \vec{p_l} - \vec{p_j} \)
\( \vec{n_{ijk}} = \vec{v_{ji}} \times \vec{v_{jk}} \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.
\( \vec{p_k} \) = coordinates of atom k.
\( \vec{p_l} \) = coordinates of atom l.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of the terminal atom i.
ctr_atom_posThe position \( \vec{p_j} \) of the central atom j.
term_atom2_posThe position \( \vec{p_k} \) of the terminal atom k.
oop_atom_posThe position \( \vec{p_l} \) of the out-of-plane atom l.
Returns
The calculated out-of-plane angle \( \chi_{ijk;l} \).

◆ calcOutOfPlaneAngle() [2/2]

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcOutOfPlaneAngle ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
const CoordsVec &  oop_atom_pos,
const ValueType &  r_jl 
)

Calculates the out-of-plane angle \( \chi_{ijk;l} \) between the bond j-l and the plane defined by the atoms i-j-k.

\( \chi_{ijk;l} = \frac{\pi}{2} - \arccos(\frac{\vec{n_{ijk}} \cdot \vec{v_{jl}}}{|\vec{n_{ijk}}| \: |\vec{v_{jl}}|}) \)

where
\( \vec{v_{ji}} = \vec{p_i} - \vec{p_j} \)
\( \vec{v_{jk}} = \vec{p_k} - \vec{p_j} \)
\( \vec{v_{jl}} = \vec{p_l} - \vec{p_j} \)
\( \vec{n_{ijk}} = \vec{v_{ji}} \times \vec{v_{jk}} \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.
\( \vec{p_k} \) = coordinates of atom k.
\( \vec{p_l} \) = coordinates of atom l.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of the terminal atom i.
ctr_atom_posThe position \( \vec{p_j} \) of the central atom j.
term_atom2_posThe position \( \vec{p_k} \) of the terminal atom k.
oop_atom_posThe position \( \vec{p_l} \) of the out-of-plane atom l.
r_jlThe length of the bond between atom j and atom l.
Returns
The calculated out-of-plane angle \( \chi_{ijk;l} \).

◆ calcDihedralAngleCos()

template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcDihedralAngleCos ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom1_pos,
const CoordsVec &  ctr_atom2_pos,
const CoordsVec &  term_atom2_pos 
)

Calculates the cosine of the dihedral angle \( \Phi_{ijkl} \) between the planes defined by the atom triplets i-j-k and j-k-l.

\( \cos(\Phi_{ijkl}) = \frac{\vec{n_{ijk}} \cdot \vec{n_{jkl}}}{|\vec{n_{ijk}}| \: |\vec{n_{jkl}}|} \)

where
\( \vec{v_{ji}} = \vec{p_i} - \vec{p_j} \)
\( \vec{v_{jk}} = \vec{p_k} - \vec{p_j} \)
\( \vec{v_{lk}} = \vec{p_k} - \vec{p_l} \)
\( \vec{n_{ijk}} = \vec{v_{ji}} \times \vec{v_{jk}} \)
\( \vec{n_{jkl}} = \vec{v_{jk}} \times \vec{v_{lk}} \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.
\( \vec{p_k} \) = coordinates of atom k.
\( \vec{p_l} \) = coordinates of atom l.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of the terminal atom i.
ctr_atom1_posThe position \( \vec{p_j} \) of the central atom j.
ctr_atom2_posThe position \( \vec{p_k} \) of the central atom k.
term_atom2_posThe position \( \vec{p_l} \) of the terminal atom l.
Returns
The calculated cosine of the dihedral angle \( \Phi_{ijkl} \).

◆ calcDistanceDerivatives()

template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType CDPL::ForceField::calcDistanceDerivatives ( const CoordsVec &  atom1_pos,
const CoordsVec &  atom2_pos,
GradVec &  atom1_deriv,
GradVec &  atom2_deriv 
)

Calculates the partial derivatives \( \frac{\partial r_{ij}}{\partial \vec{p_x}} \) of the distance \( r_{ij} \) between two atoms i and j.

\( \frac{\partial r_{ij}}{\partial \vec{p_i}} = \frac{-\vec{v_{ij}}}{r_{ij}} \)
\( \frac{\partial r_{ij}}{\partial \vec{p_j}} = \frac{\vec{v_{ij}}}{r_{ij}} \)
\( r_{ij} = |\vec{v_{ij}}| \)

where
\( \vec{v_{ij}} = \vec{p_j} - \vec{p_i} \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.

Parameters
atom1_posThe position \( \vec{p_i} \) of atom i.
atom2_posThe position \( \vec{p_j} \) of atom j.
atom1_derivOutput variable for the calculated partial derivative \( \frac{\partial r_{ij}}{\partial \vec{p_i}} \) at the given atom positions.
atom2_derivOutput variable for the calculated partial derivative \( \frac{\partial r_{ij}}{\partial \vec{p_j}} \) at the given atom positions.
Returns
The calculated distance \( r_{ij} \).

◆ calcBondAngleCosDerivatives()

template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType CDPL::ForceField::calcBondAngleCosDerivatives ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
GradVec &  term_atom1_deriv,
GradVec &  ctr_atom_deriv,
GradVec &  term_atom2_deriv 
)

Calculates the partial derivatives \( \frac{\partial \cos(\vartheta_{ijk})}{\partial \vec{p_x}} \) of the of the cosine of the angle \( \vartheta_{ijk} \) between the bonds i-j and j-k.

\( \frac{\partial \cos(\vartheta_{ijk})}{\partial \vec{p_i}} = \frac{\vec{v_{jk}}}{r_{ji} \: r_{jk}} - \frac{\vec{v_{ji}} \: (\vec{v_{ji}} \cdot \vec{v_{jk}})}{r_{ji}^3 \: r_{jk}} \)
\( \frac{\partial \cos(\vartheta_{ijk})}{\partial \vec{p_k}} = \frac{\vec{v_{ji}}}{r_{ji} \: r_{jk}} - \frac{\vec{v_{jk}} \: (\vec{v_{ji}} \cdot \vec{v_{jk}})}{r_{ji} \: r_{jk}^3} \)
\( \frac{\partial \cos(\vartheta_{ijk})}{\partial \vec{p_j}} = -(\frac{\partial \cos(\vartheta_{ijk})}{\partial \vec{p_i}} + \frac{\partial \cos(\vartheta_{ijk})}{\partial \vec{p_k}}) \)
\( \cos(\vartheta_{ijk}) = \frac{\vec{v_{ij}} \cdot \vec{v_{jk}}}{r_{ij} \: r_{jk}} \)

where
\( \vec{v_{ji}} = \vec{p_i} - \vec{p_j} \)
\( \vec{v_{jk}} = \vec{p_k} - \vec{p_j} \)
\( r_{ji} = |\vec{v_{ji}}| \)
\( r_{jk} = |\vec{v_{jk}}| \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.
\( \vec{p_k} \) = coordinates of atom k.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of atom i.
ctr_atom_posThe position \( \vec{p_j} \) of atom j.
term_atom2_posThe position \( \vec{p_k} \) of atom k.
term_atom1_derivOutput variable for the calculated partial derivative \( \frac{\partial \cos(\vartheta_{ijk})}{\partial \vec{p_i}} \) at the given atom positions.
ctr_atom_derivOutput variable for the calculated partial derivative \( \frac{\partial \cos(\vartheta_{ijk})}{\partial \vec{p_j}} \) at the given atom positions.
term_atom2_derivOutput variable for the calculated partial derivative \( \frac{\partial \cos(\vartheta_{ijk})}{\partial \vec{p_k}} \) at the given atom positions.
Returns
The calculated cosine of the bond angle \( \vartheta_{ijk} \).

◆ calcDihedralAngleCosDerivatives()

template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType CDPL::ForceField::calcDihedralAngleCosDerivatives ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom1_pos,
const CoordsVec &  ctr_atom2_pos,
const CoordsVec &  term_atom2_pos,
GradVec &  term_atom1_deriv,
GradVec &  ctr_atom1_deriv,
GradVec &  ctr_atom2_deriv,
GradVec &  term_atom2_deriv 
)

Calculates the partial derivatives \( \frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_x}} \) of the cosine of the angle \( \Phi_{ijkl} \) between the planes defined by the atom triplets i-j-k and j-k-l.

\( \frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_i}} = \vec{v_{jk}} \times \vec{a} \)

\( \frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_j}} = \vec{r_{ki}} \times \vec{a} - \vec{v_{lk}} \times \vec{b} \)
\( \frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_l}} = \vec{v_{jk}} \times \vec{b} \)
\( \frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_k}} = -(\frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_i}} + \frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_j}} + \frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_l}}) \)
\( \cos(\Phi_{ijkl}) = \frac{\vec{n_{ijk}} \cdot \vec{n_{jkl}}}{|\vec{n_{ijk}}| \: |\vec{n_{jkl}}|} \)

where
\( \vec{v_{ji}} = \vec{p_i} - \vec{p_j} \)
\( \vec{v_{jk}} = \vec{p_k} - \vec{p_j} \)
\( \vec{v_{lk}} = \vec{p_k} - \vec{p_l} \)
\( \vec{r_{ki}} = \vec{p_i} - \vec{p_k} \)
\( \vec{n_{ijk}} = \vec{v_{ji}} \times \vec{v_{jk}} \)
\( \vec{n_{jkl}} = \vec{v_{jk}} \times \vec{v_{lk}} \)
\( \vec{a} = \frac{\frac{\vec{n_{jkl}}}{|\vec{n_{jkl}}|} - \cos(\Phi_{ijkl}) \: \frac{\vec{n_{ijk}}}{|\vec{n_{ijk}}|}}{|\vec{n_{ijk}}|} \)
\( \vec{b} = \frac{\frac{\vec{n_{ijk}}}{|\vec{n_{ijk}}|} - \cos(\Phi_{ijkl}) \: \frac{\vec{n_{jkl}}}{|\vec{n_{jkl}}|}}{|\vec{n_{jkl}}|} \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.
\( \vec{p_k} \) = coordinates of atom k.
\( \vec{p_l} \) = coordinates of atom l.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of the terminal atom i.
ctr_atom1_posThe position \( \vec{p_j} \) of the central atom j.
ctr_atom2_posThe position \( \vec{p_k} \) of the central atom k.
term_atom2_posThe position \( \vec{p_l} \) of the terminal atom l.
term_atom1_derivOutput variable for the calculated partial derivative \( \frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_i}} \) at the given atom positions.
ctr_atom1_derivOutput variable for the calculated partial derivative \( \frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_j}} \) at the given atom positions.
ctr_atom2_derivOutput variable for the calculated partial derivative \( \frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_k}} \) at the given atom positions.
term_atom2_derivOutput variable for the calculated partial derivative \( \frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_l}} \) at the given atom positions.
Returns
The calculated cosine of the dihedral angle \( \Phi_{ijkl} \).

◆ calcOutOfPlaneAngleCosDerivatives()

template<typename ValueType , typename CoordsVec , typename GradVec >
ValueType CDPL::ForceField::calcOutOfPlaneAngleCosDerivatives ( const CoordsVec &  term_atom1_pos,
const CoordsVec &  ctr_atom_pos,
const CoordsVec &  term_atom2_pos,
const CoordsVec &  oop_atom_pos,
GradVec &  term_atom1_deriv,
GradVec &  ctr_atom_deriv,
GradVec &  term_atom2_deriv,
GradVec &  oop_atom_deriv 
)

Calculates the partial derivatives \( \frac{\partial \cos(\omega_{ijk;l})}{\partial \vec{p_x}} \) of the cosine of the angle \( \omega_{ijk;l} \) between the bond j-l and the normal of the plane defined by the atoms i-j-k.

\( \frac{\partial \cos(\omega_{ijk;l})}{\partial \vec{p_i}} = \frac{\vec{v_{jk}} \times \vec{v_{jl}}}{|\vec{n_{ijk}}| \: r_{jl}} - \cos(\omega_{ijk;l}) \: \frac{M_1 \cdot \vec{n_{ijk}}}{|\vec{n_{ijk}}|^2} \)
\( \frac{\partial \cos(\omega_{ijk;l})}{\partial \vec{p_k}} = \frac{\vec{v_{jl}} \times \vec{v_{ji}}}{|\vec{n_{ijk}}| \: r_{jl}} - \cos(\omega_{ijk;l}) \: \frac{M_2 \cdot \vec{n_{ijk}}}{|\vec{n_{ijk}}|^2} \)
\( \frac{\partial \cos(\omega_{ijk;l})}{\partial \vec{p_l}} = \frac{-1}{|\vec{n_{ijk}}| \: r_{jl}} \: (\frac{\vec{v_{jl}} (\vec{n_{ijk}} \cdot \vec{v_{jl}})}{r_{jl}^2} + \vec{r_{kl}} \times \vec{v_{il}} + \vec{v_{jl}} \times \vec{v_{ji}} + \vec{v_{jk}} \times \vec{v_{jl}}) \)
\( \frac{\partial \cos(\omega_{ijk;l})}{\partial \vec{p_j}} = -(\frac{\partial \cos(\omega_{ijk;l})}{\partial \vec{p_i}} + \frac{\partial \cos(\omega_{ijk;l})}{\partial \vec{p_k}} + \frac{\partial \cos(\omega_{ijk;l})}{\partial \vec{p_l}}) \)
\( \cos(\omega_{ijk;l}) = \frac{\vec{n_{ijk}} \cdot \vec{v_{jl}}}{|\vec{n_{ijk}}| \: r_{jl}} \)

where
\( M_1 = \begin{vmatrix} 0 & -\vec{v_{jk}}.z & \vec{v_{jk}}.y \\ \vec{v_{jk}}.z & 0 & -\vec{v_{jk}}.x \\ -\vec{v_{jk}}.y & \vec{v_{jk}}.x & 0 \end{vmatrix} \)
\( M_2 = \begin{vmatrix} 0 & \vec{v_{ji}}.z & -\vec{v_{ji}}.y \\ -\vec{v_{ji}}.z & 0 & \vec{v_{ji}}.x \\ \vec{v_{ji}}.y & -\vec{v_{ji}}.x & 0 \end{vmatrix} \)
\( \vec{v_{ji}} = \vec{p_i} - \vec{p_j} \)
\( \vec{v_{jk}} = \vec{p_k} - \vec{p_j} \)
\( \vec{v_{jl}} = \vec{p_l} - \vec{p_j} \)
\( \vec{r_{kl}} = \vec{p_l} - \vec{p_k} \)
\( \vec{v_{il}} = \vec{p_l} - \vec{p_i} \)
\( \vec{n_{ijk}} = \vec{v_{ji}} \times \vec{v_{jk}} \)
\( r_{jl} = |\vec{v_{jl}}| \)

\( \vec{p_i} \) = coordinates of atom i.
\( \vec{p_j} \) = coordinates of atom j.
\( \vec{p_k} \) = coordinates of atom k.
\( \vec{p_l} \) = coordinates of atom l.

Parameters
term_atom1_posThe position \( \vec{p_i} \) of the terminal atom i.
ctr_atom_posThe position \( \vec{p_j} \) of the central atom j.
term_atom2_posThe position \( \vec{p_k} \) of the terminal atom k.
oop_atom_posThe position \( \vec{p_l} \) of the out-of-plane atom l.
term_atom1_derivOutput variable for the calculated partial derivative \( \frac{\partial \cos(\omega_{ijkl})}{\partial \vec{p_i}} \) at the given atom positions.
ctr_atom_derivOutput variable for the calculated partial derivative \( \frac{\partial \cos(\omega_{ijkl})}{\partial \vec{p_j}} \) at the given atom positions.
term_atom2_derivOutput variable for the calculated partial derivative \( \frac{\partial \cos(\omega_{ijkl})}{\partial \vec{p_k}} \) at the given atom positions.
oop_atom_derivOutput variable for the calculated partial derivative \( \frac{\partial \cos(\omega_{ijkl})}{\partial \vec{p_l}} \) at the given atom positions.
Returns
The calculated cosine of the angle \( \omega_{ijk;l} \).