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 name and index is meant to be unique, when an atom belongs to some group (i.e. to Crystal or SpinHamiltonian).

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 use Atom.type. In most cases Atom.name = Atom.type.

Methods:

Properties:

charge

Charge of the atom.

fullname

Fullname (name__index) of an atom.

index

Index of an atom, meant to be unique for some group of atoms.

magmom

Magnetic moment of the atom.

name

Name of the atom.

position

Position of the atom.

spin

Spin value of the atom.

spin_direction

Classical spin direction of the atom.

spin_vector

Classical spin vector of the atom.

type

Type of an atom (i.e. Cr, Ni, ...).