Chemical Data Processing Library C++ API - Version 1.2.0
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 \( r_{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 \( r_{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 \( 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 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. 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 \( \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 \( \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 \( \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 \( \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 \( \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 \( \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 \( \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 \( \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 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. 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 \( \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 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. More...
 

Detailed Description

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