---
name: "gmx-trajectory"
section: "1"
platform: "linux"
package: "gromacs-data"
version: "2025.2-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gmx-trajectory"
---

# gmx-trajectory(1)

Print coordinates, velocities, and/or forces for selections

## NAME

gmx-trajectory - Print coordinates, velocities, and/or forces for selections

## SYNOPSIS

```
gmx trajectory [-f [<.xtc/.trr/...>]] [-s [<.tpr/.gro/...>]]
             [-n [<.ndx>]] [-ox [<.xvg>]] [-ov [<.xvg>]]
             [-of [<.xvg>]] [-b <time>] [-e <time>] [-dt <time>]
             [-tu <enum>] [-fgroup <selection>] [-xvg <enum>]
             [-[no]rmpbc] [-[no]pbc] [-sf <file>] [-selrpos <enum>]
             [-seltype <enum>] [-select <selection>] [-[no]x]
             [-[no]y] [-[no]z] [-[no]len]
```

## DESCRIPTION

**gmx trajectory** plots coordinates, velocities, and/or forces for provided selections. By default, the X, Y, and Z components for the requested vectors are plotted, but specifying one or more of **-len**, **-x**, **-y**, and **-z** overrides this.

For dynamic selections, currently the values are written out for all positions that the selection could select.

## OPTIONS

Options to specify input files:

- **-f \[\<.xtc/.trr/...\>\] (traj.xtc) (Optional)**

  Input trajectory or single configuration: *xtc* *trr* *cpt* *gro* *g96* *pdb* *tng*

- **-s \[\<.tpr/.gro/...\>\] (topol.tpr) (Optional)**

  Input structure: *tpr* *gro* *g96* *pdb* brk ent

- **-n \[\<.ndx\>\] (index.ndx) (Optional)**

  Extra index groups

Options to specify output files:

- **-ox \[\<.xvg\>\] (coord.xvg) (Optional)**

  Coordinates for each position as a function of time

- **-ov \[\<.xvg\>\] (veloc.xvg) (Optional)**

  Velocities for each position as a function of time

- **-of \[\<.xvg\>\] (force.xvg) (Optional)**

  Forces for each position as a function of time

Other options:

- **-b \<time\> (0)**

  First frame (ps) to read from trajectory

- **-e \<time\> (0)**

  Last frame (ps) to read from trajectory

- **-dt \<time\> (0)**

  Only use frame if t MOD dt == first time (ps)

- **-tu \<enum\> (ps)**

  Unit for time values: fs, ps, ns, us, ms, s

- **-fgroup \<selection\>**

  Atoms stored in the trajectory file (if not set, assume first N atoms)

- **-xvg \<enum\> (xmgrace)**

  Plot formatting: xmgrace, xmgr, none

- **-\[no\]rmpbc (yes)**

  Make molecules whole for each frame

- **-\[no\]pbc (yes)**

  Use periodic boundary conditions for distance calculation

- **-sf \<file\>**

  Provide selections from files

- **-selrpos \<enum\> (atom)**

  Selection reference positions: atom, res\_com, res\_cog, mol\_com, mol\_cog, whole\_res\_com, whole\_res\_cog, whole\_mol\_com, whole\_mol\_cog, part\_res\_com, part\_res\_cog, part\_mol\_com, part\_mol\_cog, dyn\_res\_com, dyn\_res\_cog, dyn\_mol\_com, dyn\_mol\_cog

- **-seltype \<enum\> (atom)**

  Default selection output positions: atom, res\_com, res\_cog, mol\_com, mol\_cog, whole\_res\_com, whole\_res\_cog, whole\_mol\_com, whole\_mol\_cog, part\_res\_com, part\_res\_cog, part\_mol\_com, part\_mol\_cog, dyn\_res\_com, dyn\_res\_cog, dyn\_mol\_com, dyn\_mol\_cog

- **-select \<selection\>**

  Selections to analyze

- **-\[no\]x (yes)**

  Plot X component

- **-\[no\]y (yes)**

  Plot Y component

- **-\[no\]z (yes)**

  Plot Z component

- **-\[no\]len (no)**

  Plot vector length

## SEE ALSO

**[gmx(1)](/gmx/1.md)**

More information about GROMACS is available at \<*http://www.gromacs.org/*\>.

## COPYRIGHT

2025, GROMACS development team
