wulfric.Atom#
- class wulfric.Atom(name='X', position=(0, 0, 0), spin=None, magmom=None, g_factor=2.0, charge=None, index=None)[source]#
Atom class.
- Parameters:
- namestr, default "X"
Name of the atom. It cannot start or end with double underline "__".
- position(3,) array-like, default [0, 0, 0]
Position of the atom in absolute or relative coordinates.
- spinfloat or (3,) array-like, optional
Spin or spin vector of the atom. If only one value is given, then spin vector is oriented along z axis. Connected with
magmom, seeAtom.magmom.- magmomfloat or (3,) array-like, optional
Magnetic moment of the atom. Vector or the value. If a number is given, then oriented along z axis. Connected with
spin, seeAtom.spin.- g_factorfloat, default 2
Lande g-factor. Relates
magmomandspin.- chargefloat, optional
Charge of the atom.
- indexint, optional
Custom index of an atom. It is used differently in different scenarios. Combination of
nameandindexis meant to be unique, when an atom belongs to some group (i.e. toCrystal).
Notes
"==" (and "!=") operator compare two atoms based on their names and indexes. If index of one atom is not defined, then comparison raises
ValueError. If two atoms have the sameAtom.nameandAtom.indexthen they are considered to be equal. Even if they have differentAtom.positions. For the check of the atom type useAtom.type. In most casesAtom.name=Atom.type.Methods:
copy()Create a copy of the atom.
Properties:
Charge of the atom.
Fullname (
Atom.name`+``__``+:py:attr:`Atom.index) of an atom.g-factor of an atom, relates its
Atom.spinwith itsAtom.magmom.magmomIndex of an atom, meant to be unique in some abstract group of atoms.
Magnetic moment of the atom.
Name of the atom.
Relative or absolute position of the atom in some units.
Spin value of the atom.
Polar \(\theta\) and azimuthal \(\varphi\) angles of the spin vector:
Direction of the classical spin vector.
Classical spin vector of the atom.
Type of an atom (i.e. Cr, Ni, ...).