Skip to main content

geom.remove_atoms()

Remove a subset of atoms.

Usage

Source

geom.remove_atoms(
    geo,
    keys,
    *,
    charge=None,
    spin=None,
)

Parameters

geo: Geometry

Geometry.

keys: Collection[int]

Indices of the atoms to remove.

charge: int | None = None

Charge of the remaining atoms (see select_atoms).

spin: int | None = None
Spin of the remaining atoms (see select_atoms).

Returns

Geometry
The remaining atoms, in their original order.