rotate_centered#

biotite.structure.rotate_centered(atoms, angles)[source]#

Rotate the given atoms or coordinates about the x, y and z axes by given angles.

The rotations are centered at the centroid of the corresponding structure and are performed sequentially in the order x, y, z.

Parameters:
atomsAtom or AtomArray or AtomArrayStack or ndarray, shape=(3,) or shape=(n,3) or shape=(m,n,3)

The atoms of which the coordinates are transformed. The coordinates can be directly provided as ndarray.

angles: array-like, length=3

The rotation angles in radians around axes x, y and z.

Returns:
transformedAtom or AtomArray or AtomArrayStack or ndarray, shape=(3,) or shape=(n,3) or shape=(m,n,3)

A copy of the input atoms or coordinates, rotated by the given angles.