Builder.umbrella_image()

Add the mirror image of a branch, e.g. to draw an umbrella inversion.

Usage

Source

Builder.umbrella_image(
    key,
    keys=None,
    *,
    geo=None,
    normal=None,
)

The branch is reflected through a plane that contains the bond from key to its parent, and that is perpendicular to the empty slot of key (its lone pair). This swaps the sides of the substituents and the lone pair, as in the inversion of an amine. Both the branch and its image are kept, so one can be faded afterwards.

Parameters

key: int

Center of the branch, e.g. an amine nitrogen.

keys: Sequence[int] | None = None

Atoms to reflect. Defaults to everything bonded beyond key, away from its parent.

geo: Geometry | None = None

Geometry to add the image to, e.g. one that already has other images. Defaults to geometry(). Its first atoms must be the builder’s.

normal: ArrayLike | None = None
Normal of the mirror plane through key, overriding the default.

Returns

tuple[Geometry, list[int]]
The geometry with the image atoms appended, and their indices.

Raises

ValueError
If key has no parent, or, without normal, doesn’t have exactly one empty slot.