Rosetta  3.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Functions
dihedral_deriv.hh File Reference

inline function for computing f1/f2 derivatives for a function of a dihedral More...

#include <numeric/xyz.functions.hh>
#include <numeric/xyzVector.hh>
#include <numeric/trig.functions.hh>
#include <numeric/conversions.hh>
#include <utility/assert.hh>
#include <float.h>

Namespaces

 numeric
 Unit headers.
 
 numeric::deriv
 

Functions

template<class P >
void numeric::deriv::helper (xyzVector< P > const &M, xyzVector< P > const &v, xyzVector< P > const &w, xyzVector< P > &F1, xyzVector< P > &F2)
 
template<class P >
void numeric::deriv::dihedral_deriv_second (xyzVector< P > const &p1, xyzVector< P > const &p2, xyzVector< P > const &p3, xyzVector< P > const &p4, P x, P &theta, xyzVector< P > &F1, xyzVector< P > &F2)
 Whether computing the f1/f2 derivatives for a function of a dihedral for the end points (p1 or p4) or the middle points (p2 or p3), the second half of the computation is the same. This "second" function expects the F1 and F2 arrays to have been partially computed, as well as the cosine of the angle theta. It scales the F1 and F2 vectors by dtheta_dthetaU * dthetaU_dx. More...
 
template<class P >
void numeric::deriv::dihedral_p1_cosine_deriv_first (xyzVector< P > const &p1, xyzVector< P > const &p2, xyzVector< P > const &p3, xyzVector< P > const &p4, P &x, bool &colinearity_flag, xyzVector< P > &F1, xyzVector< P > &F2)
 The first half of the computation of the f1/f2 derivatives for an end point of a dihedral. The values in the output-parameter vectors F1 and F2 are overwritten. The cosine of the dihedral theta is returned in the output parameter x. More...
 
template<class P >
void numeric::deriv::dihedral_p1_cosine_deriv (xyzVector< P > const &p1, xyzVector< P > const &p2, xyzVector< P > const &p3, xyzVector< P > const &p4, P &theta, xyzVector< P > &f1, xyzVector< P > &f2)
 compute f1/f2 atom derivative vectors for one of the two end points defining a dihedral angle for some function F. Templated on the precision of the coordinates being represented. Returns the dihedral angle, theta, defined by p1->p2->p3->p4, which should be used to evaluate the derivative of the function F. dF_dtheta should then be multiplied into both derivative vectors that are returned. The values of the output variables f1 and f2 are overwritten. Theta is computed in radians. More...
 
template<class P >
void numeric::deriv::dihedral_p2_cosine_deriv_first (xyzVector< P > const &p1, xyzVector< P > const &p2, xyzVector< P > const &p3, xyzVector< P > const &p4, P &x, bool &colinearity_flag, xyzVector< P > &F1, xyzVector< P > &F2)
 The first half of the computation of the f1/f2 derivatives for a central point of a dihedral. The values in the output-parameter vectors F1 and F2 are overwritten. The cosine of the dihedral theta is returned in the output parameter x. More...
 
template<class P >
void numeric::deriv::dihedral_p2_cosine_deriv (xyzVector< P > const &p1, xyzVector< P > const &p2, xyzVector< P > const &p3, xyzVector< P > const &p4, P &theta, xyzVector< P > &f1, xyzVector< P > &f2)
 compute f1/f2 atom derivative vectors for one of the two middle points defining a dihedral angle for some function F. Templated on the precision of the coordinates being represented. Returns the dihedral angle, theta, defined by p1->p2->p3->p4, which should be used to evaluate the derivative of the function F. dF_dtheta should then be multiplied into both derivative vectors that are returned. The values of the output variables f1 and f2 are overwritten. Theta is computed in radians. More...
 

Detailed Description

inline function for computing f1/f2 derivatives for a function of a dihedral

Author
Phil Bradley did all the hard work deriving the math represented here.
Andrew Leaver-Fay copy-and-pasted Phil's code into this file from the DihedralConstraint.cc file for general use.