Atoms#

Cell and atoms are the two data structures that are implemented in a number of codes (if not in each one of them). Magnopy does not re-implement them, but rather use the same data structure as in another python package called wulfric.

Here we briefly describe how the unit cell is stored, if you want to read the original description of wulfric we refer you to key concepts of wulfric.

Atoms are stored as a plain python dictionary. Keys of the atoms are properties of atoms. Values are the lists of \(M^{\prime}\) elements each, where \(M^{\prime}\) is an amount of atoms.

>>> atoms = {
...     "names": ["Cr1", "Br1", "S1", "Cr2", "Br2", "S2"],
...     "species": ["Cr", "Br", "S", "Cr", "Br", "S"],
...     "positions": [
...         [0.500000, 0.000000, 0.882382],
...         [0.000000, 0.000000, 0.677322],
...         [0.500000, 0.500000, 0.935321],
...         [0.000000, 0.500000, 0.117618],
...         [0.500000, 0.500000, 0.322678],
...         [0.000000, 0.000000, 0.064679],
...     ],
... }

Keys recognized by magnopy:

  • "names" : list of str. Inherited from wulfric. This property is an informally a a main property and, as a rule of thumb, should be always present in the atoms dictionary.

  • "species" : list of str. Inherited from wulfric.

  • "positions" : list of relative coordinates of atoms. Inherited from wulfric. Each element is an array-like of length \(3\).

  • "spins" : list of float. Spin values for each atom.

  • "g_factors" : list of float.

Magnopy extends the definition of atoms from wulfric, therefore, any function of wulfric may be used on it.

In magnopy atoms are used in the definition of Spin Hamiltonian and is one of three objects that are required for the creation of the SpinHamiltonian class. It is stored as an its attribute SpinHamiltonian.atoms.

Magnetic vs non-magnetic atoms#

Magnopy defines magnetic atom as an atom that has at least one parameter of the spin Hamiltonian associated with it. Each spin Hamiltonian contains \(M\) magnetic atoms (SpinHamiltonian.M). However, the crystal (cell & atoms) that are used for the definition of the spin Hamiltonian can contain \(M^{\prime} \ne M\) atoms.

Attribute SpinHamiltonian.atoms returns a dictionary with all atoms of the crystal, while SpinHamiltonian.magnetic_atoms returns dictionary with only magnetic atoms. The order of atoms is the same in both.