grogupy.magnetism module

grogupy.magnetism.blow_up_orbindx(orb_indices)[source]

Function to blow up orbital indices to make SPIN BOX indices.

Args:
orb_indicesnp.array_like

These are the indices in ORBITAL BOX

Returns:
orb_indicesnp.array_like

These are the indices in SPIN BOX

grogupy.magnetism.calculate_anisotropy_tensor(mag_ent)[source]

Calculates the renormalized anisotropy tensor from the energies.

It uses the grogu convention for output.

Args:
mag_entdict

An element from the magnetic entities

Returns:
Knp.array_like

elements of the anisotropy tensor

grogupy.magnetism.calculate_exchange_tensor(pair)[source]

Calculates the exchange tensor from the energies.

It produces the isotropic exchange, the relevant elements from the Dzyaloshinskii-Morilla (Dm) tensor, the symmetric-anisotropy and the complete exchange tensor.

Args:
pairdict

An element from the pairs

Returns:
J_isofloat

Isotropic exchange (Tr[J] / 3)

J_Snp.array_like

Symmetric-anisotropy (J_S = J - J_iso * I ––> Jxx, Jyy, Jxy, Jxz, Jyz)

Dnp.array_like

DM elements (Dx, Dy, Dz)

Jnp.array_like

Complete exchange tensor flattened (Jxx, Jxy, Jxz, Jyx, Jyy, Jyz, Jzx, Jzy, Jzz)

grogupy.magnetism.parse_magnetic_entity(dh, atom=None, l=None, **kwargs)[source]

Function to define orbital indexes of a given magnetic entity.

Args:
dhsisl.physics.Hamiltonian

Hamiltonian from sisl

atominteger or list of integers, optional

Defining atom (or atoms) in the unit cell forming the magnetic entity. Defaults to None

linteger, optional

Defining the angular momentum channel. Defaults to None

Returns:
list

The orbital indexes of the given magnetic entity

grogupy.magnetism.spin_tracer(M)[source]

Spin tracer utility.

This takes an operator with the orbital-spin sequence: orbital 1 up, orbital 1 down, orbital 2 up, orbital 2 down, that is in the SPIN-BOX representation, and extracts orbital dependent Pauli traces.

Args:
Mnp.array_like

Traceable matrix

Returns:
dict

It contains the traced matrix with “x”, “y”, “z” and “c”