Convention of spin Hamiltonian

Exercises

  1. Create an instance of magnopy.Convention for the following Hamiltonians

    \[\begin{split}\mathcal{H}_1 = - \sum_{i \neq j} J_{ij} \mathbf{S}_i \cdot \mathbf{S}_j \\ \mathcal{H}_2 = - \sum_{i, j} J_{ij} \mathbf{S}_i \cdot \mathbf{S}_j \\ \mathcal{H}_3 = 0.5 \sum_{i, j} J_{ij} \mathbf{S}_i \cdot \mathbf{S}_j \\ \mathcal{H}_4 = - \sum_{i < j} J_{ij} \mathbf{e}_i \cdot \mathbf{e}_j\end{split}\]

Before we move on to the Hamiltonian itself it is very important to understand that there is a dozen of different conventions of essentially the same type of Hamiltonian present in the literature. Here are a few examples of different conventions for the isotropic exchange term

\[ \begin{align}\begin{aligned}\mathcal{H} &= -\sum_{i,j} J_{ij} \boldsymbol{S}_i \cdot \boldsymbol{S}_j\\\mathcal{H} &= \sum_{i,j} J_{ij} \boldsymbol{e}_i \cdot \boldsymbol{e}_j\\\mathcal{H} &= -\dfrac{1}{2}\sum_{i<j} J_{ij} \boldsymbol{S}_i \cdot \boldsymbol{S}_j\end{aligned}\end{align} \]

Please read Convention problem for the illustration of the challenges that this problem introduces.

In magnopy we did not want to introduce a new one or to use one convention in particular. As a solution we decided to support any convention that the user wants to use. Naturally, that implied a responsibility on the user: to provide one! When spin Hamiltonian is read from the knows source (i. e. TB2J or GROGU), magnopy knows the convention and user can just read the Hamiltonian from the file like so

# Reading from TB2J
spinham = magnopy.io.load_tb2j("exchange.out")

# Reading from GROGU
spinham = magnopy.io.load_grogu("spinham-from-GROGU.txt")

However, magnopy.Convention object has to be created and supplied when the spin Hamiltonian is created by user. For example, to introduce the convention for the Hamiltonian that is written as

\[\mathcal{H} = \sum_i K_z\left(S_i^z\right)^2 + \dfrac{1}{2} \sum_{i, j>i} J_{i,j} \boldsymbol{S}_i \cdot \boldsymbol{S}_j\]

one shall create the convention object as

import magnopy

convention = magnopy.Convention(
    c21=1, c22=0.5, multiple_counting=False, spin_normalized=False
)

To consult the convention properties you can display either individual properties

1.0
False

or the whole convention

print(convention)
"custom" convention where
  * Bonds are counted once in the sum;
  * Spin vectors are not normalized;
  * Undefined c1 factor;
  * c21 = 1.0;
  * c22 = 0.5;
  * Undefined c31 factor;
  * Undefined c32 factor;
  * Undefined c33 factor;
  * Undefined c41 factor;
  * Undefined c421 factor;
  * Undefined c422 factor;
  * Undefined c43 factor;
  * Undefined c44 factor.

Pre-defined conventions

Magnopy has some pre-defined named conventions. To get one use

"grogu" convention where
  * Bonds are counted multiple times in the sum;
  * Spin vectors are normalized to 1;
  * Undefined c1 factor;
  * c21 = 1.0;
  * c22 = 0.5;
  * Undefined c31 factor;
  * Undefined c32 factor;
  * Undefined c33 factor;
  * Undefined c41 factor;
  * Undefined c421 factor;
  * Undefined c422 factor;
  * Undefined c43 factor;
  * Undefined c44 factor.
"vampire" convention where
  * Bonds are counted multiple times in the sum;
  * Spin vectors are normalized to 1;
  * Undefined c1 factor;
  * c21 = -1.0;
  * c22 = -0.5;
  * Undefined c31 factor;
  * Undefined c32 factor;
  * Undefined c33 factor;
  * Undefined c41 factor;
  * Undefined c421 factor;
  * Undefined c422 factor;
  * Undefined c43 factor;
  * Undefined c44 factor.
"tb2j" convention where
  * Bonds are counted multiple times in the sum;
  * Spin vectors are normalized to 1;
  * Undefined c1 factor;
  * c21 = -1.0;
  * c22 = -1.0;
  * Undefined c31 factor;
  * Undefined c32 factor;
  * Undefined c33 factor;
  * Undefined c41 factor;
  * Undefined c421 factor;
  * Undefined c422 factor;
  * Undefined c43 factor;
  * Undefined c44 factor.

Modifying convention

To get the convention where just a few of the properties are changed one can create a new convention and populate all of its properties again. Or use a shortcut

"tb2j" convention where
  * Bonds are counted multiple times in the sum;
  * Spin vectors are normalized to 1;
  * Undefined c1 factor;
  * c21 = -1.0;
  * c22 = -1.0;
  * Undefined c31 factor;
  * Undefined c32 factor;
  * Undefined c33 factor;
  * Undefined c41 factor;
  * Undefined c421 factor;
  * Undefined c422 factor;
  * Undefined c43 factor;
  * Undefined c44 factor.
"modified" convention where
  * Bonds are counted multiple times in the sum;
  * Spin vectors are normalized to 1;
  * Undefined c1 factor;
  * c21 = -1.0;
  * c22 = -1.0;
  * c31 = 1.0;
  * Undefined c32 factor;
  * Undefined c33 factor;
  * Undefined c41 factor;
  * Undefined c421 factor;
  * Undefined c422 factor;
  * Undefined c43 factor;
  * Undefined c44 factor.

Total running time of the script: (0 minutes 0.002 seconds)

Gallery generated by Sphinx-Gallery