Skip to main content

geom.reflect()

Reflect a geometry across a plane.

Usage

Source

geom.reflect(
    geo,
    normal,
    *,
    origin=(0.0, 0.0, 0.0),
    keys=None,
    in_place=False,
)

Parameters

geo: Geometry

Geometry.

normal: ArrayLike

Normal vector of the reflection plane.

origin: ArrayLike = (0.0, 0.0, 0.0)

A point on the reflection plane.

keys: Collection[int] | None = None

Atoms to reflect. If None, reflect all atoms.

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

Returns

Geometry
The reflected geometry.

Raises

ValueError
If normal is a zero vector.