LSWT#

LSWT class is the main point for the computation at the level of the linear spin wave theory. It is created from some spi 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
>>> cell = np.eye(3)
>>> atoms = {
...     "names" : ["Fe1"],
...     "species" : ["Fe"],
...     "positions" : [[0.0, 0.0, 0.0]],
...     "spins" : [5/2],
...     "g_factors" : [2]
... }
>>> convention = magnopy.Convention(
...     multiple_counting=True, spin_normalized=False, c1=1, c21=1, c22=-1 / 2, c31=1, c41=1
... )
>>> spinham = magnopy.SpinHamiltonian(cell=cell, atoms=atoms, convention=convention)
>>> spinham.add_21(alpha=0, parameter=np.diag([2, -1, -2]))
>>> spinham.add_22(alpha = 0, beta = 0, nu = (1, 0, 0), parameter = np.eye(3))
>>> spinham.add_22(alpha = 0, beta = 0, nu = (0, 1, 0), parameter = np.eye(3))
>>> spinham.add_22(alpha = 0, beta = 0, nu = (0, 0, 1), parameter = np.eye(3))
>>> 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.