[gmx-users] Changing cos_acceleration

toma0052 toma0052 at umn.edu
Wed Apr 18 00:21:02 CEST 2007


Hello,
     I am working with a DPPC lipid bilayer system in water, and I would like
to add a shear force to the bilayer.  Preferably, this force would be a
function of the z coordinate and be maximal at the bilayer surface and decay
to zero at the box top and bottom.  For this, I have been looking a the
cos_acceleration option, but it doesn't quite give me what I want.  The
Manual says that the magnitude of the acceleration is calculated by
cos(2*pi*z/boxheight).  For the size of the bilayer and box in my system,
things happen to work out nicely if the magnutude of the acceleration were
calculated as cos(2*pi*z/boxheight - pi/2).  This would give me an
acceleration of zero at the box top and bottom as well as the center, and
maximal acceleration at roughly the bilayer top and bottom surface.  I was
wondering if there was an easy to make this switch in Gromacs?
     If there is no easy to do this, I am assuming that I have to modify the
source code.  I found in update.c a line that reads:

cosz = cos(fac*x[n][ZZ])

Would this essentially be the part I am looking for, and I would just have to
change it to: cosz = cos(fac*x[n][ZZ] - PI/2)?
Are there other parts of the source code that I would have to change besides
update.c?

Thank you,
Mike Tomasini




More information about the gromacs.org_gmx-users mailing list