GROMACS version: 2021
GROMACS modification: Yes/No
Here post your question
Hello
While performing protein-ligand interaction I encountered this fatal error saying that my coordinate numbers in coordinate file did not match the topology file. so please help me to resolve this error mentioned below:
Program: gmx grompp, version 2020.1-Ubuntu-2020.1-1
Source file: src/gromacs/gmxpreprocess/grompp.cpp (line 669)
Fatal error:
number of coordinates in coordinate file (solv.gro, 33508)
does not match topology (topol.top, 33509)
the error is as the message says: your topology file (topol.top) has 1 more atom than your coordinate file (solv.gro). You need to correct either file to make them match.
How many atoms are in your ligand in its topology vs. its coordinates? Most often, a difference of one atom is a result of using coordinates that have a different protonation state than the topology.
22 atoms are their in my ligand. Rest am new to Gromacs so I dnt know how to differentiate between these two files and make them to have same number of atoms?
Initially when the error appeared the number of coordinates in solv.gro file is 33508 and topol.top file is having 33530 number of atoms but somehow with the help of google searches and responses I reduced the topol.top file error from 33530 to 33509. But now the remaining 1 atom differnce is not reducing and hence both the files remain unmatchable with equal number of atoms. So here am looking for any suggestion that how to reduce this one atom error and make them equal in both the files.
You need to provide exact, step-by-step descriptions (including actual commands, where relevant) as to what you did. There are too many things you might have done that were right or wrong for us to tell. You also did not directly answer my question about about ligand atoms - 22 in coordinates or topology? What did you do to “solve” the original discrepancy in terms of the number of atoms? There shouldn’t be too much magic that is ever necessary here, and rectifying this mismatch issue is always the same solution - let tools like solvate and genion update your topology for you in terms of water and ions, do not make manual edits to those numbers, and carefully copy and paste ligand coordinates and update the topology accordinatly.
If you need further help, please provide the exact details I’ve noted above. Without that, it’s just unproductive guesswork.
Sir by your help am able to resolve the issue; thank you. But in upcoming step ’ Equillibration - Thermostats step" I have encountered another error while running the command “gmx make_ndx -f em.gro -o index.ndx”
i.e. as follows-
Error in user input:
Invalid command-line options
In command-line option -f
File ‘em.gro’ does not exist or is not accessible.
The file could not be opened.
Reason: No such file or directory
(call to fopen() returned error code 2)
Please advise me how to overcome this error and also from where did this em.gro file will be found?
That means your previous step (presumably energy minimization based on “em” as the file name) failed. Pay attention to warnings and errors printed to the terminal and output files.
Hey dear friend, according to your first issue about mismatching coordinate and topology files, I got the same error. I appreciate knowing your answer.
Hello sir, i am facing the problem regarding coordinate files.
number of coordinates in coordinate file (box_sol.gro, 204998)
does not match topology (topol.top, 204954)
Please help me to solve it.
The difference is 44 atoms. Assuming that the rest of your topology agrees with your coordinate file, I would think that you have too few molecules of one kind in your topology file. Are there any molecules with 44, 22 or 11 atoms? Counting those, in your coordinate (.gro) and in your topology, would be a good starting point.
If you don’t get warnings about atom name mismatches my guess would be that it is the last molecule entry in your topology that has the wrong number.
Using lysozyme in water tutorial as a reference, I am trying to create a system with protein in water. At the equilibration step after solvating the system, using the command “gmx grompp -f ions.mdp -c prot_solv_ions.gro -p topol.top -o em.tpr”, I get the same error as follows: Fatal error: number of coordinates in coordinate file (prot_solv_ions.gro, 66866) does not match topology (topol.top, 66850)
After reading through other such discussions, I found out that this happens due to the failure to update the topology after solvation but so far, my topology files have been successfully updated for each step so I don’t understand why it may not have happened for the solvation step. Also, even if i have to change it now, how do I manually edit the topology file? Is it safe to do so?
Yes, you can modify the topology file by hand. You can use the coordinate file to help you count molecules of different types. You can also use common shell commands to help you. For example, the oxygen in water is commonly called OW. So you can count the number of water molecules using: