fixed spin_hamiltonian2.cpp to express symmetry