\(\hat{P}\)  verifies the relation \(\hat{P}^{2}=\hat{P}=\hat{P}^{-1}\)  in virtue of the fact the the eigenstates of the operator \(S_{z}\) , \(|S,M_{S}\rangle \) , form a complete \((2S+1)\) -fold basis set. Similar expressions are build for the case of non-vanishing angular momentum. The operator \(\hat{P}\)  can now be used to project the first \((2S+1)\)  states of the electronic Hamiltonian onto the basis set \(|S,M_{S}\rangle \) , thus eliminating the explicit dependence over all the electronic degrees of freedom. The resulting operator corresponds to an effective Hamiltonian function of the sole total spin operator, which exactly corresponds to the definition of the spin Hamiltonian[1]}, [2]}, [3]}
\(\hat{H}_{s}=\hat{P}\hat{H}_{el}\hat{P}^{-1}=\sum _{M_{S^{\prime }}}^{2S+1}\sum _{M_{S}}^{2S+1} | S,M_{S}\rangle \langle S, M_{S}| \hat{H}_{el} | S,M_{S^{\prime }}\rangle \langle S, M_{S^{\prime }}| \:.\) 
