Number of coordinates in coordinate file does not match topology topol>solv

GROMACS version: 2023.3
GROMACS modification: Yes/No
Hi I used a box containing a CarbonNanoTube and the drug doxorubicin in gromacs and received this error. the steps of my work were as follows; Can any one guide me?
1)gmx editconf -f cnt.pdb -o boxcnt.gro -c -box 4 4 4
2)gmx editconf -f dox.pdb -o boxdox.gro -box 4 4 4 -center 1 2 2
3)then i merge 1 & 2
4)gmx solvate -cp boxcnt.gro -cs spc216.gro -o solv.gro -p topol.top
5)gmx grompp -f minim.mdp -c solv.gro -o em.tpr
rogram: gmx grompp, version 2023.3
Source file: src/gromacs/gmxpreprocess/grompp.cpp (line 706)

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

The easiest thing is to look at the [ molecules ] section in your topology, look at the number of atoms in each molecule, do the multiplication, and compare with the .gro file.

Your system is rather small so it might be easy to do by hand, but for cases where it might be more complex there’s a gromologist function for figuring out where the mismatch occurs.

2 Likes

After merging you need to correct the atom number in the gro file. Then insert the doxorubicin paramer itp in the topology and need to make required adjustment.