radtools.Atom#
- class radtools.Atom(name='X', position=None, spin=None, magmom=None, charge=None, index=None)[source]#
Atom class.
- Parameters:
- namestr, default X
Name of the atom.
- position(3,) array-like, default [0,0,0]
Position of the atom in absolute coordinates.
- spinfloat or (3,) array-like, optional
Spin or spin vector of the atom.
- magmom(3,) array-like, optional
Magnetic moment of the atom.
- chargefloat, optional
Charge of the atom.
- indexint, optional
Custom index of an atom, used differently in different scenarios. Combination of
nameandindexis meant to be unique, when an atom belongs to some group (i.e. toCrystalorSpinHamiltonian).
Notes
"==" (and "!=") operation compare two atoms based on their names and indexes. If index of one atom is not define, then comparison raises
ValueError. For the check of the atom type useAtom.type. In most casesAtom.name=Atom.type.Methods:
Properties:
Charge of the atom.
Fullname (name__index) of an atom.
Index of an atom, meant to be unique for some group of atoms.
Magnetic moment of the atom.
Name of the atom.
Position of the atom.
Spin value of the atom.
Classical spin direction of the atom.
Classical spin vector of the atom.
Type of an atom (i.e. Cr, Ni, ...).