  We propose a Hamiltonian dynamics formalism for the current and magnetic
field driven dynamics of ferromagnetic and antiferromagnetic domain walls in
one dimensional systems. To demonstrate the power of this formalism, we derive
Hamilton equations of motion via Poisson brackets based on the
Landau-Lifshitz-Gilbert phenomenology, and add dissipative dynamics via the
evolution of the energy. We use this approach to study current induced domain
wall motion and compute the drift velocity. For the antiferromagnetic case, we
show that a nonzero magnetic moment is induced in the domain wall, which
indicates that an additional application of a magnetic field would influence
the antiferromagnetic domain-wall dynamics. We consider both cases of the
magnetic field being parallel and transverse to the N{\'e}el field. Based on
this formalism, we predict an orientation switch mechanism for
antiferromagnetic domain walls which can be tested with the recently discovered
N{\'e}el spin orbit torques.
