  The leapfrog integrator is widely used because of its excellent stability in
molecular dynamics simulation. This is recognized as being due to the existence
of a discrete variational structure of the equations. We introduce a modified
leapfrog method which includes an additional energy-like conservation law by
embedding a molecular dynamics simulation within a larger dynamical system.
