Noncollinear magnetism: a frustrated triangle

In this tutorial

Three spins on a triangle that want to be antiparallel cannot all have their way. This is the simplest frustrated magnet. A collinear calculation can only offer up–up–down; a noncollinear one lets the moments turn by 120° and finds a lower state. You compute both for a stretched H\(_3\) triangle, compare them with the Heisenberg model as the triangle grows, and see what global spin rotations and the starting guess do. Time: below 0.2 s per run; the whole scan in about 15 s (16 cores). Files: h3_fm.yaml, h3_uud.yaml, h3_120.yaml, h3_120.out (reference output), run.sh.

Collinear and noncollinear

In an ordinary (collinear) spin-polarized calculation every electron is spin up or spin down along one common axis, and the magnetization density \(m(\mathbf r)\) points along it everywhere. In noncollinear mode each orbital is a two-component spinor

\[\begin{split} \psi_i(\mathbf r) = \begin{pmatrix}\psi_i^\uparrow(\mathbf r)\\ \psi_i^\downarrow(\mathbf r)\end{pmatrix}, \end{split}\]

and the density becomes a \(2\times2\) matrix, \(\rho(\mathbf r)\) plus a vector magnetization \(\mathbf m(\mathbf r)\) whose direction can vary in space. The exchange–correlation functional is evaluated in the local frame of \(\mathbf m\) (the Scalmani–Frisch construction for GGAs). It reduces exactly to the collinear functional when all moments are parallel.

Without spin–orbit coupling the energy does not depend on the absolute direction of the moments, only on their relative orientation.

The physics: a Heisenberg triangle

Three hydrogen atoms far apart each carry one unpaired electron. Neighbouring spins couple antiferromagnetically, which the Heisenberg model writes with unit vectors \(\hat{\mathbf e}_i\) along the moments:

\[ E = E_0 + J\,(\hat{\mathbf e}_1\cdot\hat{\mathbf e}_2 + \hat{\mathbf e}_1\cdot\hat{\mathbf e}_3 + \hat{\mathbf e}_2\cdot\hat{\mathbf e}_3), \qquad J>0. \]

state

\(\sum_{i<j}\hat{\mathbf e}_i\cdot\hat{\mathbf e}_j\)

energy

ferromagnetic ↑↑↑

\(3\)

\(E_0+3J\)

collinear ↑↑↓

\(-1\)

\(E_0-J\)

noncollinear, 120° apart

\(-\tfrac32\)

\(E_0-\tfrac32J\)

The 120° state is the lowest, and the model predicts

\[ \frac{E_{120°}-E_{\uparrow\uparrow\downarrow}}{E_{\rm FM}-E_{\uparrow\uparrow\downarrow}} = \frac{-J/2}{4J} = -\frac18 . \]

The input files

h3_120.yaml (equilateral triangle of side 2.5 Å, PBE/def2-TZVP):

system:
  charge: 0
  unpaired_electrons: 1
  units: angstrom

functional:
  backend: libxc
  exchange: GGA_X_PBE
  correlation: GGA_C_PBE

basis:
  name: def2-TZVP
  file: basis/def2-TZVP.nw

scf:
  mode: noncollinear       # 2x2 spin density: each moment along its own axis
  max_iter: 300
  level_shift: 0.2          # Ha; steadies the SCF when the coupling is weak (3.5 A)
  conv_tol: 1.0e-10

mesh:
  prune: none                # stretched H: the pruned H mesh misses the neighbours' density

coulomb:
  method: eri                # the same J as the noncollinear runs

atoms:
  - element: H
    position: [0.000000, 1.443376, 0.000000]
    moment: 1.0
    spin_axis: [0.0000000000, 1.0000000000, 0.0]
  - element: H
    position: [-1.250000, -0.721688, 0.000000]
    moment: 1.0
    spin_axis: [-0.8660254038, -0.5000000000, 0.0]
  - element: H
    position: [1.250000, -0.721688, 0.000000]
    moment: 1.0
    spin_axis: [0.8660254038, -0.5000000000, 0.0]
scf: mode: noncollinear

Two-component spinors. The functional must be HF, an LDA, or a libxc GGA or global hybrid (backend: libxc).

moment and spin_axis

The starting guess: a moment of one electron on each atom, pointing along spin_axis. Here the three moments point outward, 120° apart. The SCF is free to turn them.

level_shift

A virtual level shift for the first iterations. It switches itself off once the SCF is close, so it does not change the result. At 2.5 Å it is not needed; at 3.5 Å, where the coupling is only 0.1 mHa, the SCF wanders without it.

mesh: prune: none and coulomb: method: eri

For stretched H, the pruned default grid integrates the density with a relative error of \(2\times10^{-6}\), and the run warns. Unpruned it is \(10^{-9}\). ERI Coulomb is the default in noncollinear mode, and the collinear runs need it too, so that the energies are comparable.

h3_fm.yaml and h3_uud.yaml are ordinary collinear runs, with unpaired_electrons: 3 and moments \((1,1,1)\), and with unpaired_electrons: 1 and moments \((1,1,-1)\).

Running

$ tutorials/15_noncollinear/run.sh ./run_dft

The script runs the three states at 2.5 Å, then repeats them for sides of 2.0 to 3.5 Å.

Reading the output

  non-collinear SCF: backend=libxc, exchange=GGA_X_PBE, correlation=GGA_C_PBE, GGA=T
  complex DIIS on (8 vectors)
  virtual level shift =   0.2000 Ha
 ...
  level shift switched off at iteration 4
   spinor orbital energies around HOMO-LUMO (n_electrons_total = 3):
       #    1  HOMO-2   =      -0.2929054769 Ha    -7.97036 eV   occ= 1.0000
       #    2  HOMO-1   =      -0.2929028131 Ha    -7.97029 eV   occ= 1.0000
       #    3  HOMO     =      -0.2568180469 Ha    -6.98838 eV   occ= 1.0000
 ...
 e_total (Ha)   =      -1.5022607483
  per-atom LOCAL moment (own diagonal block, S-weighted):
   atom 1: Mx=  -0.00000  My=   0.98115  Mz=  -0.00000  |M|=   0.98115
   atom 2: Mx=  -0.84974  My=  -0.49049  Mz=  -0.00000  |M|=   0.98114
   atom 3: Mx=   0.84974  My=  -0.49049  Mz=   0.00000  |M|=   0.98114
 total moment: Mx=  -0.00000  My=   0.00016  Mz=  -0.00000  |M|=   0.00016
  • Local moments. Each atom carries 0.98 electron spins, pointing 120° apart. The total moment is zero, although the molecule has three electrons: no collinear state can do that.

  • Spinor energies. With three electrons there are no Kramers pairs. Each spinor holds one electron and has no fixed spin direction.

  • The noncollinear output has no Mulliken analysis or cube files. The local moments are the per-atom blocks of the magnetization.

../../_images/h3_spins.png

Fig. 37 The three states at 2.5 Å, with energies relative to up–up–down. The arrows are the atomic moments (Mulliken spin populations for the collinear runs).

state

\(E\) (Ha)

\(E-E_{\uparrow\uparrow\downarrow}\) (mHa)

moments

ferromagnetic

\(-1.4918023005\)

\(+9.388\)

1.00, 1.00, 1.00

up–up–down

\(-1.5011899916\)

\(0\)

0.98, 0.98, \(-0.96\)

noncollinear 120°

\(-1.5022607483\)

\(-1.071\)

0.98 each, 120° apart

The coupling is \(J=(E_{\rm FM}-E_{\uparrow\uparrow\downarrow})/4 = 2.35\) mHa. The noncollinear state lies 1.07 mHa below up–up–down, against \(J/2 = 1.17\) mHa from the model.

The Heisenberg limit

../../_images/h3_heisenberg.png

Fig. 38 Left: the ferromagnetic–up–up–down splitting and the gain of the 120° state against the side of the triangle. Right: their ratio, which tends to the Heisenberg value \(-1/8\).

side (Å)

\(E_{\rm FM}-E_{\uparrow\uparrow\downarrow}\) (mHa)

\(E_{120°}-E_{\uparrow\uparrow\downarrow}\) (mHa)

ratio

2.00

36.587

\(-3.308\)

\(-0.090\)

2.25

18.656

\(-1.972\)

\(-0.106\)

2.50

9.388

\(-1.071\)

\(-0.114\)

3.00

2.186

\(-0.259\)

\(-0.118\)

3.50

0.389

\(-0.049\)

\(-0.127\)

  • The coupling decays exponentially with distance, as the overlap of the atomic orbitals does.

  • The ratio tends to \(-1/8\). At short distances the electrons are not localized on the atoms: the moments shrink and depend on the spin arrangement, and the Heisenberg model with fixed moments is only approximate. As the atoms separate, the model becomes exact.

Things to try

run.sh --exercises runs both.

1. A global rotation

Turn every spin_axis by 90° about \(x\), so that the moments lie in the \(xz\) plane.

What you should find

\(E=-1.5022607483\) Ha, the same to all digits, and the moments rotate rigidly:

   atom 2: Mx=  -0.84974  My=   0.00000  Mz=  -0.49049  |M|=   0.98114

Without spin–orbit coupling the energy depends only on the angles between the moments. With spin_orbit: true the orientation relative to the molecule would matter too (magnetic anisotropy, tutorial 10).

2. The starting guess

Start from up–up–down with the two up moments canted by \(\pm t\) toward each other: h3_cant{0,10,30,50}.yaml.

What you should find

\(t\)

final state

\(E\) (Ha)

0°

up–up–down

\(-1.5011899916\)

10°, 30°

up–up–down, canted by 0.2°

\(-1.5011903813\)

50°

120°

\(-1.5022607483\)

Exactly collinear, the noncollinear run reproduces the collinear energy to \(10^{-10}\) Ha. Started close to it, the SCF returns to a nearly collinear state. In the Heisenberg model, up–up–down is a saddle point (canting the two up moments by \(\theta\) changes the energy as \(\cos2\theta-2\cos\theta\), a maximum at \(\theta=0\)), and DIIS converges to stationary points, not only to minima. Only the start at 50° reaches the 120° ground state. Start noncollinear runs from the expected spin texture, and compare several.

Troubleshooting

  • noncollinear XC: in-house functionals are LDA only. Use functional: backend: libxc for GGAs. Meta-GGAs and range-separated hybrids are refused.

  • The SCF wanders when moments are weakly coupled. Add level_shift: 0.2.

  • Not available in noncollinear mode: gradients, analysis: and cube output. The SCF uses moment_mode: fixed only. See the User Manual, scf: mode.

  • Large systems. coulomb: method: density_fitting with a JK-fitting basis speeds up the noncollinear SCF a lot.

Next: Cube files: spin density, ELF and density differences.