LSWT#

All computations related to the linear spin wave theory (LSWT) are performed by the LSWT class. It is created from a spin Hamiltonian. The parameters of the spin Hamiltonian are optimized for the calculations of the LSWT upon creation of the LSWT instance and the spin Hamiltonian is not stored within the LSWT class.

>>> import numpy as np
>>> import magnopy
>>> # Hamiltonian for the nearest-neighbor ferromagnet on a cubic lattice
>>> spinham = magnopy.examples.cubic_ferro_nn(S=5/2, J_iso=1, J_21=np.diag([2, -1, -2]))
>>> lswt = magnopy.LSWT(spinham=spinham, spin_directions = [[0, 0, 1]])

Once created, it can be used to access the properties of the LSWT Hamiltonian

>>> lswt.M
1
>>> lswt.z
array([[0., 0., 1.]])
>>> lswt.p
array([[1.+0.j, 0.+1.j, 0.+0.j]])
>>> lswt.spins
array([2.5])
>>> lswt.cell
array([[1., 0., 0.],
       [0., 1., 0.],
       [0., 0., 1.]])

K-independent properties#

Correction to the energy (LSWT.E_2())

>>> lswt.E_2()
-12.5

Coefficients before the one-operator terms (LSWT.O())

>>> lswt.O()
array([0.+0.j])

K-dependant properties#

Part of the spin Hamiltonian that depends on the wave vector \(\boldsymbol{k}\). They can be computed one by one

>>> omega = lswt.omega(k = [0.5, 0, 0])
>>> delta = lswt.delta(k = [0.5, 0, 0])

or all at once

>>> omega, delta, G = lswt.diagonalize(k = [0.5, 0, 0])

Note that call of LSWT.omega(), LSWT.delta() or LSWT.G() invokes the call of LSWT.diagonalize(). Therefore, we recommend to use LSWT.diagonalize() to avoid duplicate calculations.