magnopy.examples.cubic_ferro_nn#
- magnopy.examples.cubic_ferro_nn(a: float = 1, J_iso: float = 1, J_21=(0, 0, 0), S: float = 0.5, dimensions: int = 3) SpinHamiltonian[source]#
Prepares ferromagnetic Hamiltonian on the cubic lattice with one atom per unit cell.
Only nearest-neighbor isotropic exchange interactions and on-site quadratic anisotropy are populated. The Hamiltonian has the form
\[\mathcal{H} = \dfrac{1}{2} \sum_{\mu, \nu} J_{iso} \left( \boldsymbol{S}_{\mu} \cdot \boldsymbol{S}_{\mu+\nu} \right) + \sum_{\mu} \boldsymbol{S}_{\mu} \cdot \boldsymbol{J}_{21} \cdot \boldsymbol{S}_{\mu}\]where
\(\nu \in {(1,0,0), (-1,0,0)}\) if
dimensions == 1.\(\nu \in {(1,0,0), (-1,0,0), (0,1,0), (0,-1,0)}\) if
dimensions == 2.\(\nu \in {(1,0,0), (-1,0,0), (0,1,0), (0,-1,0), (0,0,1), (0,0,-1)}\) if
dimensions == 3.
- Parameters:
- afloat, default 1.0
Lattice parameter of the cubic lattice. The unit cell of the Hamiltonian is defined as
[[a, 0, 0], [0, a, 0], [0, 0, a]]
- J_isofloat, default 1.0
Isotropic exchange parameter for the pairs of the nearest-neighbor magnetic sites, given in energy units. Only magnitude is important, sign is ignored.
- J_21(3, 3) or (3, ) array-like, default (0, 0, 0)
On-site quadratic anisotropy.
- Sfloat, default 0.5
Spin value of the magnetic site.
- dimensionsint, default 3
Either 1, 2 or 3. Dimensionality of the spin Hamiltonian.
- Returns:
- spinham
SpinHamiltonian Spin Hamiltonian.
- spinham
Examples
To get an example with the default values use
>>> import magnopy >>> spinham = magnopy.examples.cubic_ferro_nn()
>>> spinham.cell array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]])
>>> spinham.atoms.names ['X'] >>> spinham.atoms.spins [0.5] >>> spinham.atoms.positions [[0, 0, 0]]
>>> for _, alphas, parameter in spinham.p21: ... print(alphas[0], parameter, sep="\n") 0 [[0. 0. 0.] [0. 0. 0.] [0. 0. 0.]]
>>> for nus, alphas, parameter in spinham.p22: ... print(alphas[0], alphas[1], nus[0]) ... print(parameter) 0 0 (-1, 0, 0) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]] 0 0 (0, -1, 0) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]] 0 0 (0, 0, -1) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]] 0 0 (0, 0, 1) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]] 0 0 (0, 1, 0) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]] 0 0 (1, 0, 0) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]]
With this function one can customize a few things of the Hamiltonian:
Lattice parameter
>>> import magnopy >>> spinham = magnopy.examples.cubic_ferro_nn(a=2) >>> spinham.cell array([[2., 0., 0.], [0., 2., 0.], [0., 0., 2.]])
Spin values
>>> import magnopy >>> spinham = magnopy.examples.cubic_ferro_nn(S=1.5) >>> spinham.atoms.spins [1.5]
Value of the isotropic exchange
>>> import magnopy >>> spinham = magnopy.examples.cubic_ferro_nn(J_iso=2) >>> for nus, alphas, parameter in spinham.p22: ... print(alphas[0], alphas[1], nus[0]) ... print(parameter) 0 0 (-1, 0, 0) [[-2. -0. -0.] [-0. -2. -0.] [-0. -0. -2.]] 0 0 (0, -1, 0) [[-2. -0. -0.] [-0. -2. -0.] [-0. -0. -2.]] 0 0 (0, 0, -1) [[-2. -0. -0.] [-0. -2. -0.] [-0. -0. -2.]] 0 0 (0, 0, 1) [[-2. -0. -0.] [-0. -2. -0.] [-0. -0. -2.]] 0 0 (0, 1, 0) [[-2. -0. -0.] [-0. -2. -0.] [-0. -0. -2.]] 0 0 (1, 0, 0) [[-2. -0. -0.] [-0. -2. -0.] [-0. -0. -2.]]
Diagonal of the on-site quadratic anisotropy
>>> import magnopy >>> spinham = magnopy.examples.cubic_ferro_nn(J_21=(1, 2, -1)) >>> for _, alphas, parameter in spinham.p21: ... print(alphas[0], parameter, sep="\n") 0 [[ 1. 0. 0.] [ 0. 2. 0.] [ 0. 0. -1.]]
Dimensionality of the nearest neighbors
1D ferromagnet
>>> import magnopy >>> spinham = magnopy.examples.cubic_ferro_nn(dimensions=1) >>> for nus, alphas, parameter in spinham.p22: ... print(alphas[0], alphas[1], nus[0]) ... print(parameter) 0 0 (-1, 0, 0) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]] 0 0 (1, 0, 0) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]]
2D ferromagnet
>>> spinham = magnopy.examples.cubic_ferro_nn(dimensions=2) >>> for nus, alphas, parameter in spinham.p22: ... print(alphas[0], alphas[1], nus[0]) ... print(parameter) 0 0 (-1, 0, 0) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]] 0 0 (0, -1, 0) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]] 0 0 (0, 1, 0) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]] 0 0 (1, 0, 0) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]]
3D ferromagnet (default)
>>> spinham = magnopy.examples.cubic_ferro_nn(dimensions=3) >>> for nus, alphas, parameter in spinham.p22: ... print(alphas[0], alphas[1], nus[0]) ... print(parameter) 0 0 (-1, 0, 0) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]] 0 0 (0, -1, 0) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]] 0 0 (0, 0, -1) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]] 0 0 (0, 0, 1) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]] 0 0 (0, 1, 0) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]] 0 0 (1, 0, 0) [[-1. -0. -0.] [-0. -1. -0.] [-0. -0. -1.]]