GMX-TRJORDER(1)
π gmx-trjorder(1) β the GROMACS orderer-upper π
okay bestie, pull up a chair because we're about to order molecules like it's a group chat and everyone's getting sorted by who's closest to the protein π«Ά this little guy lives under the GROMACS umbrella and honestly? iconic.
β¨ NAME β¨
gmx-trjorder β sorts molecules by how close they are to a group, no cap π
π¦ SYNOPSIS π¦
gmx trjorder [-f [<.xtc/.trr/...>]] [-s [<.tpr/.gro/...>]] [-n [<.ndx>]]
[-o [<.xtc/.trr/...>]] [-nshell [<.xvg>]] [-b <time>]
[-e <time>] [-dt <time>] [-xvg <enum>] [-na <int>]
[-da <int>] [-[no]com] [-r <real>] [-[no]z]
πΈ DESCRIPTION πΈ
so the whole vibe is: gmx trjorder puts your molecules in order based on the smallest distance to atoms in a reference group β or, if you pass -z, on the z-coordinate instead. two whole flavors, pick your fighter. β¨
when you're doing distance ordering, it's gonna ask you for a group of reference atoms and a group of molecules. (yes, it asks. be ready. π) For each frame of the trajectory, the selected molecules get reordered according to the shortest distance between atom number -da in the molecule and all the atoms in the reference group. and here's the sneaky part: you can use the center of mass of the molecules instead of a reference atom, just by setting -da to 0. π« every atom in the trajectory gets written out to the output trajectory, so nothing gets ghosted.
gmx trjorder is lowkey the moment for stuff like analyzing the n waters closest to a protein. in that case your reference group would be the protein and your group of molecules would be all the water atoms. once you've made an index group out of the first n waters, that ordered trajectory can go straight into any GROMACS program to analyze the n closest waters. it's giving pipeline. π₯
if your output file is a .pdb file, the distance to the reference target gets stored in the B-factor field so you can color it with e.g. Rasmol. cute and functional, we love to see it. π
and with option -nshell, the number of molecules within a shell of radius -r around the reference group gets printed. count them bestie, they're yours. π
π OPTIONS π
π₯ Options to specify input files:
-f [<.xtc/.trr/...>](traj.xtc) β Trajectory:xtc trr cpt gro g96 pdb tng h5md-s [<.tpr/.gro/...>](topol.tpr) β Structure+mass(db):tpr gro g96 pdb brk ent-n [<.ndx>](index.ndx) (Optional) β Index file
π€ Options to specify output files:
-o [<.xtc/.trr/...>](ordered.xtc) (Optional) β Trajectory:xtc trr gro g96 pdb tng h5md-nshell [<.xvg>](nshell.xvg) (Optional) β xvgr/xmgr file
π§ Other options:
-b <time>(0) β Time of first frame to read from trajectory (default unit ps)-e <time>(0) β Time of last frame to read from trajectory (default unit ps)-dt <time>(0) β Only use frame whent MOD dt = first time(default unit ps)-xvg <enum>(xmgrace) β xvg plot formatting:xmgrace,xmgr,none-na <int>(3) β Number of atoms in a molecule-da <int>(1) β Atom used for the distance calculation,0is COM-[no]com(no) β Use the distance to the center of mass of the reference group-r <real>(0) β Cutoff used for the distance calculation when computing the number of molecules in a shell around e.g. a protein-[no]z(no) β Order molecules on z-coordinate
π SEE ALSO π
gmx(1)- More information about GROMACS is available at <http://www.gromacs.org/>.
Β©οΈ COPYRIGHT Β©οΈ
2026, GROMACS development team
and that's the whole page bestie β you now know everything this little orderer knows, fr fr. go sort some waters, you absolute main character. π
GROMACS 2026.4 β Oct 02, 2026 π slay, periodt, take care of your trajectories β¨
π¦ 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