# How to create topology for a ligand

**URL:** <https://gromacs.bioexcel.eu/t/how-to-create-topology-for-a-ligand/318>\
**Category:** User discussions\
**Created:** [June 15, 2020, 7:14pm UTC](https://gromacs.bioexcel.eu/t/how-to-create-topology-for-a-ligand/318 "2020-06-15T19:14:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![js10230](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@js10230](https://gromacs.bioexcel.eu/u/js10230)\
**Post date:** [June 15, 2020, 7:14pm UTC](https://gromacs.bioexcel.eu/t/how-to-create-topology-for-a-ligand/318/1 "2020-06-15T19:14:47Z")

</div>

GROMACS version: 2018.3  
GROMACS modification: No

I picked a binding site from Autodock simulation, and saved the ligand at that binding site as a PDB.  
Then I added its content to a protein PDB file by copying and pasting. (i.e. I tried to create a PDB file for protein-ligand complex)

After that, I ran pdb2gmx, and I got error as follows:  
**Residue ‘LIG’ not found in residue topology database**

It seems to be saying there is no data on the ligand in the forcefield.  
How do I solve the problem? I think I will need a step-by-step help on it. I am using AMBER99SB-ILDN forcefield.

Thank you.

---

<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:** [June 15, 2020, 7:27pm UTC](https://gromacs.bioexcel.eu/t/how-to-create-topology-for-a-ligand/318/2 "2020-06-15T19:27:18Z")

</div>

`pdb2gmx` isn’t magic. It can only build topologies for species it knows. You can learn more about this at [http://manual.gromacs.org/current/user-guide/run-time-errors.html#residue-xxx-not-found-in-residue-topology-database](http://manual.gromacs.org/current/user-guide/run-time-errors.html#residue-xxx-not-found-in-residue-topology-database)

As for the actual setup, please consider the following tutorial:

[http://www.mdtutorials.com/gmx/complex/index.html](http://www.mdtutorials.com/gmx/complex/index.html)

While my tutorial uses CHARMM, the same principles apply for any force field you might work with. You need to generate the ligand topology separately, in a manner consistent with the protein force field you’ve chosen to use.
