gmx pairdist [-f [<.xtc/.trr/...>]] [-s [<.tpr/.gro/...>]] [-n [<.ndx>]] [-o [<.xvg>]] [-b <time>] [-e <time>] [-dt <time>] [-tu <enum>] [-xvg <enum>] [-[no]rmpbc] [-[no]pbc] [-sf <file>] [-selrpos <enum>] [-seltype <enum>] [-cutoff <real>] [-type <enum>] [-refgrouping <enum>] [-selgrouping <enum>] [-ref <selection>] [-sel <selection>]
gmx pairdist calculates pairwise distances between one reference selection (given with -ref) and one or more other selections (given with -sel). It can calculate either the minimum distance (the default), or the maximum distance (with -type max). Distances to each selection provided with -sel are computed independently.
By default, the global minimum/maximum distance is computed. To compute more distances (e.g., minimum distances to each residue in -ref), use -refgrouping and/or -selgrouping to specify how the positions within each selection should be grouped.
Computed distances are written to the file specified with -o. If there are N groups in -ref and M groups in the first selection in -sel, then the output contains N*M columns for the first selection. The columns contain distances like this: r1-s1, r2-s1, ..., r1-s2, r2-s2, ..., where rn is the n’th group in -ref and sn is the n’th group in the other selection. The distances for the second selection comes as separate columns after the first selection, and so on. If some selections are dynamic, only the selected positions are used in the computation but the same number of columns is always written out. If there are no positions contributing to some group pair, then the cutoff value is written (see below).
-cutoff sets a cutoff for the computed distances. If the result would contain a distance over the cutoff, the cutoff value is written to the output file instead. By default, no cutoff is used, but if you are not interested in values beyond a cutoff, or if you know that the minimum distance is smaller than a cutoff, you should set this option to allow the tool to use grid-based searching and be significantly faster.
If you want to compute distances between fixed pairs, gmx distance may be a more suitable tool.
Options to specify input files:
Options to specify output files:
Other options: