Error "mismatch in the contents" in Gromacs

GROMACS version:2023.4
GROMACS modification: Yes/No
Here post your question I received an error message :
Fatal error:
Index[2255] 2265 is larger than the number of atoms in the
trajectory file (2264). There is a mismatch in the contents
of your -f, -s and/or -n files.

I checked everything in my code but still got the same error. Could you kindly tell what should I do?

How do you obtain the trajectory and index file? It means that the atom number in the index file is not the same as in the trajectory, which usually happens when you do not output the whole trajectory.

Did you mean .xtc file? I transfer .tpr file to the cluster and transfer .xtc file to my computer after calculation.

Thank you so much for your response.
How can I fix this? what is my index file? I am sorry, I am a new user.

The atom number in .ndx file is not the same as in the .xtc file. Ensure choosing [0] to output whole system if you are using gmx trjconv , and the .ndx file should be created from a correct .gro file. If this doesn’t work, please check the other steps that may change the atom number in your file like these.

Can I share my code with you? I don’t have any .ndx file. I used .pdb file.

I used GROMACS version 2023.4 in my computer but in cluster its 2023.1. I am wondering it could be the reason for this error/change?

Generally it would not be an issue. If you want you could post the command and file you used or send them to my Email: litong.lin@foxmail.com