magnopy.Energy.torque#

method

Energy.torque(spin_directions, _normalize=True)[source]#

Computes torque on each spin.

Parameters:
spin_directions(M, 3) array-like

Directions of spin vectors. Only directions of vectors are used, modulus is ignored. M is the amount of magnetic atoms in the Hamiltonian. The order of spin directions is the same as the order of magnetic atoms in spinham.magnetic_atoms.spins.

_normalizebool, default True

Whether to normalize the spin_directions or use the provided vectors as is. This parameter is technical and we do not recommend to use it at all.

Returns:
torque(M, 3) numpy.ndarray
[
    [ t1x, t1y, t1z ],
    [ t2x, t2y, t2z ],
    ...
    [ tMx, tMy, tMz ]
]