radtools.Crystal.remove_atom#
method
- Crystal.remove_atom(atom: Atom | str, index=None)[source]#
Remove atom from the crystal.
If type(
atom) ==str, then all atoms with the nameatomare removed ifindex==Noneor only atom with the nameatomand indexindexis removed.It type(
atom) ==Atom,indexis ignored.- Parameters:
- atom
Atomor str :py:class`.Atom` object or atom`s name. If name, then it has to be unique among atoms of the crystal.
- indexoptional
Index of the atom.
- atom
- Raises:
- ValueError
If no match is found.