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

H = Σ_{i>j}J_{ij}**S**_{i}**S*** _{j}*. (1)

If exchange constants are to be compared with models, where the summation runs twice over each pair of indexes (i.e. Σ_{i>j}J'_{ij}**S**_{i}**S*** _{j}* ), then 2

*J'*=

_{ij}*J*.

_{ij}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* = 2*JS*^{2} and *J* = *δE*/(2*S*^{2}). 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*_{↑↓})/(2*zS*^{2}), (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 *J _{ij}*. 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

*J*and

_{ij}*S*

^{2}. 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).