Feature #2083

define resid and residue input options to gmx select

Added by Chris Neale over 3 years ago. Updated over 3 years ago.

Target version:


The page: has lots of useful information on gmx select syntax. I presume the syntax is the same for some other analysis tools like gmx pairdist -select. However, I am confused about the difference between resid and residue (and then also obviously the same goes for their synonyms resnr and resindex). It seems to me as if resid is the number from the input file (e.g. the pdb file) and residue is determined after doing a fresh renumbering starting at 1 (as one would likely get with resid if one first ran gmx editconf -resnr 1.

I think it would be useful if specific definitions of resid and residue were places on that web page.

Moreover, it is unclear what happens with there are conflicts with residents between the -f a.pdb input and the -s a.tpr input to gmx select. This is important because e.g. gmx select -f my.pdb -on index.ndx fails with an error that “No topology provided, but one is required for analysis” (and that error goes away when one also provides a -s .tpr file as input to gmx select:

GROMACS: gmx select, VERSION 5.1.2
Executable: /oasis/scratch/comet/cneale/temp_project/exec/gromacs-5.1.2/exec_serial/bin/gmx
Data prefix: /oasis/scratch/comet/cneale/temp_project/exec/gromacs-5.1.2/exec_serial
Command line:
gmx select -f gromacse.pdb

Reading frame 0 time 1.000 Available static index groups:
Specify any number of selections for option 'select'
(Selections to analyze):
(one per line, <enter> for status/groups, 'help' for help, Ctrl-D to end)

resid 1

Selection 'resid 1' parsed

Program: gmx select, VERSION 5.1.2
Source file: src/gromacs/trajectoryanalysis/runnercommon.cpp (line 300)
Function: void gmx::TrajectoryAnalysisRunnerCommon::initTopology(gmx::SelectionCollection *)

Inconsistency in user input:
No topology provided, but one is required for analysis

For more information and tips for troubleshooting, please check the GROMACS
website at

Associated revisions

Revision 17c6b1f0 (diff)
Added by Teemu Murtola over 3 years ago

Additional selection help

- Explain resindex and resnr keywords in selection help.
- Explain how selection-enabled tools treat -s and -f input files.

Fixes #2083

Change-Id: I93e38c46a2bdb35f057688cf29fb3392712c2443


#1 Updated by Chris Neale over 3 years ago

test shown was with gromacs 5.1.2

#2 Updated by Gerrit Code Review Bot over 3 years ago

Gerrit received a related patchset '1' for Issue #2083.
Uploader: Teemu Murtola ()
Change-Id: I93e38c46a2bdb35f057688cf29fb3392712c2443
Gerrit URL:

#3 Updated by Teemu Murtola over 3 years ago

  • Status changed from New to Fix uploaded
  • Assignee set to Teemu Murtola
  • Target version set to 2016.2

Updated the relevant help texts. If you want to analyze a single .pdb frame, you should pass it as -s (only), instead of -f.

#4 Updated by Chris Neale over 3 years ago

Thanks Teemu. Can you please direct me to the new text? I can't find it at , which I think still simply has:

resid (synonym for resnr)
residue (synonym for resindex)

#5 Updated by Teemu Murtola over 3 years ago

You can follow the link posted by the code review bot.

The documentation for a release is built and published at the time the release is done, and is not updated retrospectively. The updated documentation will probably be part of 2016.2 documentation.

#6 Updated by Teemu Murtola over 3 years ago

  • Status changed from Fix uploaded to Resolved

#7 Updated by Mark Abraham over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF