Error in GROMACS Editconf: Invalid Line in Complex.gro After Adding Ligand Coordinates

GROMACS 2024.2
GROMACS Modification: No

I followed the tutorial for protein-ligand complex preparation, but I am using the OPLS force field. I followed the steps in the tutorial to build the complex.gro file containing both the protein and the ligand. Here’s what I did:

  1. I copied the 3aj7_processed.gro file to a new file named complex.gro for manipulation.
  2. I copied the coordinate section of ligand.gro and pasted it into complex.gro below the last line of the protein atoms and before the box vectors, as shown in the attached file.

When I tried running the following command:

gmx editconf -f complex.gro -o newbox.gro -bt dodecahedron -d 1.0

I encountered the following error:
Invalid line in complex.gro for atom 9406

Please find the attached file for reference: complexgro.txt
complexgro.txt (416.0 KB)

Have you tried by taking away the empty lines before/after your ligand?

1 Like

Thanks for your reply and your time. I removed the line between the protein and the ligand but the same error. I saw space after protein and above the ligand in the tutorial. Your help is greatly appreciated

It works for me if I take away both the empty lines, the one between the protein and the ligand and that between ligand and box vectors.

  589GLU     O2 9405   0.993   3.116   0.368
    1UNK    C00    1   0.100   0.100   0.000
    1UNK    O01    2  -0.042   0.100   0.000
    1UNK    C02    3  -0.103   0.100   0.123
    1UNK    C03    4  -0.235   0.145   0.123
    1UNK    C04    5  -0.308   0.150   0.241
    1UNK    C05    6  -0.252   0.105   0.362
    1UNK    C06    7  -0.334   0.104   0.490
    1UNK    C07    8  -0.477   0.062   0.470
    1UNK    N08    9  -0.571   0.150   0.441
    1UNK    N09   10  -0.692   0.090   0.443
    1UNK    C0A   11  -0.673  -0.037   0.473
    1UNK    S0B   12  -0.807  -0.143   0.499
    1UNK    C0C   13  -0.955  -0.045   0.468
    1UNK    C0D   14  -0.986  -0.036   0.321
    1UNK    O0E   15  -1.076  -0.105   0.272
    1UNK    N0F   16  -0.906   0.053   0.251
    1UNK    C0G   17  -0.913   0.074   0.113
    1UNK    C0H   18  -1.031   0.052   0.041
    1UNK    C0I   19  -1.032   0.059  -0.099
    1UNK    C0J   20  -0.915   0.088  -0.168
    1UNK    C0K   21  -0.910   0.085  -0.316
    1UNK    C0M   22  -1.036   0.105  -0.396
    1UNK    O0N   23  -0.802   0.066  -0.372
    1UNK    C0O   24  -0.798   0.113  -0.095
    1UNK    C0P   25  -0.797   0.113   0.045
    1UNK    N0Q   26  -0.536  -0.066   0.487
    1UNK    C0R   27  -0.471  -0.192   0.520
    1UNK    C0S   28  -0.544  -0.305   0.557
    1UNK    C0T   29  -0.483  -0.416   0.617
    1UNK    C0U   30  -0.346  -0.419   0.634
    1UNK    C0V   31  -0.270  -0.316   0.582
    1UNK    C0W   32  -0.332  -0.206   0.522
    1UNK    C0X   33  -0.119   0.060   0.361
    1UNK    C0Y   34  -0.044   0.060   0.242
    1UNK    H0Z   35   0.133   0.122  -0.102
    1UNK    H10   36   0.139   0.002   0.028
    1UNK    H11   37   0.140   0.178   0.065
    1UNK    H12   38  -0.281   0.177   0.029
    1UNK    H13   39  -0.409   0.190   0.237
    1UNK    H14   40  -0.333   0.208   0.528
    1UNK    H15   41  -0.285   0.046   0.569
    1UNK    H16   42  -0.952   0.054   0.514
    1UNK    H17   43  -1.038  -0.100   0.514
    1UNK    H18   44  -0.822   0.087   0.299
    1UNK    H19   45  -1.123   0.029   0.092
    1UNK    H1A   46  -1.125   0.036  -0.149
    1UNK    H1B   47  -1.120   0.140  -0.335
    1UNK    H1C   48  -1.064   0.011  -0.444
    1UNK    H1D   49  -1.018   0.182  -0.471
    1UNK    H1E   50  -0.704   0.134  -0.148
    1UNK    H1F   51  -0.706   0.137   0.098
    1UNK    H1G   52  -0.650  -0.317   0.543
    1UNK    H1H   53  -0.545  -0.499   0.649
    1UNK    H1I   54  -0.300  -0.504   0.684
    1UNK    H1J   55  -0.162  -0.321   0.587
    1UNK    H1K   56  -0.265  -0.133   0.478
    1UNK    H1M   57  -0.072   0.025   0.452
    1UNK    H1N   58   0.060   0.028   0.246
   9.55160  11.55380   6.17456   0.00000   0.00000   0.00000   0.00000  -0.11317   0.00000
1 Like

First, I would like to sincerely thank you for your help—it really worked for me! I appreciate your support.
Now, I have encountered new issues with the ligand .itp file when running the following command:
gmx grompp -f ions.mdp -c solv.gro -p topol.top -o ions.tpr

The following errors appeared:
ERROR 1 [file 4.itp, line 7]:
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 59 [file 4.itp, line 70]:
Atomtype opls_800 not found.
I used LigParGen to generate the .itp file for the ligand. I have attached the .itp file for reference: 4_itp.txt
How can I resolve these issues? Any help would be greatly appreciated!

I am not familiar with the tutorial but I guess that all passages are explained there. What is the tutorial saying about the parameters of the ligand? How should they be obtained?

1 Like