# Coordinate error with grompp

**URL:** <https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878>\
**Category:** User discussions\
**Created:** [September 28, 2020, 10:17am UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878 "2020-09-28T10:17:38Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![khatti](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@khatti](https://gromacs.bioexcel.eu/u/khatti)\
**Post date:** [September 28, 2020, 10:17am UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/1 "2020-09-28T10:17:38Z")

</div>

GROMACS version:gromacs-5.1.5  
GROMACS modification: Yes  
Here post your question  
Hi dear gromacs users,  
I want to set up a simulation of nanoparticle and ligand molecules.  
When I run “gmx grompp -f ions.mdp -c solv+Au\_lig.gro -p topol.top -o ions.tpr”  
I get this error: number of coordinates in coordinate file (solv+Au\_lig.gro, 32781)  
does not match topology (topol.top, 34564)  
Since I run grompp with ligand and water without nanoparticle, there is not any problem, I understood the error is related to nanoparticle. I modified my gro and top files, But I could not corrected the error.  
I upload top file. I believe anyone help me, please.

[topol.top](https://gromacs.bioexcel.eu/uploads/short-url/hoop3Wp72HKKJ7Dw5VlDb9vL2Q.top) (37.9 KB)

---

<div class="post-metadata">

**Author:** ![cblau](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/cblau/32/5_2.png) [@cblau](https://gromacs.bioexcel.eu/u/cblau)\
**Post date:** [September 28, 2020, 11:18am UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/2 "2020-09-28T11:18:58Z")

</div>

Hi Khatti,

Looking at the topology, you can see what `[molecules]` you are supposed to have in your system, then you would have to match them against your `.gro` file, so uploading a `gro` file is definitely useful. Antother thing you can check is the number of hydrogens, if you rely on `pdb2gmx` to add the correct number.

---

<div class="post-metadata">

**Author:** ![khatti](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@khatti](https://gromacs.bioexcel.eu/u/khatti)\
**Post date:** [September 28, 2020, 3:55pm UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/3 "2020-09-28T15:55:33Z")

</div>

Thanks so much for the reply. I think molecules in my topology and gro files are matched. In my case, the gold nanoparticle has no hydrogen and I combined ligand and nanoparticle with “gmx insert-molecules”.  
This attachment is my gro file.  
Best regards.  
Khatti

(Attachment solv+Au\_lig.gro is missing)

---

<div class="post-metadata">

**Author:** ![khatti](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@khatti](https://gromacs.bioexcel.eu/u/khatti)\
**Post date:** [September 28, 2020, 4:00pm UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/4 "2020-09-28T16:00:47Z")

</div>

unable to send gro file by this email. How can I send it to you?

---

<div class="post-metadata">

**Author:** ![Dr\_DBW](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/dr_dbw/32/42_2.png) [@Dr\_DBW](https://gromacs.bioexcel.eu/u/Dr_DBW)\
**Post date:** [September 28, 2020, 10:28pm UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/5 "2020-09-28T22:28:37Z")

</div>

The error message says that the molecules in the topology do not match what is contained in the coordinate file. The topology says that there are 34,564 atoms and the coordinate file says there are 32,781 atoms. You need to go back through your process and determine where you lost count.

---

<div class="post-metadata">

**Author:** ![khatti](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@khatti](https://gromacs.bioexcel.eu/u/khatti)\
**Post date:** [September 29, 2020, 6:57am UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/6 "2020-09-29T06:57:04Z")

</div>

Thanks a lot for the response. I understood my error message, but I could not find lost atoms.  
I have one ligand and one Au molecule and 10615 water molecules that have 32781 atoms corresponding to the initial pdb file of the molecules.  
How is topology file included in these extra atoms?

---

<div class="post-metadata">

**Author:** ![Dr\_DBW](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/dr_dbw/32/42_2.png) [@Dr\_DBW](https://gromacs.bioexcel.eu/u/Dr_DBW)\
**Post date:** [September 29, 2020, 11:55am UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/7 "2020-09-29T11:55:35Z")

</div>

Because you have told it to. Computer scripts aren’t smart, they do exactly what you tell them to do. You need to go through your topology file(s) and find where your counting error is exactly. First place to look is the `[molecules] ` section, ensure that the number of molecules there matches what you think it is, and what it actually is in the coordinate file. Your ligand appears to be 937 atoms, and the difference is just short of 2x this number, so it isn’t something as simple as having 2 LIGAND in the molecules section.

---

<div class="post-metadata">

**Author:** ![khatti](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@khatti](https://gromacs.bioexcel.eu/u/khatti)\
**Post date:** [September 29, 2020, 5:24pm UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/8 "2020-09-29T17:24:32Z")

</div>

Thanks so much for the reply.  
this is last lines of my topology file:  
[molecules]  
; Compound nmols  
NP1 1  
MOL 1  
SOL 10615  
NP1=887atoms and MOL=49atoms. When I set **zero** for NP1, Iget this error: number of coordinates in coordinate file (solv.gro, 32781)  
does not match topology (topol.top, 31894) and difference between (32781-31894= **887** ) them equal to NP1 atoms.

But when I set one for NP1, difference between number of coordinates is very high:(34564-32781=1783)  
error:number of coordinates in coordinate file (solv.gro, 32781) does not match topology (topol.top, 34564)

I am confused by topology file.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [September 29, 2020, 5:36pm UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/9 "2020-09-29T17:36:45Z")

</div>

You need to check the individual topologies for NP1 and MOL, because often when those are written by external programs they are assumed to be standalone topologies and may have `[molecules]` blocks of their own, which mean you’re duplicating the coordinates somewhere.

---

<div class="post-metadata">

**Author:** ![khatti](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@khatti](https://gromacs.bioexcel.eu/u/khatti)\
**Post date:** [September 30, 2020, 1:36pm UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/10 "2020-09-30T13:36:08Z")

</div>

Thanks so much.

The topology of MOL has no problem, because I tested it alone without error.  
But I could not understand what is the problem of NP1 topology file.How can I check it?

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [September 30, 2020, 7:04pm UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/11 "2020-09-30T19:04:12Z")

</div>

Upload your files somewhere and provide us a link to them.

---

<div class="post-metadata">

**Author:** ![khatti](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@khatti](https://gromacs.bioexcel.eu/u/khatti)\
**Post date:** [September 30, 2020, 8:16pm UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/12 "2020-09-30T20:16:12Z")

</div>

Thank you for your attention.  
[https://drive.google.com/file/d/1lP9t\_GyCfpN2QF0srmTfWVpHbo8\_\_C4J/view?usp=sharing](https://drive.google.com/file/d/1lP9t_GyCfpN2QF0srmTfWVpHbo8__C4J/view?usp=sharing)  
[https://drive.google.com/file/d/1xg23oWjYrSyaurmGeEBQIs7jzUMBI01z/view?usp=sharing](https://drive.google.com/file/d/1xg23oWjYrSyaurmGeEBQIs7jzUMBI01z/view?usp=sharing)  
[https://drive.google.com/file/d/1\_35OQfGCyZKfm9k0QsJ3zyyguHNbbGnP/view?usp=sharing](https://drive.google.com/file/d/1_35OQfGCyZKfm9k0QsJ3zyyguHNbbGnP/view?usp=sharing)  
[https://drive.google.com/file/d/1vDP6K5jjOOkBNhz1N6N1HVrR67kG9pPd/view?usp=sharing](https://drive.google.com/file/d/1vDP6K5jjOOkBNhz1N6N1HVrR67kG9pPd/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![Dr\_DBW](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/dr_dbw/32/42_2.png) [@Dr\_DBW](https://gromacs.bioexcel.eu/u/Dr_DBW)\
**Post date:** [September 30, 2020, 8:56pm UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/13 "2020-09-30T20:56:45Z")

</div>

All those links/files are locked. You need to change the share settings to allow others to view them.

---

<div class="post-metadata">

**Author:** ![khatti](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@khatti](https://gromacs.bioexcel.eu/u/khatti)\
**Post date:** [October 1, 2020, 3:30pm UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/14 "2020-10-01T15:30:20Z")

</div>

I think the restriction has been removed.

[https://drive.google.com/file/d/1\_35OQfGCyZKfm9k0QsJ3zyyguHNbbGnP/view?usp=sharing](https://drive.google.com/file/d/1_35OQfGCyZKfm9k0QsJ3zyyguHNbbGnP/view?usp=sharing)  
[https://drive.google.com/file/d/1xg23oWjYrSyaurmGeEBQIs7jzUMBI01z/view?usp=sharing](https://drive.google.com/file/d/1xg23oWjYrSyaurmGeEBQIs7jzUMBI01z/view?usp=sharing)  
[https://drive.google.com/file/d/1vDP6K5jjOOkBNhz1N6N1HVrR67kG9pPd/view?usp=sharing](https://drive.google.com/file/d/1vDP6K5jjOOkBNhz1N6N1HVrR67kG9pPd/view?usp=sharing)  
[https://drive.google.com/file/d/1lP9t\_GyCfpN2QF0srmTfWVpHbo8\_\_C4J/view?usp=sharing](https://drive.google.com/file/d/1lP9t_GyCfpN2QF0srmTfWVpHbo8__C4J/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![Dr\_DBW](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/dr_dbw/32/42_2.png) [@Dr\_DBW](https://gromacs.bioexcel.eu/u/Dr_DBW)\
**Post date:** [October 1, 2020, 10:17pm UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/15 "2020-10-01T22:17:20Z")

</div>

NP1 contains 2670 atoms, not 887. Look at nanoparticle.itp

The .itp is inconsistent with what you added to the coordinate file.

---

<div class="post-metadata">

**Author:** ![khatti](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@khatti](https://gromacs.bioexcel.eu/u/khatti)\
**Post date:** [October 3, 2020, 1:02pm UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/16 "2020-10-03T13:02:54Z")

</div>

Thanks so much. I completely realized my mistake.  
I downloaded and applied charmm36 force field due to using nanoparticle.itp, but it is correspond to its own Au.gro file as you say.

How can I create itp file of my .gro file with charmm36.ff? I tested x2top, but there is no .n2t file in charmm36.ff.  
Could I have your help? please.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [October 5, 2020, 1:46pm UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/17 "2020-10-05T13:46:47Z")

</div>

You will have to write a suitable `.n2t` file for generating such a species if you want to use `x2top`.

---

<div class="post-metadata">

**Author:** ![khatti](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@khatti](https://gromacs.bioexcel.eu/u/khatti)\
**Post date:** [October 6, 2020, 5:24am UTC](https://gromacs.bioexcel.eu/t/coordinate-error-with-grompp/878/18 "2020-10-06T05:24:07Z")

</div>

Thank you for your response.
