[gmx-developers] Flat-bottom position restraints: printing of instantaneous forces
Justin Lemkul
jalemkul at vt.edu
Thu Nov 16 14:05:37 CET 2017
On 11/13/17 1:26 AM, Mandar Kulkarni wrote:
> 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 below:
> [ 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.)
>
I wouldn't bother trying to hack the GROMACS source, just re-compute the
force due to the restraint after the simulation, based on the
z-coordinate over time. Extract the z-coordinates with gmx traj and
post-process the frames with whatever code you like. It's a simple
calculation.
-Justin
>
> Best Regards,
> Mandar Kulkarni
>
>
>
>
--
==================================================
Justin A. Lemkul, Ph.D.
Assistant Professor
Virginia Tech Department of Biochemistry
303 Engel Hall
340 West Campus Dr.
Blacksburg, VA 24061
jalemkul at vt.edu | (540) 231-3129
http://www.biochem.vt.edu/people/faculty/JustinLemkul.html
==================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20171116/fb29531e/attachment.html>
More information about the gromacs.org_gmx-developers
mailing list