[gmx-developers] velocity gradient in do_update_md

Gaurav Goel gauravgoeluta at gmail.com
Sun Jun 13 22:23:44 CEST 2010


Hello.

I'm trying to implement a velocity gradient in my simulations. The
algorithm I'll be using is:
1. Define a thin "hot" slab in the xy-plane at z=0 and a "cold' slab
at z=L/2 (L is the length of simulation box)
2. After every 'f' time steps replace the velocity of the fastest atom
in the cold slab with the slowest atom in the hot slab.

To achieve this I'll be modifying the do_update_md() subroutine in
src/mdlib/update.c. Below is the call to this subroutine from void
update()

do_update_md(start, homenr, dt, ekind->tcstat, ekind->grpstat,......)

within do_update_md() the loop over atoms is:
for (n=start;n<start+homenr;n++) {
---------
---------
}

I've a few questions regarding the working of this subroutine,
especially when running mdrun in parallel. For successful
implementation of my code I will need to-

A. loop over all atoms
-Is the loop 'for (n=start;n<start+homenr;n++) {....}' over all atoms
in the box?

B. locate the slowest (fastest) atom in hot (cold) slab.
-Are the particle positions stored between [0,L] or [-L/2, L/2].

C. Exchange their velocities.

Thanks,
Gaurav



More information about the gromacs.org_gmx-developers mailing list