Skip to main content

geom.rotate()

Rotate a geometry about a point.

Usage

Source

geom.rotate(
    geo,
    rot,
    *,
    origin=(0.0, 0.0, 0.0),
    keys=None,
    in_place=False,
)

Parameters

geo: Geometry

Geometry.

rot: Rotation

Rotation to apply.

origin: ArrayLike = (0.0, 0.0, 0.0)

Point to rotate about.

keys: Collection[int] | None = None

Atoms to rotate. If None, rotate all atoms.

in_place: bool = False
If True, modify geo instead of returning a copy.

Returns

Geometry
The rotated geometry.