[gmx-developers] Flat-bottom position restraints: printing of instantaneous forces

Mandar Kulkarni mandar.kulkarni.chem at gmail.com
Mon Nov 13 07:26:47 CET 2017

Dear Gromacs Developers,
I am running osmotic pressure simulation using GROMACS 5.0.7 version. I am
applying flat-bottom potential similar to the work of Lay et al. (J. Chem
Theory Comput., 2016,12, 1401).

I have provided reference pdb which has Z-coordinates of solute atoms to be
restrained are set to the value of  half of the box length in Z-direction
and layer like potential is applied using posre.itp with a format shown
[ position_restraints ]
;  i funct      g    r    k
   1    2      5    2.8    1000

I would like to print instantaneous force acting on the wall due to solute
atoms while running a simulation. I guess that forces are calculated in
"position-restraints.cpp" file and Line 293 gives the total force acting on
the wall for layer-like flat bottom potential.

for (m = 0; (m < DIM); m++)
            f[ai][m]   += fm[m];
            /* Here we correct for the pbc_dx which included rdist */
            vir_diag[m] -= 0.5*(dx[m] + rdist[m])*fm[m];

Please, any guidance to implement printing of instantaneous forces will be
really helpful.
Thanks in advance.

(PS: I am sorry if this is answered previously, but I am unable to find the
similar discussions in archived threads.)

Best Regards,
Mandar Kulkarni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20171113/48a6dcc8/attachment.html>

More information about the gromacs.org_gmx-developers mailing list