Index File
From wiki.gromacs.org
The GROMACS index file (usually called index.ndx) usually contains some user definable sets of atoms. The file can be read by most analysis programs, by the graphics program (ngmx) and by the preprocessor (grompp). Most of these programs create default index groups when no index file is supplied, so you only need to make an index file when you need special groups.
GROMACS utilities that can generate an index file for you are:
- make_ndx - for selection based on atom, residue and chain names and numbers.
- mk_angndx - for selection based on angles (angle, dihedral, improper, Ryckaert-Bellemans or phi-psi).
Since the format is just a text file, and the syntax is straightforward, some index group creation tasks can be most efficiently done by hand. Create the index file (e.g. with make_ndx and quitting straight away without changing anything), then just open it in a text editor (vi, emacs, notepad, etc.), and add a new section at the end like
[ Phe_ring ]
136 137 139 141 143 145
and you're done, so long as these atom numbers correspond to the correct structure file. If you're using Windows or something else which tends to take control of your business, make sure the editor you use doesn't change the file type or the filename extension.
Some GROMACS utilities use an index file to contain other sets of integers, like trajectory frame numbers for trjconv, or shuffle/deshuffle operations for grompp and trjconv, or REMD (de)multiplexing.
[edit] Resources
- GROMACS Manual, Section 8.1
- ndx file format, Online Manual

