Gmx genion problem at boundary between indices 99999 and 100000

GROMACS version: 2022.4
GROMACS modification: No

Hello,

I am solvating a big (~900k) atom system. When running gmx genion, I get the following error:

Fatal error:
The solvent group TIP3 is not continuous: index[86276]=99998, index[86277]=-1

I think the error is thrown because the listed atom indices index[86276] and index[86277] in the input .gro or .pdb file are at the boundary between 99999 and 100000, and index 100000 is listed as 0 while index 99999 is listed as 99999.

Do you know how I could successfully run gmx genion without running this error? Manually changing indices to 100000, 100001, … does not work because then gromacs cannot read files and runs into other errors.

Thank you very much for your time,
Sincerely,
Gromacs user

Sorry I actually solved the issue. Everything started working when I remade the index file with make_ndx.

Sincerely,
Gromacs user