# Got a fatal error after adding ions command

**URL:** <https://gromacs.bioexcel.eu/t/got-a-fatal-error-after-adding-ions-command/4777>\
**Category:** User discussions\
**Created:** [September 13, 2022, 6:58am UTC](https://gromacs.bioexcel.eu/t/got-a-fatal-error-after-adding-ions-command/4777 "2022-09-13T06:58:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![M.Rageh](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@M.Rageh](https://gromacs.bioexcel.eu/u/M.Rageh)\
**Post date:** [September 13, 2022, 6:58am UTC](https://gromacs.bioexcel.eu/t/got-a-fatal-error-after-adding-ions-command/4777/1 "2022-09-13T06:58:18Z")

</div>

GROMACS version:2020.1  
GROMACS modification: Yes/No  
Here post your question How can I fix this problem!!! The number of coordinates in coordinate file (complex\_solv.gro, 54584) does not match topology (topol.top, 54670)

 ![Fatal error adding ions](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/4/42503d91713fb53c3b51b7e82d260b22ac9fe511.jpeg)

---

<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:** [September 13, 2022, 12:02pm UTC](https://gromacs.bioexcel.eu/t/got-a-fatal-error-after-adding-ions-command/4777/2 "2022-09-13T12:02:05Z")

</div>

Hi,  
I guess that the error occurs before you have run gmx genion.  
You could check which atoms are defined in the gro file and not in the topology. The directive [molecules] tell you which molecules (and then atoms) and which order grompp is expect to find the atoms in the gro file.  
Are the gro file and topology file newly generated? if not, it may be good to regenerate them, with attention to update the topology file at each step (solvation and add ions)  
\Alessandra

---

<div class="post-metadata">

**Author:** ![M.Rageh](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@M.Rageh](https://gromacs.bioexcel.eu/u/M.Rageh)\
**Post date:** [September 13, 2022, 4:39pm UTC](https://gromacs.bioexcel.eu/t/got-a-fatal-error-after-adding-ions-command/4777/3 "2022-09-13T16:39:34Z")

</div>

> [@alevilla](#):
>
> The directive [molecules] tell you which molecules

Yes you are right, I repeated the steps and it worked out!! Thank you so much…  
My mistake that, I changed the file name in the directory at some point into ‘complex.gro’, and when focused and repeated the steps, it is solved out…Thank you so much
