[gmx-developers] Scaling velocities in Velocity Verlet

Shirts, Michael (mrs5pt) mrs5pt at eservices.virginia.edu
Sat Dec 3 21:37:37 CET 2011


Hi, all-

> The problem is that the change in Ekin comes one step too late. I tried
> to deduce the algorithm from the code (4.5 code base) and deduced the
> following MD algorithm:

It's rather difficult to follow currently because of the need to bookkeep
both md and md-vv + plus correct pressure control w/constraints. I have high
hopes for improving this for 5.0.

> v(t) = v(t-dt/2) + a(t) dt/2
> 
> v'(t) = lambda v(t)   <======= my addition
> 
> v(t+dt/2) = v'(t) + a(t) dt/2
> 
> r(t+dt) = r(t) + v(t+dt/2) dt
> 
> However, the Ekin that is printed is the uncorrected one even though I
> scale both ekind->ekin and ekind->tcstat[x].ekinf .
> 
> Is the algorithm correct as I write it above? Is the Ekin(t) already
> stored at the beginning of the time step?

If you add your modification as an option to update_tcouple, and operate on
ekind directly (not the velocities), in the same way that berendsen_tcouple
does, then the bookkeeping should take care of the velocity rescaling
appropriately.   

If this _doesn't_ work, then there's some tweaks that got lost in the
different versions that are floating around, and I can either put the
changes into 4.6 alone, or just add them in with the 4.6 merge.

Best,
~~~~~~~~~~~~
Michael Shirts
Assistant Professor
Department of Chemical Engineering
University of Virginia
michael.shirts at virginia.edu
(434)-243-1821


 
> v(t) = v(t-dt/2) + a(t) dt/2
> 
> v'(t) = lambda v(t)   <======= my addition
> 
> v(t+dt/2) = v'(t) + a(t) dt/2
> 
> r(t+dt) = r(t) + v(t+dt/2) dt
> 
> However, the Ekin that is printed is the uncorrected one even though I
> scale both ekind->ekin and ekind->tcstat[x].ekinf .
> 
> Is the algorithm correct as I write it above? Is the Ekin(t) already
> stored at the beginning of the time step?
> 
> 
> -- 
> David van der Spoel, Ph.D., Professor of Biology
> Dept. of Cell & Molec. Biol., Uppsala University.
> Box 596, 75124 Uppsala, Sweden. Phone: +46184714205.
> spoel at xray.bmc.uu.se    http://folding.bmc.uu.se
> -- 
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-developers-request at gromacs.org.




More information about the gromacs.org_gmx-developers mailing list