Currently people write magnetocrystalline anisotropy as $H_{an}=-K s_x^2$ from its classical counterpart: $H_{an}=-K ( \sin \theta)^2$ where $K$ is the anisotropy constant, but for spin 1/2, $s_x^2$ is just the identity matrix, which shows no anisotropy, so how to write the correct form of microscopic Hamiltonian?
I also heard that magnetocrystalline anisotropy comes from spin-orbit interaction, is there some paper depict there relations? like deriving the Heisenberg Hamiltonian $S_i \cdot {S_j}$ from Coulomb interaction by Dirac?