Using the tool "gmx check" comparing two .tpr files with different number of particles (e.g. ions):
For the .tpr file with less ions a random number (from memory) was printed and compared to the parameter values (e.g. the type, ptype, resind, atomnumber, m, q, etc.) from the .tpr file with more ions for all excess ions.