Typesetting math: 100%
Chemical Data Processing Library C++ API - Version 1.1.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Functions
ForceField/UtilityFunctions.hpp File Reference

Utility functions used in the calculation of force field energies and gradients. More...

#include <cmath>
#include "CDPL/ForceField/APIPrefix.hpp"
#include "CDPL/Util/BitSet.hpp"

Go to the source code of this file.

Namespaces

 CDPL
 The namespace of the Chemical Data Processing Library.
 
 CDPL::ForceField
 Contains classes and functions related to molecular force fields.
 

Functions

CDPL_FORCEFIELD_API void CDPL::ForceField::filterInteractions (const MMFF94InteractionData &ia_data, MMFF94InteractionData &filtered_ia_data, const Util::BitSet &inc_atom_mask)
 
template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcSquaredDistance (const CoordsVec &atom1_pos, const CoordsVec &atom2_pos)
 Calculates the squared distance rij2r_{ij}^2 between two atoms i and j. More...
 
template<typename ValueType , typename CoordsVec >
ValueType CDPL::ForceField::calcDistance (const CoordsVec &atom1_pos, const CoordsVec &atom2_pos)
 Calculates the distance rijr_{ij} between two atoms i and j. More...
 
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 rijr_{ij} and rjkr_{jk} and the cosine of the bond angle ϑijk\vartheta_{ijk} between the two bonds i-j and j-k. More...
 
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 rijr_{ij} and rjkr_{jk} and the bond angle ϑijk\vartheta_{ijk} between the two bonds i-j and j-k. More...
 
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 ϑijk\vartheta_{ijk} between the two bonds i-j and j-k. More...
 
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 ϑijk\vartheta_{ijk} between the two bonds i-j and j-k. More...
 
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 ϑijk\vartheta_{ijk} between the two bonds i-j and j-k. More...
 
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 ϑijk\vartheta_{ijk} between the two bonds i-j and j-k. More...
 
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 χijk;l\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 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 χijk;l\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 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 Φijkl\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 CDPL::ForceField::calcDistanceDerivatives (const CoordsVec &atom1_pos, const CoordsVec &atom2_pos, GradVec &atom1_deriv, GradVec &atom2_deriv)
 Calculates the partial derivatives rijpx\frac{\partial r_{ij}}{\partial \vec{p_x}} of the distance rijr_{ij} between two atoms i and j. More...
 
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 cos(ϑijk)px\frac{\partial \cos(\vartheta_{ijk})}{\partial \vec{p_x}} of the of the cosine of the angle ϑijk\vartheta_{ijk} between the bonds i-j and j-k. More...
 
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 cos(Φijkl)px\frac{\partial \cos(\Phi_{ijkl})}{\partial \vec{p_x}} of the cosine of the angle Φijkl\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 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 cos(ωijk;l)px\frac{\partial \cos(\omega_{ijk;l})}{\partial \vec{p_x}} of the cosine of the angle ωijk;l\omega_{ijk;l} between the bond j-l and the normal of the plane defined by the atoms i-j-k. More...
 

Detailed Description

Utility functions used in the calculation of force field energies and gradients.