# Running Protein simulation with multiple ligands

**URL:** <https://gromacs.bioexcel.eu/t/running-protein-simulation-with-multiple-ligands/4472>\
**Category:** User discussions\
**Created:** [July 17, 2022, 8:05am UTC](https://gromacs.bioexcel.eu/t/running-protein-simulation-with-multiple-ligands/4472 "2022-07-17T08:05:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bidisha](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@Bidisha](https://gromacs.bioexcel.eu/u/Bidisha)\
**Post date:** [July 17, 2022, 8:05am UTC](https://gromacs.bioexcel.eu/t/running-protein-simulation-with-multiple-ligands/4472/1 "2022-07-17T08:05:21Z")

</div>

GROMACS version: 2018

Hello everyone,  
I am new to GROMACS and trying to run a protein simulation with chromophores FAD and DLZ and DNA as ligands using Amber ff99sb force field. While running the simulation how should I generate the index files for the chromophores? Should I generate three different index files each for FAD DLZ and DNA and then club it as one? In that case how should I do that? or is there any other way for indexing multiple ligands. Thank you very much for your help.

---

<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:** [July 26, 2022, 12:00pm UTC](https://gromacs.bioexcel.eu/t/running-protein-simulation-with-multiple-ligands/4472/2 "2022-07-26T12:00:35Z")

</div>

Hi,  
to generate an index file you can use the tool gmx make\_ndx [gmx make\_ndx — GROMACS 2022.2 documentation](https://manual.gromacs.org/current/onlinehelp/gmx-make_ndx.html) or gmx select [gmx select — GROMACS 2022.2 documentation](https://manual.gromacs.org/current/onlinehelp/gmx-select.html). An index file can contain several groups. You can define a group for each chromophore if you want.  
\Alessandra

---

<div class="post-metadata">

**Author:** ![Bidisha](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@Bidisha](https://gromacs.bioexcel.eu/u/Bidisha)\
**Post date:** [August 9, 2022, 5:34pm UTC](https://gromacs.bioexcel.eu/t/running-protein-simulation-with-multiple-ligands/4472/3 "2022-08-09T17:34:12Z")

</div>

Thank you very much for your help. It worked. Could help me regarding restraining the DNA ligand, in the same system? Thank you.

---

<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:** [August 11, 2022, 8:21am UTC](https://gromacs.bioexcel.eu/t/running-protein-simulation-with-multiple-ligands/4472/4 "2022-08-11T08:21:37Z")

</div>

Hi,  
do you mean how to position-restrain the DNA? Or do you refer to other type of restraints ([Restraints — GROMACS 2022.2 documentation](https://manual.gromacs.org/current/reference-manual/functions/restraints.html))?  
\Alessandra

---

<div class="post-metadata">

**Author:** ![Bidisha](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@Bidisha](https://gromacs.bioexcel.eu/u/Bidisha)\
**Post date:** [August 11, 2022, 8:38am UTC](https://gromacs.bioexcel.eu/t/running-protein-simulation-with-multiple-ligands/4472/5 "2022-08-11T08:38:15Z")

</div>

Hello,

Yes I mean the position restraint of DNA in a Protein-DNA simulation.

---

<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:** [August 12, 2022, 2:52pm UTC](https://gromacs.bioexcel.eu/t/running-protein-simulation-with-multiple-ligands/4472/6 "2022-08-12T14:52:23Z")

</div>

Hi,  
FIrst you need a posre.itp type of file in the working directory and this file has to be correctly included in the topology file. To do that you can use [https://manual.gromacs.org/current/onlinehelp/gmx-genrestr.html](https://manual.gromacs.org/current/onlinehelp/gmx-genrestr.html). The tool generate the file you needs and include them in the topology.  
If you have use gmx pdb2gmx to create the topology of the whole system, a position restrain file for DNA (e.i posre.itp type of file) has been already created and include in the proper place in the topology files.

Then you tell the program to use posre file, and you can do it in the in mdp file using the option `define`

> define  
> defines to pass to the preprocessor, default is no defines. You can use any defines to control options in your customized topology files. Options that act on existing [top](https://manual.gromacs.org/current/reference-manual/file-formats.html#top) file mechanisms include
> 
> `-DPOSRES` will trigger the inclusion of `posre.itp` into your topology, used for implementing position restraints.

For example at the end of the dna.itp file you read something like this  
#ifdef POSRESdna  
#include “posre\_DNA.itp”  
#endif

Then define = -DPOSRESdna in the mdp file. This will activate the position restrain only on the DNA, only if POSRESdna is only defined in the dna.itp.

\Alessandra

---

<div class="post-metadata">

**Author:** ![Bidisha](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@Bidisha](https://gromacs.bioexcel.eu/u/Bidisha)\
**Post date:** [August 16, 2022, 6:55am UTC](https://gromacs.bioexcel.eu/t/running-protein-simulation-with-multiple-ligands/4472/7 "2022-08-16T06:55:18Z")

</div>

Thank you so much for your help Ma’am. As I am new to this I have another query regarding a problem that I am facing. I shall be highly obliged if you could kindly help me out with this.

This molecule too has two chromophores. So I created two separate atomtypes.itp for two chromophores and incorporated the two files (ligand1\_atomtypes.itp and ligand2\_atomtypes.itp) separately in the topol.top file. and also incorporated the two Ligand.gro files of two separate ligands into the protein.gro and then while using gmx grompp -f ions.mdp -c solv.gro -p topol.top -o ions.tpr i am having to many warnings and error. What is the correct way to go about it? I am attaching the files here for your reference.

 ![error3](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/a/ab6b1481486090188037b313e65be3aedbbcd583.jpeg)  
 ![error2](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/9/97967fa9993828ed2ccd436f2f70c95a29bebb76.jpeg)  
 ![error1](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/b/b53cab94a908f266fbfea7a4aa17b8b9b43a7438.jpeg)

Thank you for your time and consideration.

---

<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:** [August 16, 2022, 9:23am UTC](https://gromacs.bioexcel.eu/t/running-protein-simulation-with-multiple-ligands/4472/8 "2022-08-16T09:23:37Z")

</div>

Hi,

the error says that parameters are re-refined in the topology files.  
You probably have a directive in \*itp files before [moleculetype], where non-bonded parameters are defined. Those definitions overwrite any previous parameter definition.  
Do you want to redefine standard force field parameters? Then one should define those new parameters only once at the top of the topol files and not in each itp files.  
For topology format see [File formats — GROMACS 2022.2 documentation](https://manual.gromacs.org/current/reference-manual/topologies/topology-file-formats.html?highlight=force%20field%20table)

I hope it helps  
Alessandra

---

<div class="post-metadata">

**Author:** ![sunilsthorat](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@sunilsthorat](https://gromacs.bioexcel.eu/u/sunilsthorat)\
**Post date:** [March 29, 2024, 3:57am UTC](https://gromacs.bioexcel.eu/t/running-protein-simulation-with-multiple-ligands/4472/9 "2024-03-29T03:57:48Z")

</div>

Hello Madam,  
I am performing multi ligand MD simulation (5 ligands), I am following GROMACS Tutorials for Protein-ligand complex and created respective \*.itp and \*.prm files and included in the topol.top file. I have sucessfully done solvation and got stuck while assembling \*.tpr files using grompp \<gmx grompp -f em.mdp -c solvated\_ions.gro -p topol.top -o em.tpr\>.  
I am getting WARNING messages for 2 \*.prm files out 5 and ERROR messages for the same. Fatal error: Syntax error was for first liand \*.itp file at [atomtypes] as Invalid order for directive atomtypes.

###############ERROR MSG##################  
$ gmx grompp -f em.mdp -c solvated\_ions.gro -p topol.top -o em.tpr  
:-) GROMACS - gmx grompp, 2020.1-Ubuntu-2020.1-1 (-:

Ignoring obsolete mdp entry ‘title’  
Ignoring obsolete mdp entry ‘ns\_type’

NOTE 1 [file em.mdp]:  
With Verlet lists the optimal nstlist is \>= 10, with GPUs \>= 20. Note  
that with the Verlet scheme, nstlist has no effect on the accuracy of  
your simulation.

Setting the LD random seed to 1535351374

WARNING 1 [file astra\_CHARMM.prm, line 1-98]:  
Too few parameters on line (source file  
/build/gromacs-NyEPF4/gromacs-2020.1/src/gromacs/gmxpreprocess/toppush.cpp, line 1039)

ERROR 21 [file astra\_CHARMM.prm, line 99]:  
Trying to add Buck.ham (SR) while the default nonbond type is LJ (SR)

WARNING 74 [file ella\_CHARMM.prm, line 1-4]:  
Too few parameters on line (source file  
/build/gromacs-NyEPF4/gromacs-2020.1/src/gromacs/gmxpreprocess/toppush.cpp, line 1039)

ERROR 35 [file ella\_CHARMM.prm, line 5-12]:  
Trying to add Buck.ham (SR) while the default nonbond type is LJ (SR)

WARNING 77 [file ella\_CHARMM.prm, line 14-44]:  
Too few parameters on line (source file  
/build/gromacs-NyEPF4/gromacs-2020.1/src/gromacs/gmxpreprocess/toppush.cpp, line 1039)

ERROR 44 [file ella\_CHARMM.prm, line 45-51]:  
Trying to add Buck.ham (SR) while the default nonbond type is LJ (SR)

Generated 167799 of the 167910 non-bonded parameter combinations  
Generating 1-4 interactions: fudge = 1  
Generated 117432 of the 167910 1-4 parameter combinations

* * *

Program: gmx grompp, version 2020.1-Ubuntu-2020.1-1  
Source file: src/gromacs/gmxpreprocess/topio.cpp (line 553)

Fatal error:  
Syntax error - File astra\_GMX.itp, line 3  
Last line read:  
‘[atomtypes]’  
Invalid order for directive atomtypes  
#######################################################

I am attaching the topol.top and respective \*.itp and \*.prm files for your reference (renamed as log files for uploading)  
[astra\_GMX\_itp.log](https://gromacs.bioexcel.eu/uploads/short-url/pQkSh8yPyeIaFhNhqVqdImwstxz.log) (37.9 KB)  
[astra\_CHARMM\_prm.log](https://gromacs.bioexcel.eu/uploads/short-url/8qcXrLJ5mZn6cG4FAE1xq3WYpZj.log) (4.2 KB)  
.  
Please suggest the solution.  
[topol.top](https://gromacs.bioexcel.eu/uploads/short-url/8Vttayh5lhpnZ6jSFyY8IZqra29.top) (1.2 MB)  
[ella\_CHARMM\_prm.log](https://gromacs.bioexcel.eu/uploads/short-url/zPxZWOyS8G0PmQ7oI3djQhGNUov.log) (1.7 KB)

---

<div class="post-metadata">

**Author:** ![scinikhil](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/scinikhil/32/3483_2.png) [@scinikhil](https://gromacs.bioexcel.eu/u/scinikhil)\
**Post date:** [March 29, 2024, 11:31pm UTC](https://gromacs.bioexcel.eu/t/running-protein-simulation-with-multiple-ligands/4472/10 "2024-03-29T23:31:26Z")

</div>

[https://manual.gromacs.org/2020.2/user-guide/run-time-errors.html#invalid-order-for-directive-xxx](https://manual.gromacs.org/2020.2/user-guide/run-time-errors.html#invalid-order-for-directive-xxx)
