# Noncollinear magnetism: a frustrated triangle :::{admonition} Video :class: tip [Watch the narrated video of this tutorial on YouTube](https://www.youtube.com/watch?v=8rZf2xQmcHE). ::: :::{admonition} In this tutorial :class: tip 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:** {download}`h3_fm.yaml `, {download}`h3_uud.yaml `, {download}`h3_120.yaml `, {download}`h3_120.out ` (reference output), {download}`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 $$ \psi_i(\mathbf r) = \begin{pmatrix}\psi_i^\uparrow(\mathbf r)\\ \psi_i^\downarrow(\mathbf r)\end{pmatrix}, $$ 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