Eq. REF  has the from of a linear system \(\mathbf {Ax}=\mathbf {B}\) , where the vector \(\mathbf {x}=(D_{11},D_{12},...,D_{33})\)  spans the nine elements of \(\mathbf {D}\)  that we want to determine, and the vector \(\mathbf {B}\)  spans the \((2S+1)^{2}\)  values of the right-hand side of Eq. REF . When the linear system is over-determined, it can be solved with common linear algebra routines for least-square fitting, leading to a set of spin Hamiltonian coefficients that optimally map the electronic Hamiltonian's low-lying eigenstates. This approach is valid for any spin Hamiltonian term that has its origin in the sole electronic degrees of freedom, such as the Heisenberg Hamiltonian and the Crystal Field effective Hamiltonian commonly used for Lanthanide complexes[1]}. A similar approach can be used to include the effect of the electronic Zeeman interaction, which leads to the mapping of the effective Zeeman spin Hamiltonian[2]}, [3]}. Other mapping procedures exist for interactions involving nuclear spins, such as the Hyperfine one[4]}. It should also be noted that the possibility to find a good solution to Eq. REF  lies on the assumption that we have knowledge of the function \(\hat{H}_{s}\)  that fits the spectrum of \(\hat{H}_{el}\) . For common classes of compounds this is usually known, but some care in this choice should be applied.
