# Tutorial problem Protein-Ligand Complex

**URL:** <https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015>\
**Category:** User discussions\
**Created:** [October 28, 2020, 3:34pm UTC](https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015 "2020-10-28T15:34:09Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabrizio1](https://avatars.discourse-cdn.com/v4/letter/f/47e85d/32.png) [@Fabrizio1](https://gromacs.bioexcel.eu/u/Fabrizio1)\
**Post date:** [October 28, 2020, 3:34pm UTC](https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015/1 "2020-10-28T15:34:09Z")

</div>

GROMACS version: 2020.2  
GROMACS modification: No

Hello, I am trying to follow the Protein-Ligand Complex tutorial but I end up in a problem  
and I don’t understand what I am doing wrong.

I launch the command:  
gmx editconf -f complex.gro -o newbox.gro -bt dodecahedron -d 1.0

That gives some output and a warning:  
WARNING: Bad box in file complex.gro  
Generated a cubic box 4.069 x 4.192 x 5.073  
Read 2614 atoms  
…

Then i use:  
gmx solvate -cp newbox.gro -cs spc216.gro -p topol.top -o solv.gro  
Generating solvent configuration  
Will generate new solvent configuration of 5x5x3 boxes  
Solvent box contains 37314 atoms in 12438 residues  
Removed 3990 solvent atoms due to solvent-solvent overlap  
Removed 2430 solvent atoms due to solute-solvent overlap  
Sorting configuration  
Found 1 molecule type:  
SOL ( 3 atoms): 10298 residues  
Generated solvent containing 30894 atoms in 10298 residues  
Writing generated configuration to solv.gro

Back Off! I just backed up solv.gro to ./#solv.gro.2#

Output configuration contains 33508 atoms in 10461 residues  
Volume : 341.949 (nm^3)  
Density : 997.119 (g/l)  
Number of solvent molecules: 10298

Processing topology  
Adding line for 10298 solvent molecules with resname (SOL) to topology file (topol.top)

Back Off! I just backed up topol.top to ./#topol.top.7#

And, at last:  
gmx grompp -f ions.mdp -c solv.gro -p topol.top -o ions.tpr  
But here I get a fatal error:  
Fatal error:  
number of coordinates in coordinate file (solv.gro, 33508)  
does not match topology (topol.top, 33530)

So, somewhere I am doing a mistake. But I did add the JZ4 in the topol.top under the [molecules].  
I also added the coordinates of JZ4 in complex.gro (that originally is a copy of 3HTB\_processed.gro) as described.

Any 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 28, 2020, 3:47pm UTC](https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015/2 "2020-10-28T15:47:50Z")

</div>

> [@Fabrizio1](#):
>
> I also added the coordinates of JZ4 in complex.gro (that originally is a copy of 3HTB\_processed.gro) as described.

This suggests you did not:

> [@Fabrizio1](#):
>
> Fatal error:  
> number of coordinates in coordinate file (solv.gro, 33508)  
> does not match topology (topol.top, 33530)

Hence you get the “bad box” warning because the coordinate file does not have correct contents.

---

<div class="post-metadata">

**Author:** ![Fabrizio1](https://avatars.discourse-cdn.com/v4/letter/f/47e85d/32.png) [@Fabrizio1](https://gromacs.bioexcel.eu/u/Fabrizio1)\
**Post date:** [October 28, 2020, 4:42pm UTC](https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015/3 "2020-10-28T16:42:40Z")

</div>

In complex.gro here what I have added (take in mind it has a lot more lines, just  
before 1jz4 I have 163ASN OT2 2614 0.683 -0.703 -0.011)  
1JZ4 C1 1 2.429 -2.412 -0.007  
1JZ4 C2 2 2.155 -2.721 -0.411  
1JZ4 C3 3 2.207 -2.675 -0.533  
1JZ4 C4 4 2.267 -2.551 -0.545  
1JZ4 C9 5 2.277 -2.473 -0.430  
1JZ4 O10 6 2.169 -2.646 -0.295  
1JZ4 H22 7 2.229 -2.519 -0.308  
1JZ4 C8 8 2.246 -2.441 -0.181  
1JZ4 H21 9 2.392 -2.470 -0.139  
1JZ4 C5 10 2.341 -2.354 -0.434  
1JZ4 H18 11 2.531 -2.436 0.015  
1JZ4 C6 12 2.366 -2.453 0.069  
1JZ4 H19 13 2.417 -2.306 -0.010  
1JZ4 C7 14 2.107 -2.812 -0.407  
1JZ4 H20 15 2.199 -2.735 -0.617  
1JZ4 H1 16 2.304 -2.518 -0.635  
1JZ4 H2 17 2.137 -2.681 -0.204  
1JZ4 H3 18 2.178 -2.476 -0.106  
1JZ4 H4 19 2.227 -2.337 -0.193  
1JZ4 H5 20 2.458 -2.429 -0.214  
1JZ4 H6 21 2.402 -2.577 -0.131  
1JZ4 H7 22 2.374 -2.321 -0.516

---

<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 28, 2020, 4:54pm UTC](https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015/4 "2020-10-28T16:54:12Z")

</div>

You also need to correctly update the number of atoms on the second line of the `.gro` file and make sure to preserve the box vectors at the bottom.

---

<div class="post-metadata">

**Author:** ![Fabrizio1](https://avatars.discourse-cdn.com/v4/letter/f/47e85d/32.png) [@Fabrizio1](https://gromacs.bioexcel.eu/u/Fabrizio1)\
**Post date:** [October 28, 2020, 5:11pm UTC](https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015/5 "2020-10-28T17:11:18Z")

</div>

THAT! Thank you, I totally missed that line in the tutorial.

---

<div class="post-metadata">

**Author:** ![saidbyadii](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@saidbyadii](https://gromacs.bioexcel.eu/u/saidbyadii)\
**Post date:** [November 11, 2024, 6:45am UTC](https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015/6 "2024-11-11T06:45:54Z")

</div>

which .gro do you mean sir (I have only complex.gro and jz4.gro)…can you explain me more please

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [November 11, 2024, 7:42am UTC](https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015/7 "2024-11-11T07:42:02Z")

</div>

It is very difficult to help you. You just revived a four years old thread and you don’t give any information about what your problem is. I would guess that you will find answers to your question in the tutorial - take your time and read it carefully. Otherwise, it is probably not related to the issue in this thread, and in that case it would be better to start a new thread, carefully explaining your problem.

---

<div class="post-metadata">

**Author:** ![saidbyadii](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@saidbyadii](https://gromacs.bioexcel.eu/u/saidbyadii)\
**Post date:** [November 11, 2024, 8:44am UTC](https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015/8 "2024-11-11T08:44:42Z")

</div>

I find it and I corrected it but …it still gives the following problem:  
Fatal error:  
after gmx grompp -f ions.mdp -c solv.gro -p topol.top -o ions.tpr  
i got  
number of coordinates in coordinate file (solv.gro, 33518)  
does not match topology (topol.top, 2636)  
thank you in advance

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [November 11, 2024, 9:09am UTC](https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015/9 "2024-11-11T09:09:38Z")

</div>

There are very many threads with the same problem. You have probably forgotten to update the topol.top file when you added molecules (probably the solvent) to the .gro file. Read the tutorial carefully again.

---

<div class="post-metadata">

**Author:** ![saidbyadii](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@saidbyadii](https://gromacs.bioexcel.eu/u/saidbyadii)\
**Post date:** [December 10, 2024, 5:22am UTC](https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015/10 "2024-12-10T05:22:15Z")

</div>

Dear All, during the Preparation of the protein topology with pdb2gmx  
I run : gmx pdb2gmx -f compp.pdb -o Cis\_processed.gro -ter  
I gives me → Fatal error:  
Atom HH in residue ARG 2 was not found in rtp entry ARG with 25 atoms  
while sorting atoms.  
Thank you in advance

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [December 10, 2024, 8:14am UTC](https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015/11 "2024-12-10T08:14:03Z")

</div>

Have you read [Common errors when using GROMACS - GROMACS 2024.4 documentation](https://manual.gromacs.org/current/user-guide/run-time-errors.html#common-errors-when-using-gromacs), or more specifically [Common errors when using GROMACS - GROMACS 2024.4 documentation](https://manual.gromacs.org/current/user-guide/run-time-errors.html#warning-atom-x-is-missing-in-residue-xxx-y-in-the-pdb-file)?

---

<div class="post-metadata">

**Author:** ![saidbyadii](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@saidbyadii](https://gromacs.bioexcel.eu/u/saidbyadii)\
**Post date:** [December 11, 2024, 4:17am UTC](https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015/12 "2024-12-11T04:17:36Z")

</div>

I solved it…thank you so much…  
I have another issue  
after :gmx pdb2gmx -f 7ceek.pdb -o 7ceek\_processed.gro -ter  
It gives me  
Fatal error:  
Residue ‘UNL’ not found in residue topology database  
this is the port containing my small molecule\>\>  
ATOM 3342 CA ALA B 438 19.291 49.813 60.207 1.00 82.38  
ATOM 3343 C ALA B 438 19.692 49.030 61.456 1.00 87.51  
ATOM 3344 O ALA B 438 20.780 49.223 62.003 1.00 90.92  
ATOM 3345 CB ALA B 438 18.488 51.046 60.590 1.00 78.23  
ATOM 3346 OXT ALA B 438 18.907 48.200 61.909 1.00 99.99  
TER 3347 ALA B 438  
HETATM 3348 C4 UNL B 165 16.022 64.690 39.945 1.00 0.00  
HETATM 3349 C5 UNL B 165 15.914 65.296 38.694 1.00 0.00  
HETATM 3350 C6 UNL B 165 16.314 64.593 37.577 1.00 0.00  
HETATM 3351 N2 UNL B 165 16.793 63.371 37.704 1.00 0.00  
HETATM 3352 C14 UNL B 165 16.879 62.818 38.894 1.00 0.00  
HETATM 3353 N3 UNL B 165 17.361 61.586 38.988 1.00 0.00  
HETATM 3354 N4 UNL B 165 16.514 63.446 39.996 1.00 0.00  
HETATM 3355 H31 UNL B 165 17.427 61.182 39.908 1.00 0.00  
HETATM 3356 H32 UNL B 165 17.643 61.136 38.142 1.00 0.00  
HETATM 3357 N UNL B 165 16.253 65.127 36.307 1.00 0.00  
HETATM 3358 HN UNL B 165 15.382 65.074 35.796 1.00 0.00  
HETATM 3359 N1 UNL B 165 17.368 65.759 35.649 1.00 0.00  
HETATM 3360 H1 UNL B 165 17.831 66.496 36.175 1.00 0.00  
HETATM 3361 C7 UNL B 165 17.817 65.333 34.399 1.00 0.00  
HETATM 3362 C13 UNL B 165 18.372 64.045 34.210 1.00 0.00  
HETATM 3363 C12 UNL B 165 18.828 63.708 32.933 1.00 0.00  
HETATM 3364 C10 UNL B 165 18.749 64.581 31.885 1.00 0.00  
HETATM 3365 O2 UNL B 165 19.403 62.538 32.543 1.00 0.00  
HETATM 3366 O1 UNL B 165 19.268 64.028 30.756 1.00 0.00  
HETATM 3367 C9 UNL B 165 18.203 65.858 32.028 1.00 0.00  
HETATM 3368 C11 UNL B 165 19.726 62.693 31.128 1.00 0.00  
HETATM 3369 C8 UNL B 165 17.731 66.231 33.306 1.00 0.00  
HETATM 3370 C3 UNL B 165 15.632 65.398 41.224 1.00 0.00  
HETATM 3371 C15 UNL B 165 14.556 66.323 41.216 1.00 0.00  
HETATM 3372 C16 UNL B 165 14.169 66.981 42.393 1.00 0.00  
HETATM 3373 C17 UNL B 165 14.840 66.730 43.599 1.00 0.00  
HETATM 3374 C1 UNL B 165 15.916 65.823 43.632 1.00 0.00  
HETATM 3375 C2 UNL B 165 16.309 65.169 42.455 1.00 0.00  
HETATM 3376 O UNL B 165 16.609 65.544 44.793 1.00 0.00  
HETATM 3377 C UNL B 165 17.505 66.478 45.420 1.00 0.00  
CONECT 3377 3376  
CONECT 3374 3373 3376 3375  
CONECT 3364 3363 3366 3367  
Thanks

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [December 11, 2024, 6:47am UTC](https://gromacs.bioexcel.eu/t/tutorial-problem-protein-ligand-complex/1015/13 "2024-12-11T06:47:44Z")

</div>

This does not seem related to the original topic of this post any more. Could you start a new topic with your question instead?
