magnopy.converter422.to_biquadratic#
- magnopy.converter422.to_biquadratic(parameter, tensor_form=False)[source]#
Computes biquadratic exchange parameter from full tensor form.
\[C_{4,2,2} \sum_{i,j,u,v} J^{ijuv} S_{\mu}^i S_{\mu}^j S_{\nu}^u S_{\nu}^v = C_{4,2,2}B \left( \boldsymbol{S}_{\mu} \cdot \boldsymbol{S}_{\nu} \right)^2 + \dots\]where \(B\) is defined as
\[B = \dfrac{J^{xxxx} + J^{xyxy} + J^{xzxz} + J^{yxyx} + J^{yyyy} + J^{yzyz} + J^{zxzx} + J^{zyzy} + J^{zzzz}}{9}\]- Parameters:
- parameter(3, 3, 3, 3) array-like
Full tensor parameter (\(\boldsymbol{J}\)).
- tensor_formbool, default False
Whether to return tensor form of biquadratic exchange parameter instead of the scalar.
- Returns:
- Bfloat or (3, 3, 3, 3) numpy.ndarray
Biquadratic exchange parameter.
If
tensor_form == False, then returns a number \(B\).If
tensor_form == True, then returns an array \(\boldsymbol{J}_B\).
See also
Examples
>>> import numpy as np >>> from magnopy import converter422 >>> parameter = np.ones((3, 3, 3, 3)) >>> B = converter422.to_biquadratic(parameter=parameter) >>> B 1.0 >>> J_B = converter422.to_biquadratic(parameter=parameter, tensor_form=True) >>> J_B array([[[[1., 0., 0.], [0., 0., 0.], [0., 0., 0.]], [[0., 1., 0.], [0., 0., 0.], [0., 0., 0.]], [[0., 0., 1.], [0., 0., 0.], [0., 0., 0.]]], [[[0., 0., 0.], [1., 0., 0.], [0., 0., 0.]], [[0., 0., 0.], [0., 1., 0.], [0., 0., 0.]], [[0., 0., 0.], [0., 0., 1.], [0., 0., 0.]]], [[[0., 0., 0.], [0., 0., 0.], [1., 0., 0.]], [[0., 0., 0.], [0., 0., 0.], [0., 1., 0.]], [[0., 0., 0.], [0., 0., 0.], [0., 0., 1.]]]])