Torsion potentials¶
A torsion type is defined by a quadruplet of atom types, a functional form and the corresponding parameters values. The order of the atom types in the quadruplet is that of the figure.
To express the torsion angle \(\phi\), it is useful to define first the vectors \(\mathbf{V}\) and \(\mathbf{W}\):
\[
\mathbf{V} = \frac{\mathbf{r}_{21}\times \mathbf{r}_{23}}{\lVert \mathbf{r}_{21} \lVert \lVert \mathbf{r}_{23} \lVert}
\]
\[
\mathbf{W} = \frac{\mathbf{r}_{34}\times \mathbf{r}_{23}}{\lVert \mathbf{r}_{34} \lVert \lVert \mathbf{r}_{23} \lVert}.
\]
The torsion angle \(\phi\) is then given by its cosine and sign:
\[
\cos{\phi} = \mathbf{V}\cdot\mathbf{W}
\]
\[
\text{sgn }\phi = \text{sgn} \left ( \mathbf{V}\times\mathbf{W}\cdot\mathbf{r}_{23} \right )
\]
In practice \(\phi\) is computed with \(\operatorname{atan2}\), which is accurate for all angles, including 0 and 180 degrees. When atoms 1, 2, 3 or atoms 2, 3, 4 are (almost) aligned, the torsion angle is undefined and the torsion term gives no force.
The following types of torsion potentials are defined in exastamp: