TORSION_SCALAR
This is part of the colvar module

Calculate a torsional angle.

Examples
Glossary of keywords and components
The atoms involved can be specified using
ATOMS the four atoms involved in the torsional angle
Or alternatively by using
AXIS two atoms that define an axis. You can use this to find the angle in the plane perpendicular to the axis between the vectors specified using the VECTORA and VECTORB keywords.
VECTORA two atoms that define a vector. You can use this in combination with VECTOR2 and AXIS
VECTORB two atoms that define a vector. You can use this in combination with VECTOR1 and AXIS
Or alternatively by using
VECTOR1 two atoms that define a vector. You can use this in combination with VECTOR2 and AXIS
VECTOR2 two atoms that define a vector. You can use this in combination with VECTOR1 and AXIS
Options
NUMERICAL_DERIVATIVES ( default=off ) calculate the derivatives for these quantities numerically
NOPBC ( default=off ) ignore the periodic boundary conditions when calculating distances
COSINE

( default=off ) calculate cosine instead of dihedral