The Heisenberg model used in the JaSS is written in the form

H = Σi>jJijSiSj.                                                  (1)

If exchange constants are to be compared with models, where the summation runs twice over each pair of indexes (i.e. Σi>jJ'ijSiSj ), then 2J'ij=Jij.

We assume that results of the density functional theory (DFT) calculation can be mapped onto classical Heisenberg model written in the form (1). Then the total energy difference, δE, between ferromagnetic (FM) and antiferromagnetic (AFM) solutions for an isolated pair of spins is δE = 2JS2 and J = δE/(2S2). If there is a spin lattice instead of a pair spin and only the exchange interaction between nearest neighbors J is nonvanishing, then

J =(E↑↑E↑↓)/(2zS2),                                       (2)

where z is the number of nearest neighbors. Thus, we see that in order to calculate one exchange parameter one needs to know the total energies of two magnetic configurations.

In general there can be N exchange paths Jij. In order to calculate all of them one needs to find total energies of at least N+1 magnetic configurations and again express these total energies via Jij and S2 . This is exactly what JaSS does. There are many technical details though, e.g.

• Some of these expressions for the total energies can be useless (linear dependent). E.g., in the simplest case of two spins one may calculate 4 configurations (↑ − ↑, ↑ − ↓, ↓ − ↑, and ↓ − ↓), but only two of them are linearly independent (compare with the pairs method). JaSS automatically choses only linearly independent configurations for calculations.
• It may turn out that DFT calculations for some of the configurations either do not converge or converge to such a state, when magnetic moments are very different from what we have in case other configurations. Such odd configurations cannot be used for calculations of J. JaSS takes care of these situations and analyses output files of DFT calculations on this issue;
• In methods like DFT+U (aka LDA+U or GGA+U) different local minima of the density functional may exist and different configurations in principle may stack at different local minima. In general such configurations also cannot be used for exchange (but there are exceptions, where indeed magnetic order is implicitly related with an orbital order).