biotite.structure.dihedral

biotite.structure.dihedral(atoms1, atoms2, atoms3, atoms4, box=None)[source]

Measure the dihedral angle between 4 atoms.

Parameters:
atoms1, atoms2, atoms3, atoms4 : ndarray or Atom or AtomArray or AtomArrayStack

The atoms to measure the dihedral angle between. Alternatively an ndarray containing the coordinates can be provided.

Returns:
dihed : float or ndarray

The dihedral angle(s) between the atoms. The shape is equal to the shape of the input atoms with the highest dimensionality minus the last axis.

box : ndarray, shape=(3,3) or shape=(m,3,3), optional

If this parameter is set, periodic boundary conditions are taken into account (minimum-image convention), based on the box vectors given with this parameter. The shape (m,3,3) is only allowed, when the input coordinates comprise multiple models.