## Spin-orbit coupling in 2nd variation

We usually use the scalar-relativistic FLAPW method to obtain the solutions of the KS equations in a "first variation". When spin-orbit coupling (SOC) has to be included, we do not consider SOC in the interstitial and vacuum regions, assume that only spherically-symmetric MT-sphere potential components contribute to SOC and neglect the small components of the wavefunctions. Therefore, only the large components of contribute through the SOC matrix elements of the Hamiltonian

where we neglect the spin-orbit contribution to the overlap of due to SOC.

When spin-orbit interaction gives only a small contribution to the Hamiltonian, in a collinear calculation one can make use of that by recognizing that the eigenfunctions of the scalar-relativistic Hamiltonian are much more efficient basisfunctions for the variational treatment of the relativistic Hamiltonian than the original LAPW basis functions. Thus after determining the eigenvectors of the scalar-relativistic Hamiltonian we expand the wavefunction as

where the expansion coefficients are assumed to be already multiplied with the Pauli spinor belonging to .

This constitutes a second variational eigenproblem where is the number of basisfunctions per spin with typically where is the number of occupied states.

For calculations using SOC in 2nd variation is a convergence parameter. In the Fleur input file it is
specified in `calculationSetup/cutoffs/@numbands`

. If the parameter is set to 0 a material-dependent
default value is assigned. The same is done if the assigned value is lower than the default. The actually
used parameter is written out to the out.xml file in `numericalParameters/bands/@numbands`

.

The expansion coefficients are determined by the second eigenproblem as

(In a non-magnetic system the eigenvectors of the first variation will simply be doubled for the above expansion.)

This is activated in the `soc`

tag of the `calculationSetup`

section
by setting the `l_soc="T"`

switch in the Fleur input file, e.g.:

```
<soc theta=".00" phi=".00" l_soc="T" spav="F" />
```

The angles `theta`

and `phi`

are the polar and azimuthal
angles (in units of ) defining the direction of the spin-quantization
axis (SQA), i.e., normally the magnetization direction. With the `spav`

feature you can trigger the usage of a spin-averaged potential instead of
in the Hamiltonian above.

Note, that SOC usually lowers the symmetry of the crystal, e.g., cubic bcc Fe will
become tetragonal if the magnetization points in one of the cubic axes. Therefore,
already at the level of the input-file generator one can define `&soc 0.0 0.0 /`

where the two numbers are again the angles and . If this is not
done an activation of the SOC may conflict with the available symmetry operations
determined by the input generator.

Taking SOC into account will not only add the spin-orbit contribution to the total energy (which allows calculating magnetic anisotropies) but also gives access to the orbital magnetic moments (projected onto the SQA). Note, that the SOC treatment in second variation leads to a "doubling of eigenvalues" since each state (with components in both spin-sectors now) will show up in both spin channels.

It is possible to restrict the relativistic treatment to only selected atoms
in the unit cell by activating the `socscale`

feature in the `special`

tag
of the `atomSpecies`

section. E.g. setting `socscale="0.0"`

switches
off SOC in the selected atom species.

Apart from self-consistent SOC calculations, it is also possible to apply the magnetic force theorem to calculate the magnetocrystalline anisotopy. The corresponding documentation can be found here.

Note, that strong SOC will generally give rise to non-collinearity in the system so that this collinear + second variation scheme is not necessarily always a good choice. Then a non-collinear calculation and treatment of SOC in first variation is preferable.