How is magnetism implemented in the code?
Elk handles magnetism in a unique way thanks to an idea of Lars Nordström. In the first-variational step, the Hamiltonian matrix is set up in the APW basis using only the scalar effective potential, vs. The eigenvalues and wavefunctions obtained from this are then used as a basis for the second-variational Hamiltonian in which the effective magnetic field is included as σ⋅Bs. This Hamiltonian is also diagonalised and full spinor wavefunctions obtained which are then used to determine the density, ρ, and magnetisation vector field, m.