How to create topology for a ligand

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.

pdb2gmx isn’t magic. It can only build topologies for species it knows. You can learn more about this at

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

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.