The derivation of a symmetry‐adapted generalized spin Hamiltonian