Index file is always in a serial no. You can check the residue serial no. by opening the pdb in text format. "gmx make_ndx " is the command to use to see all indices and then choose your residues accordingly.