# Force from gmx traj

**URL:** <https://gromacs.bioexcel.eu/t/force-from-gmx-traj/2754>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [August 31, 2021, 10:19am UTC](https://gromacs.bioexcel.eu/t/force-from-gmx-traj/2754 "2021-08-31T10:19:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![di\_jin](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@di\_jin](https://gromacs.bioexcel.eu/u/di_jin)\
**Post date:** [August 31, 2021, 10:19am UTC](https://gromacs.bioexcel.eu/t/force-from-gmx-traj/2754/1 "2021-08-31T10:19:44Z")

</div>

GROMACS version:2020.4-MODIFIED  
GROMACS modification: Yes  
Here post your question

1. I used gmx traj -fo to evaluate force, but the output has a unit of “Force (kJ mol\S-1\N nm\S-1\N) .”  
In the command-line description, it wasn’t clearly explained how force is calculated and why it has a strange unit.

2. What is the difference between -cf and -of? I read that :  
" Options -cv and -cf write the average velocities and average forces as temperature factors to a .pdb file with the average coordinates or the coordinates at -ctime. The temperature factors are scaled such that the maximum is 10."  
I don’t understand the purpose of a pdf file and what “temperature factor scaling” means.

Thank you,  
Di

---

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [September 1, 2021, 10:42am UTC](https://gromacs.bioexcel.eu/t/force-from-gmx-traj/2754/2 "2021-09-01T10:42:00Z")

</div>

Hi,  
with options -of the tools extracted the forces storaged in traj.trr and write it in xvg format. During molecular dynamics simulation, forces on each atom are computed as -dV/dr (see [Molecular Dynamics — GROMACS 2021.3 documentation](https://manual.gromacs.org/current/reference-manual/algorithms/molecular-dynamics.html?highlight=molecular%20dynamics%20simulation)) and storaged in traj.trr (based on the setting in the mdp file)

The unit may look strange (in xmgrace format), but the unit is [kJ]/[mol nm] in line with unit used in GROMACS ([Definitions and Units — GROMACS 2021.3 documentation](https://manual.gromacs.org/current/reference-manual/definitions.html?highlight=unit) )

the option -cf write the average forces as temperature factors to a [.pdb](https://manual.gromacs.org/current/reference-manual/file-formats.html#pdb) file.  
I guess, one application can be to be able to visualize this information using visualization software. Some visualization tool allows to color atoms according the values located in pdb at the position of the temperature factor. But I never used this option my self. Maybe other users know more.

Best  
Alessandra

---

<div class="post-metadata">

**Author:** ![di\_jin](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@di\_jin](https://gromacs.bioexcel.eu/u/di_jin)\
**Post date:** [September 1, 2021, 11:09am UTC](https://gromacs.bioexcel.eu/t/force-from-gmx-traj/2754/3 "2021-09-01T11:09:18Z")

</div>

Thanks Alevilla. That’s helpful. So you are saying the -cf option makes a heat map of forces. I guess that makes sense.
