Tutorial problem Protein-Ligand Complex

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?

This suggests you did not:

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

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

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.

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

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

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.

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

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