GMX-TRAJ(1)
πΈ NAME πΈ
gmx-traj β the little GROMACS icon that plots x, v, f, box, temperature and rotational energy straight out of your trajectories πβ¨
π SYNOPSIS π
gmx traj [-f [<.xtc/.trr/...>]] [-s [<.tpr/.gro/...>]] [-n [<.ndx>]]
[-ox [<.xvg>]] [-oxt [<.xtc/.trr/...>]] [-ov [<.xvg>]]
[-of [<.xvg>]] [-ob [<.xvg>]] [-ot [<.xvg>]] [-ekt [<.xvg>]]
[-ekr [<.xvg>]] [-vd [<.xvg>]] [-cv [<.pdb>]] [-cf [<.pdb>]]
[-av [<.xvg>]] [-af [<.xvg>]] [-b <time>] [-e <time>]
[-dt <time>] [-tu <enum>] [-[no]w] [-xvg <enum>] [-[no]com]
[-[no]pbc] [-[no]mol] [-[no]nojump] [-[no]x] [-[no]y]
[-[no]z] [-ng <int>] [-[no]len] [-[no]fp] [-bin <real>]
[-ctime <real>] [-scale <real>]
π¦ DESCRIPTION π¦
okay so gmx traj is literally that girl when it comes to plotting. She plots coordinates, velocities, forces and/or the box. that's her whole thing. no cap. π«Ά
pop -com and the coordinates, velocities and forces all get calculated for the center of mass of each group instead of per-atom vibes. and the moment you set -mol, the numbers in your index file get read as molecule numbers instead of atom numbers, and then the exact same procedure as -com runs for each molecule. bestie said "molecules, not atoms, periodt." π
-ot plots the temperature of each group β but only if velocities are actually present in the trajectory file. and heads up, there is no corrections made for constrained degrees of freedom! π dramatic but true. also, -ot implies -com. so it's giving group-temperature-energy fr fr.
-ekt and -ekr plot the translational and rotational kinetic energy of each group, again only if velocities are present in the trajectory file. and yep β both of them imply -com too. π
-cv and -cf write the average velocities and average forces as temperature factors into a .pdb file, using either the average coordinates or the coordinates at whatever time you gave -ctime. the temperature factors are scaled so the maximum is 10, and if you want a different scaling you change it with -scale. π
to get the velocities or forces of one single frame, set both -b and -e to the time of the frame you want. and when you're averaging over frames you might need -nojump to actually get the correct average coordinates β lowkey important, don't skip it. π if you select either of these options, the average force and average velocity for each atom are written to an .xvg file as well (that's the one you name with -av or -af).
-vd computes a velocity distribution β meaning the norm of the vector is what gets plotted. and on top of that, the kinetic energy distribution is given in the same graph. two-for-one, ate. β¨
also: check out gmx trajectory if you want to plot similar data but for selections. iykyk π
β¨ OPTIONS β¨
π Options to specify input files π
-f [<.xtc/.trr/...>](traj.xtc) β your trajectory file, serving formats: xtc trr cpt gro g96 pdb tng h5md-s [<.tpr/.gro/...>](topol.tpr) β structure + mass(db), main character formats: tpr gro g96 pdb brk ent-n [<.ndx>](index.ndx) (Optional) β the index file, if you have one
π Options to specify output files π
-ox [<.xvg>](coord.xvg) (Optional) β an xvgr/xmgr file π-oxt [<.xtc/.trr/...>](coord.xtc) (Optional) β trajectory output, formats: xtc trr cpt gro g96 pdb tng h5md-ov [<.xvg>](veloc.xvg) (Optional) β an xvgr/xmgr file-of [<.xvg>](force.xvg) (Optional) β an xvgr/xmgr file-ob [<.xvg>](box.xvg) (Optional) β an xvgr/xmgr file-ot [<.xvg>](temp.xvg) (Optional) β an xvgr/xmgr file-ekt [<.xvg>](ektrans.xvg) (Optional) β an xvgr/xmgr file-ekr [<.xvg>](ekrot.xvg) (Optional) β an xvgr/xmgr file-vd [<.xvg>](veldist.xvg) (Optional) β an xvgr/xmgr file-cv [<.pdb>](veloc.pdb) (Optional) β a Protein data bank file π§¬-cf [<.pdb>](force.pdb) (Optional) β a Protein data bank file π§¬-av [<.xvg>](all_veloc.xvg) (Optional) β an xvgr/xmgr file-af [<.xvg>](all_force.xvg) (Optional) β an xvgr/xmgr file
π Other options π
-b <time>(0) β time of the first frame to read from the trajectory (default unit is ps)-e <time>(0) β time of the last frame to read from the trajectory (default unit is ps)-dt <time>(0) β only use a frame whent MOD dt = first time(default unit is ps)-tu <enum>(ps) β unit for time values, pick your fave: fs, ps, ns, us, ms, s-[no]w(no) β view the output.xvg,.xpm,.epsand.pdbfiles π-xvg <enum>(xmgrace) β xvg plot formatting options: xmgrace, xmgr, none-[no]com(no) β plot data for the com (center of mass) of each group-[no]pbc(yes) β make molecules whole for COM-[no]mol(no) β the index contains molecule numbers instead of atom numbers-[no]nojump(no) β remove the jumps of atoms across the box-[no]x(yes) β plot the X-component-[no]y(yes) β plot the Y-component-[no]z(yes) β plot the Z-component-ng <int>(1) β number of groups to consider-[no]len(no) β plot the vector length-[no]fp(no) β full precision output-bin <real>(1) β binwidth for the velocity histogram, in nm/ps-ctime <real>(-1) β use the frame at this time for x in-cvand-cfinstead of the average x-scale <real>(0) β scale factor for.pdboutput;0means autoscale β¨
π SEE ALSO π
gmx(1)- more info about GROMACS is available at <http://www.gromacs.org/> π
π COPYRIGHT π
2026, GROMACS development team π«Ά
and that's the whole page bestie, tysm for reading π this was the GROMACS 2026.4 gmx-traj(1) page, dated Oct 02, 2026. go plot something iconic. π
β¨π
π¦ where this page comes from
- nixpkgs unstable: gromacs 2026.4
- ubuntu stonking: gromacs-data 2026.4-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms