How to save the force on a molecule in GROMACS? I am a new student of molecular dynamics. I have started using GROMACS a month ago.  

I have a small box of 8192 molecules each with 3 atoms. I froze the last molecule and ran the simulation. I even converted the .trr file from binary to .gro and checked that the last molecule indeed stayed in the same place. 

However, I want the .trr file to print the force on each molecule or each atom - in the x, y, and z-direction.
I even set the nstfout in the grompp.mdp file to a reasonable non zero number - 5000. 

However, the .trr file - when converted to .gro - did not show the force. Can someone tell me what I am doing wrong and how to get GROMACS to save/reveal the force in the .trr file?
Gro output format does not support forces, so using it as an intermediate output format defeats your purpose.

Use

gmx traj -f your.trr -of


which runs the gmx wrapper binary, calling the traj module to do trajectory processing, names your input trajectory file after -f and triggers the output of forces with -of (optionally named after -of, defaulting to force.xvg), or similarly

gmx dump -f your.trr


to dump the entire contents of the file including forces) to the terminal.

See also

gmx help traj


or

gmx traj -h


or http://manual.gromacs.org/documentation/5.1/onlinehelp/gmx-traj.html

Note that I currently develop GROMACS.