Loading...
Searching...
No Matches
PLMD::Torsion Class Reference

Class to compute torsional angles. More...

#include <Torsion.h>

Static Public Member Functions

template<typename T>
static T compute (const VectorTyped< T, 3 > &v1, const VectorTyped< T, 3 > &v2, const VectorTyped< T, 3 > &v3)
 Compute the angle between the projections of v1 and v3 on the plane orthogonal to v2.
 
template<typename T>
static T compute (const VectorTyped< T, 3 > &v1, const VectorTyped< T, 3 > &v2, const VectorTyped< T, 3 > &v3, VectorTyped< T, 3 > &d1, VectorTyped< T, 3 > &d2, VectorTyped< T, 3 > &d3)
 This is the version which also computes the derivatives wrt the arguments.
 

Detailed Description

Class to compute torsional angles.

I define it as a class even if it does not contain anything. The reason is that in the future I would like to extend it to contain options about how the calculation should be done. So, for now use it as Torsion t; T angle=t.compute(v1,v2,v3); I know it is a bit misleading. If we really do not need to store "options" inside the Torsion class, we can remove it later and write compute as a static function.

Member Function Documentation

◆ compute() [1/2]

template<typename T>
static T PLMD::Torsion::compute ( const VectorTyped< T, 3 > & v1,
const VectorTyped< T, 3 > & v2,
const VectorTyped< T, 3 > & v3 )
inlinestatic

Compute the angle between the projections of v1 and v3 on the plane orthogonal to v2.

To have a "normal" definition (= plumed1), use it as compute(r01,r12,r23); See ColvarTorsion for a practical usage...

◆ compute() [2/2]

template<typename T>
static T PLMD::Torsion::compute ( const VectorTyped< T, 3 > & v1,
const VectorTyped< T, 3 > & v2,
const VectorTyped< T, 3 > & v3,
VectorTyped< T, 3 > & d1,
VectorTyped< T, 3 > & d2,
VectorTyped< T, 3 > & d3 )
inlinestatic

This is the version which also computes the derivatives wrt the arguments.


The documentation for this class was generated from the following file: