GMX-DISTANCE(1)
π GMX-DISTANCE(1) β gmx-distance π
okay bestie, so this is a page from the GROMACS manual set, section 1. it's gmx-distance, and it's literally about measuring how far apart things are. strap in. π
β¨ NAME β¨
gmx-distance β calculate distances between pairs of positions π
πΈ SYNOPSIS πΈ
gmx distance [-f [<.xtc/.trr/...>]] [-s [<.tpr/.gro/...>]] [-n [<.ndx>]]
[-oav [<.xvg>]] [-oall [<.xvg>]] [-oxyz [<.xvg>]]
[-oh [<.xvg>]] [-oallstat [<.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>] [-len <real>]
[-tol <real>] [-binw <real>]
π¦ DESCRIPTION π¦
so gmx distance calculates distances between pairs of positions as a function of time. like, it's giving timeline energy. β³
each selection specifies an independent set of distances to calculate. each selection should consist of pairs of positions, and the distances are computed between positions 1-2, 3-4, etc. no cap.
-oav writes the average distance as a function of time for each selection. -oall writes all the individual distances. -oxyz does the same, but the x, y, and z components of the distance are written instead of the norm. -oh writes a histogram of the distances for each selection. the location of the histogram is set with -len and -tol. bin width is set with -binw. -oallstat writes out the average and standard deviation for each individual distance, calculated over the frames. π
β οΈ note thatgmx distancecalculates distances between fixed pairs (1-2, 3-4, etc.) within a single selection. if you wanna calculate distances between two selections β including minimum, maximum, and pairwise distances β usegmx pairdistinstead. don't be out here using the wrong tool bestie π
π OPTIONS π
π«Ά options to specify input files
-f [<.xtc/.trr/...>](traj.xtc) (Optional) β input trajectory or single configuration, and the formats it'll take are:xtctrrcptgrog96pdbtngh5md-s [<.tpr/.gro/...>](topol.tpr) (Optional) β input structure, formats:tprgrog96pdbbrkent-n [<.ndx>](index.ndx) (Optional) β extra index groups
π options to specify output files
-oav [<.xvg>](distave.xvg) (Optional) β average distances as function of time-oall [<.xvg>](dist.xvg) (Optional) β all distances as function of time-oxyz [<.xvg>](distxyz.xvg) (Optional) β distance components as function of time-oh [<.xvg>](disthist.xvg) (Optional) β histogram of the distances-oallstat [<.xvg>](diststat.xvg) (Optional) β statistics for individual distances
β¨ 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 ift 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>β position pairs to calculate distances for-len <real>(0.1) β mean distance for histogramming-tol <real>(1) β width of full distribution as fraction of-len-binw <real>(0.001) β bin width for histogramming
π SEE ALSO π
more info about GROMACS is available at <http://www.gromacs.org/>. π
π COPYRIGHT π
2026, GROMACS development team
and that's the whole page bestie, you ate that π
β¨ ok so final sign-off: this was 2026.4, dated Oct 02, 2026, and the page itself is GMX-DISTANCE(1) from the GROMACS fam. go measure some distances, you main character π¦π
π¦ 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