Convention problem#
An illustration#
To illustrate the problem of the convention we consider an simple example of a nearest-neighbor model on a cubic lattice with one spin per unit cell
where \(J_{\nu} = 1\) meV if two spins \(\boldsymbol{S}_{\mu}\) and \(\boldsymbol{S}_{\mu+\nu}\) are nearest-neighbors and zero otherwise. Moreover, we assume that the value of spin is \(|\boldsymbol{S}_{\mu}| = 3/2\) and all spins are oriented along positive \(\hat{z}\) direction. What is the energy of the system in this configuration? The answer to this question is, surprisingly, impossible to give, as we do not know two important facts:
Does the sum count both terms \((\mu;\mu+\nu)\) and \((\mu+\nu;\mu)\)? In other words: does the sum include double-counting?
Are spin vectors normalized to unity? I.e. does \(|\boldsymbol{S}_{\mu}| = 1\) in the sum and the spin value is accounted for in the exchange parameters or not?
Each of those questions has two answers and together we have four different possible answers for the energy per unit cell:
\(E = 6\) meV if bonds are counted twice and spins are normalized;
\(E = 13.5\) meV if bonds are counted twice and spins are not normalized;
\(E = 3\) meV if bonds are counted once and spins are normalized;
\(E = 6.75\) meV if bonds are counted once and spins are not normalized.
If one add the freedom of writing the constant before the sum, then the amount of different answers will be even larger. Often in the literature the same Hamiltonian is written with \(\pm 1\) or \(\pm 1/2\) in front of the sum.
Therefore, set of parameters, without the knowledge of the convention of spin Hamiltonian is not enough to define it. At the same time is does not matter in what convention the Hamiltonian is written if the parameters are correctly converted to it. In other words, energy of the system does not depend just on the convention or just on the parameters. It depend on the both parameters and convention.
If the Hamiltonian above is given for the convention (1) with \(J_{\nu} = 1\) meV. Then for the remaining three conventions the parameters should be
\(J_{\nu} = 6/13.5\) meV, then \(E = 6\) meV;
\(J_{\nu} = 2\) meV, then \(E = 6\) meV;
\(J_{\nu} = 6/6.75\) meV, then \(E = 6\) meV.
If the pair of the parameters and convention is specified correctly, then the energy of the system does not depend on it.
Magnopy's approach#
Magnopy does not give preference to any convention, supports each one of them and implements conversion between any pair of conventions. Magnopy was written to automatically handle everything that concerns convention of the Hamiltonian. User only have to specify the convention upon the creation of spin Hamiltonian. If the Hamiltonian is read from the know source (i.e. TB2J, GROGU), then the convention of this source is known and set automatically.
The Convention in magnopy is implemented in the form of the small Convention
class and is fully defined by the following
c1,c21,c22,c31,c32,c33,c41,c421,c422,c43,c44Eleven constants of the expanded form of the spin Hamiltonian
\[\begin{split}C_1 \qquad C_{2,1} \qquad C_{2,2} \qquad C_{3,1} \qquad C_{3,2} \qquad C_{3,3} \\ C_{4,1} \qquad C_{4,2,1} \qquad C_{4,2,2} \qquad C_{4,3} \qquad C_{4,4}\end{split}\]Each constant is an individual property of the convention and affect the corresponding term of the expanded form of the Hamiltonian.
spin_normalizedWhether spins are normalized. This property affects all terms of the expanded form.
multiple_countingWhether bonds are counted multiple times. This property does not affect first, second, fourth and seventh terms of the expanded form.
This property is responsible for the double counting from the example. However, for the terms with more than two spins the equivalent bonds are counter not twice, but more times. That is why we do not name this property as "double counting".
Some of the properties above can be undefined if no corresponding parameter are present. If any of the parameters is affected by some property, then it have to be defined.