radtools.SpinHamiltonian.add_atom#
method
- SpinHamiltonian.add_atom(new_atom: Atom | str = None, relative=True, **kwargs)#
Add atom to the crystal.
If name and index of the
new_atomare the same as of some atom of the crystal, thennew_atomis not added.If index of
new_atomis not defined, it is set.- Parameters:
- Raises:
- TypeError
If
new_atomis not anAtom.- ValueError
If the atom is already present in the crystal.