# Number mismatch in gro and topology file

**URL:** <https://gromacs.bioexcel.eu/t/number-mismatch-in-gro-and-topology-file/4499>\
**Category:** User discussions\
**Created:** [July 23, 2022, 12:13pm UTC](https://gromacs.bioexcel.eu/t/number-mismatch-in-gro-and-topology-file/4499 "2022-07-23T12:13:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bijaya](https://avatars.discourse-cdn.com/v4/letter/b/bcef8e/32.png) [@Bijaya](https://gromacs.bioexcel.eu/u/Bijaya)\
**Post date:** [July 23, 2022, 12:13pm UTC](https://gromacs.bioexcel.eu/t/number-mismatch-in-gro-and-topology-file/4499/1 "2022-07-23T12:13:39Z")

</div>

Hi,  
I need to add Zn2+ and Mg2+ ions to my system of protein. However, running the gmx grompp command its showing me the following error:  
Fatal error:  
number of coordinates in coordinate file (solv.gro, 178616)  
does not match topology (topol.top, 178620)

I calculated the number of atoms in both the files and its 178616 in both. Why is this error showing and how do I fix it ?

---

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [July 25, 2022, 1:43pm UTC](https://gromacs.bioexcel.eu/t/number-mismatch-in-gro-and-topology-file/4499/2 "2022-07-25T13:43:28Z")

</div>

Hi,  
My guess is that when you have added the ions to the system the topology file was not properly updated. You can check that the last directive [molecules] of topology file contains a number of protein molecules, solvent molecules and ions identical of the gro file (for each type of molecules).  
\Alessandra
