Fatal error: number of coordinates in coordinate file does not match topology file

GROMACS version: 2021.3
GROMACS modification:
While performing Protein-Ligand interaction in Gromacs version 2021 using the command line: gmx grompp -f ions.mdp -c solv.gro -p topol.top -o ions.tpr.
I encountered this Fatal error: number of coordinates in coordinate file (solv.gro, 28697) does not match topology (topol.top 28711).
I want to know how can I solve and correct this mismatch?

I am attaching both the files of topology [topol.top] and solv.gro

Thanks

THANK YOU
topol(1).top (907.7 KB)

Unfortunately, only one file can be attached, so only you topol.top was posted.

The general advice, when you encounter this error, is to compare the components of your system in the topol.top file with what is in the coordinate file (solv.gro). I wouldn’t recommend doing this line-by-line of course, but if you know the number of atoms of your molecules you can fairly quickly scan through the coordinate file to verify that each new kind of molecule starts (and finishes) at the correct line. Often you might just have the wrong number of water molecules, but not in your case since the difference is 14 atoms.

To avoid this problem make sure that the topol.top file is correctly updated after, e.g., solvating the system, adding ions etc.

I’m sorry I couldn’t (right now) give any concrete solution to your problem, but I hope you can solve it yourself now.

thank you so much for you response
Can you told me how to know the number of atoms of my molecules in my Topol.top

thank you