I’m looking for a simple way to extract forces from a trr file with a certain time step for further matching it with the positions for further processing (not just plotting). First, I tried to use this command: gmx trjconv -f NVT.trr -s NVT.tpr -n index.ndx -o force.gro -force -dt 100
It gave me a gro file with output like 1670CL CL 8800 3.294 3.554 1.270 0.2940 0.1316 0.2854
where the last three values seem to be velocities and changing -force to -vel did not make any difference.
The best output utility I have found so far is to dump the trr file, then parse and match up with the previous output. gmx dump -f NVT.trr | grep f > force.txt
Yes, it is possible to do, but it does not look like a simple way to do it.
Am I using the trjconv utility correctly? Is it possible to output forces instead of velocities? Is there a simple way to output positions and forces of individual atoms in a tab/space-separted format?
@hess, thanks but it gives me a timeseries for specific atoms, which is convenient for plotting time series, but not processing and more complex plotting, let us say, making a running-averaged histogram of force by the z-coordinate. For this purpose, it is more convenient to read the dump file than the .xvg file. Given n atoms and m timeslices I want is a format like this: