AMBER Archive (2002)

Subject: a little bit confused with leap-frog algorithm...

From: Margaret Cheung (cheung_at_physics.ucsd.edu)
Date: Thu Mar 28 2002 - 15:08:40 CST


Dear Amber user and developers,

I'm trying to analyze the velocity output from amber.
I'm a bit confused with the program and I was wondering if someone
can give me a hand to understand the code more.

If I understand the leap-frog correctly, the expression for the new
velocities, based on the old velocities:

v(t+dt/2) = v(t-dt/2) + dt* f(t)/m

The update of the new coordiates is:

r(t+dt)=r(t)+dt*v(t+dt/2)

Which implied that kinetic energy (obtained at time t+dt/2) and potential
energy (obtained at time t+dt) can not be obtained
at the same time. However, in the code (runmd.f)

velocity is obtained by
V(I3) = (V(I3) + F(I3)*wfac)

and the coordinates are later obtained by
X(I3) = X(I3)+V(I3)*DTX

It seemed that amber obtained kinetic and potential energy at the same
time. Can someone give me some hint why it can be done so? I may have
a brain block lately. I
apologize if I ask a dumb question.

Sincerely,
Margaret S. Cheung
Biophysics Program
Physics Department 0319
University of California, San Diego
9500 Gilman Drive,
La Jolla, CA 92093-0319
http://www-physics.ucsd.edu/~cheung