Dihedral#
The Dihedral analysis measures a torsion angle defined by four selected groups along a path or trajectory. It is well suited for following rotamers, backbone torsions, and collective twisting motions.

Adding the plot#
- Open Path Analyzer.
- Choose Dihedral in Observable.
- Choose a Path.
- Define Group A, Group B, Group C, and Group D.
- Click Add Time Series or Add Histogram.
Inputs#
- Four atom-containing selections are required.
- The second and third groups define the central bond or central geometric axis of the torsion.
- Path Analyzer plots the angle in degrees.
How groups are converted to positions#
Path Analyzer converts each selected group to one representative position before computing the dihedral.
If a group contains one atom, its atomic position is used directly.
If a group contains several atoms, Path Analyzer uses the center of mass of that group.
Views#
- Time series: follow torsional transitions over time or over path images.
- Histogram: inspect preferred torsional states.
Key equation#
If the four representative group positions are \(\mathbf{p}_1,\mathbf{p}_2,\mathbf{p}_3,\mathbf{p}_4\), define
\[
\mathbf{b}_1=\mathbf{p}_2-\mathbf{p}_1,\qquad
\mathbf{b}_2=\mathbf{p}_3-\mathbf{p}_2,\qquad
\mathbf{b}_3=\mathbf{p}_4-\mathbf{p}_3
\]
and the plane normals
\[
\mathbf{n}_1=\mathbf{b}_1\times\mathbf{b}_2,\qquad
\mathbf{n}_2=\mathbf{b}_2\times\mathbf{b}_3
\]
Then the torsion angle can be written as
\[
\phi(t)=\operatorname{atan2}\!\left(\|\mathbf{b}_2\|\,\mathbf{b}_1\cdot\mathbf{n}_2,\ \mathbf{n}_1\cdot\mathbf{n}_2\right)
\]
For multi-atom groups, each representative position is the center of mass:
\[
\mathbf{p}_{\mathrm{group}}(t)=
\frac{\sum_i m_i\,\mathbf{r}_i(t)}{\sum_i m_i}
\]