Hamiltonian guiding center equations in a toroidal system