# How to generate gromacs topology

**URL:** <https://gromacs.bioexcel.eu/t/how-to-generate-gromacs-topology/1683>\
**Category:** User discussions\
**Created:** [March 4, 2021, 3:07pm UTC](https://gromacs.bioexcel.eu/t/how-to-generate-gromacs-topology/1683 "2021-03-04T15:07:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexmathew](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@alexmathew](https://gromacs.bioexcel.eu/u/alexmathew)\
**Post date:** [March 4, 2021, 3:07pm UTC](https://gromacs.bioexcel.eu/t/how-to-generate-gromacs-topology/1683/1 "2021-03-04T15:07:39Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question How to generate gromacs topology from PRM and PDB/PSF file?  
I have PDB and PSF of a molecule with PRM file. How to make ITP and TOP from that?

---

<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:** [March 8, 2021, 7:48pm UTC](https://gromacs.bioexcel.eu/t/how-to-generate-gromacs-topology/1683/2 "2021-03-08T19:48:55Z")

</div>

Hi,  
An alternative is to use gmx pdb2gmx -f PDB file -ff forcefield to generate the topology file.

`gmx pdb2gmx` will search for force fields by looking for a `forcefield.itp` file in subdirectories `<forcefield>.ff` of the current working directory and of the GROMACS library directory as inferred from the path of the binary or the `GMXLIB` environment variable. By default the forcefield selection is interactive, but you can use the `-ff` option to specify one of the short names in the list on the command line instead. In that case `gmx pdb2gmx` just looks for the corresponding `<forcefield>.ff` directory.

Best regards  
Alessandra
