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
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.
Program: gmx grompp, version 2021.4-Ubuntu-2021.4-2
Source file: src/gromacs/gmxpreprocess/grompp.cpp (line 681)
Fatal error: number of coordinates in coordinate file (solv.gro, 33518) does not match topology (topol.top, 2636)
For more information and tips for troubleshooting, please check the GROMACS website at Common Errors — GROMACS webpage https://www.gromacs.org documentation
Respected sir,
please resolve my problem this is the same example of protein-ligand tutorial from gromacs tutorial JZ4 ligand and 3HTB protein
So, there are molecules missing in the topology. Based on the numbers you provided, I would guess that you don’t have water in the topology. Do you know how many water molecules there are in the system? If it is still not working after adding the correct number of water molecules, you will have to count the molecules of all types in the .gro file and update the topology.
You can count molecules reasonably easily, using bash grep and wc commands, especially if there are atom with names that only occur in one specific molecule type, e.g.: grep "OW" solv.gro|wc -l should give you the number of water molecules in the system.