Fatal error: number of coordinates in coordinate file (solv.gro, 186458) does not match

GROMACS version: GROMACS version: 2023.4-conda_forge
GROMACS modification: Yes/No
This my WorkFlow and at step 13 a got fatal error, would you please help me out to fix it
1.
grep -v HOH 1ao6.pdb > 1ao6_nowat.pdb

  1. gmx pdb2gmx -f 1ao6_nowat.pdb -o 1ao6_processed.gro -ter
    Select the Force Field:
    1: CHARMM36 all-atom force field (July 2020)
    Select the Water Model:
    1: TIP3P TIP 3-point, recommended
    Select start terminus type for SER-5
    0: NH3+
    Select end terminus type for ALA-582
    0: COO-
    Select start terminus type for SER-5
    0: NH3+
    Select end terminus type for ALA-582
    0: COO-

  2. Avogadro program:
    I first remove all H then add H
    Convert GO.pdb to GO_H.mol2

  3. Editing GO_H.mol2:
    correct for Ligand name as exxplain in Gromacs tutorial

     GO_H_fix.mol2
    
  4. perl sort_mol2_bonds.pl GO_H.mol2 GO_H_fix.mol2

  5. Generate the GO Topology with CGenFF sever:

  6. python cgenff_charmm2gmx_py3_nx2.py GO GO_H_fix.mol2 GO_H_fix.str charmm36-feb2021.ff

  7. gmx editconf -f go_ini.pdb -o go.gro

  8. Build the Complex.gro:
    1ao6_processed.gro + go.gro = complex.gro

  9. Edit the topol.top:

; Include forcefield parameters
#include “./charmm36-feb2021.ff/forcefield.itp”

; Include ligand parameters
#include “go.prm”

; Include chain topologies
#include “topol_Protein_chain_A.itp”
#include “topol_Protein_chain_B.itp”

; Include ligand topology
#include “go.itp”

; Include water topology
#include “./charmm36-feb2021.ff/tip3p.itp”

#ifdef POSRES_WATER
; Position restraint for each water oxygen
[ position_restraints ]
; i funct fcx fcy fcz
1 1 1000 1000 1000
#endif

; Include topology for ions
#include “./charmm36-feb2021.ff/ions.itp”

[ system ]
; Name
SERUM ALBUMIN in water

[ molecules ]
; Compound #mols
Protein_chain_A 1
Protein_chain_B 1
GO 1

  1. gmx editconf -f complex.gro -o newbox.gro -bt dodecahedron -d 1.0

  2. gmx solvate -cp newbox.gro -cs spc216.gro -p topol.top -o solv.gro

  3. gmx grompp -f ions.mdp -c solv.gro -p topol.top -o ions.tpr


Program: gmx grompp, version 2023.4-conda_forge
Source file: src/gromacs/gmxpreprocess/grompp.cpp (line 706)

Fatal error:
number of coordinates in coordinate file (solv.gro, 186458)
does not match topology (topol.top, 18351)

For more information and tips for troubleshooting, please check the GROMACS
website at Common errors when using GROMACS - GROMACS 2024.1 documentation

Seems that, for whatever reason, gmx solvate did not add (enough) solvent molecules to your topology’s [ molecules ] section. But also the difference between the number of atoms in solv.gro and topol.top is not divisible by 3, as would be if you were just missing the water molecules.

Have you compared the order of .top and .gro files to see what the extra molecules are, starting from position 18352?

Hi @milosz.wieczor
Thank you so much for take a look at my problem. I really appreciate it.
I have two .top files, first one was generated after step 2 as I shown in above and its called topol.top, the second was genereated after step 6 which its called GO_fix_gmx.top.
now I am confused which one of these two I should edit in step 10 ? and which one I should use as output for step 12? the error I encountered, it was as a result of editing and using topol.top in step 10 and 12 respectively.
topol.top (1.3 KB)
GO_fix_gmx.top (39.2 KB)
regarding your question , I checked the file solv.gro,
these molecules are astarted from position 18352
618SOL HW218350 1.451 1.329 0.907
619SOL OW18351 1.667 1.714 0.572
619SOL HW118352 1.626 1.691 0.484
619SOL HW218353 1.649 1.640 0.637
620SOL OW18354 0.598 0.729 0.270
620SOL HW118355 0.622 0.798 0.202
620SOL HW218356 0.520 0.762 0.324

thanks again for your time and help

It doesn’t matter which topology you edit, what matters is that you get one topology that contains all the component you want in your system. In short, the topology and structure you’re using for step 12 should match in terms of number and ordering of atoms. It’s something you can check adding/multiplying atom numbers by hand, or using check_pdb()/check_top() from Gromologist.