# Error in topology generation regarding using pdb file

**URL:** <https://gromacs.bioexcel.eu/t/error-in-topology-generation-regarding-using-pdb-file/11486>\
**Category:** User discussions\
**Created:** [February 7, 2025, 5:39am UTC](https://gromacs.bioexcel.eu/t/error-in-topology-generation-regarding-using-pdb-file/11486 "2025-02-07T05:39:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MDGRO](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@MDGRO](https://gromacs.bioexcel.eu/u/MDGRO)\
**Post date:** [February 7, 2025, 5:39am UTC](https://gromacs.bioexcel.eu/t/error-in-topology-generation-regarding-using-pdb-file/11486/1 "2025-02-07T05:39:39Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question I am facing difficulties while generating the topology file. Specifically, I am trying to simulate molecules like naphthalene or anthracene to study the interaction with water molecule, but I keep encountering an error during the generation of the topology file. While giving the force field and water model to the naphthalene pdb file that I have generated, it is showing the error as **residue ligand not found in the residue topology database.** Can anyone explain this issue and give me a solution?I even tried to edit the pdb file but still facing the issue.

---

<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:** [February 7, 2025, 9:28am UTC](https://gromacs.bioexcel.eu/t/error-in-topology-generation-regarding-using-pdb-file/11486/2 "2025-02-07T09:28:57Z")

</div>

Hi,  
Please specify which tool give you the error.  
Usually in the topology generation phase, the rtp (residue topology database) [File formats - GROMACS 2024.5 documentation](https://manual.gromacs.org/current/reference-manual/file-formats.html#rtp)  
should contain all the entries/names present the pdb file to allow the tool (e.i gmx pdb2gmx) to build a topology file for the specific system.  
In your case, my guess is that the ligand is not properly defined in the rtp file  
\Alessandra

---

<div class="post-metadata">

**Author:** ![MDGRO](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@MDGRO](https://gromacs.bioexcel.eu/u/MDGRO)\
**Post date:** [February 7, 2025, 10:51am UTC](https://gromacs.bioexcel.eu/t/error-in-topology-generation-regarding-using-pdb-file/11486/3 "2025-02-07T10:51:41Z")

</div>

Thank you for your reply, ma’am.

And Yes, I am aware that not all ligands are included in the **gmx pdb2gmx** tool. However, I only have the **PDB file** at the moment. I converted the **naphthalene PDB file** to **mol2** format for generating the **ITP file** using **SwissParam** , but I’m still encountering an error.

If I had the **ITP file** , I would manually write the topology file for both the **naphthalene** and **water molecules**. Could you kindly explain where I can obtain the source **ITP files** for these molecules?

(P.S. I also tried modifying the entries in the **PDB file** to allow **gmx pdb2gmx** to generate the topology, but the error persists.)
