# 7. Noncollinear magnetism With `scf: mode: noncollinear` the SCF works with the full $2\times2$ spin density matrix, so every atom's moment can point along its own `spin_axis`: canted, Néel or spiral spin textures, frustrated magnets, and spin–orbit coupling. ```{literalinclude} ../tutorials/15_noncollinear/files/h3_120.yaml :language: yaml ``` ## Scope - Functionals: Hartree–Fock (gives GHF), LDA, GGA and global-hybrid GGA. GGAs use the rotation-invariant construction of [Scalmani and Frisch](#ref-sf12). Meta-GGAs, range-separated and local hybrids are refused. The theory of noncollinear spin DFT goes back to [Kübler et al. (1988)](#ref-kubler88). - Coulomb: `eri` (default) or `density_fitting`, which fits the spinor exchange too (`ri_exchange`); use a JK-fitting set. - `moment_mode: fixed`; no analysis or cube output, no gradients. - The output lists every atom's local moment ($M_x, M_y, M_z, |M|$) and the spinor orbital energies around the gap. ## Spin–orbit coupling `scf: spin_orbit: true` adds a spin–orbit operator to the Fock matrix; `soc_scale` scales it. `constrain_axis: [x,y,z]` holds the total moment along a direction, which is how magnetic anisotropy energies are obtained. Two-component X2C with spin–orbit uses the same mode ({doc}`Tutorial 14 <../tutorials/14_x2c/index>`; [Liu and Peng](#ref-x2c)). ## Tips - Set each atom's `moment` and `spin_axis`; the starting directions select the solution. - A `level_shift` switches itself off once the DIIS error is below 10⁻³. DIIS converges much faster than damping. - Compare the energies of several starting textures: frustrated systems have several local solutions. Related tutorial: {doc}`../tutorials/15_noncollinear/index` (a frustrated H₃ triangle: ferromagnetic, up-up-down and 120° solutions).