[gmx-users] pair forces

Mark Abraham Mark.Abraham at anu.edu.au
Sun Nov 2 22:35:10 CET 2008

Inon Sharony wrote:
>  Hi everyone!
> I'm trying to get the value for the force (sum of all forces) between 
> two specific atoms (which I have defined in two index, energy and charge 
> groups).
> I've tried using g_energy (also with the -pairs option which I think may 
> be irrelevant here). Does anyone have an idea how to get the information 
> I want?

GROMACS does calculate pairwise forces and interaction energies by 
looping over groups, storing subtotals for energygrps, but it only 
calculates grand totals for forces.

You could use the mdrun -rerun facility to get this. Run the normal 
simulation, and then another one after zeroing out the charge, vdW for 
all atoms other than the pair of interest, and all the bonded 
parameters. The only things left are the forces of that interacting 
pair, which you write to a trajectory file with nstfout.

Caveat: no force fields were parameterized to model pairwise forces. 
They may do an OK job, because there were parameterized to reproduce 
quantities that are mostly likely to be accurate if the pairwise forces 
are also reasonable, but cancellation of compensating errors in 
individual pairwise forces could easily be occurring.


More information about the gromacs.org_gmx-users mailing list