Single particle hamiltonian solver