d2 and d8 Quadrate energy levels including spin-orbit perturbation