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} \boldsymbol{S}_{\mu} \cdot \boldsymbol{S}_{\mu+\nu} + \sum_{\mu} \boldsymbol{S}_{\mu} \boldsymbol{J}_{21} \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:
spinhamSpinHamiltonian

Spin Hamiltonian.

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 alpha, parameter in spinham.p21:
...     print(alpha, parameter, sep="\n")
0
[[0. 0. 0.]
 [0. 0. 0.]
 [0. 0. 0.]]
>>> for alpha, beta, nu, parameter in spinham.p22:
...     print(alpha, beta, nu)
...     print(parameter)
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.]]
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 alpha, beta, nu, parameter in spinham.p22:
    ...     print(alpha, beta, nu)
    ...     print(parameter)
    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.]]
    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 alpha, parameter in spinham.p21:
    ...     print(alpha, parameter, sep="\n")
    0
    [[ 1.  0.  0.]
     [ 0.  2.  0.]
     [ 0.  0. -1.]]
    
  • Dimensionality of the nearest neighbors

    >>> import magnopy
    >>> spinham = magnopy.examples.cubic_ferro_nn(dimensions=1)
    >>> for alpha, beta, nu, parameter in spinham.p22:
    ...     print(alpha, beta, nu)
    ...     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.]]
    >>> spinham = magnopy.examples.cubic_ferro_nn(dimensions=2)
    >>> for alpha, beta, nu, parameter in spinham.p22:
    ...     print(alpha, beta, nu)
    ...     print(parameter)
    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.]]
    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.]]