# How to use the charmm36 force field parameters from CGenFF for ligand?

**URL:** <https://gromacs.bioexcel.eu/t/how-to-use-the-charmm36-force-field-parameters-from-cgenff-for-ligand/11057>\
**Category:** User discussions\
**Tags:** forcefield\
**Created:** [January 16, 2025, 5:59pm UTC](https://gromacs.bioexcel.eu/t/how-to-use-the-charmm36-force-field-parameters-from-cgenff-for-ligand/11057 "2025-01-16T17:59:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chongee](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@Chongee](https://gromacs.bioexcel.eu/u/Chongee)\
**Post date:** [January 16, 2025, 5:59pm UTC](https://gromacs.bioexcel.eu/t/how-to-use-the-charmm36-force-field-parameters-from-cgenff-for-ligand/11057/1 "2025-01-16T17:59:12Z")

</div>

GROMACS version: 2024.4  
GROMACS modification: No

I am following the famous Justin Lemkul tutorials, I want to combine umbrella sampling with protein ligand complex. First I am having difficulties with the ligand force field parameters.

The tutorial provides a solution that doesn’t work for me. There is this repo:

> **[GitHub - Lemkul-Lab/cgenff\_charmm2gmx: Python scripts to convert CGenFF stream files to...](https://github.com/Lemkul-Lab/cgenff_charmm2gmx)**
>
> Python scripts to convert CGenFF stream files to GROMACS format

All of these require a specific version of networkx that I fail to install, and the others I can don’t work.

On the CGenFF website there is an option to download the results in GROMACS format. I am assuming that this is probably an easier option, I just don’t know how to include the data.

[https://www.dropbox.com/scl/fi/dvw98s1r0k1m12zjzqqdv/jz4\_fix\_gromacs.zip?rlkey=s6dkj3c5e5j2vm48k4vqa0exw&dl=0](https://www.dropbox.com/scl/fi/dvw98s1r0k1m12zjzqqdv/jz4_fix_gromacs.zip?rlkey=s6dkj3c5e5j2vm48k4vqa0exw&dl=0)  
(Link to the download compressed file)

They provide a folder charmm36.ff that contains 2 new files (maybe more?) “jz4.rtp” and “jz4\_ffbonded.itp” (this last one contains only one line of values). There’s also 2 other files: “jz4\_fix\_gmx.pdb” and “jz4\_fix\_gmx.top”.

From the .pdb I’ve managed to get the .gro with:  
gmx editconf -f jz4\_fix\_gmx.pdb -o jz4.gro

I know this is good, because it lines up with the information on the tutorials page.

There’s 2 more things that are missing however, the .itp and the .prm files. I know that the .itp is the topology and I have a .top file, but that`s not working if I just include it like that (the ligand won’t show up after I add the box, also it gives me a warning of “WARNING: Bad box in file complex.gro”) and the other 2 files from the charmm36.ff folder must be the parameter files, but again, just including them doesn’t work.

There is probably a better, maybe even easier way of doing this.

---

<div class="post-metadata">

**Author:** ![Chongee](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@Chongee](https://gromacs.bioexcel.eu/u/Chongee)\
**Post date:** [March 20, 2025, 8:35am UTC](https://gromacs.bioexcel.eu/t/how-to-use-the-charmm36-force-field-parameters-from-cgenff-for-ligand/11057/3 "2025-03-20T08:35:58Z")

</div>

Update:  
I’ve managed to install in a conda environment (python3) numpy and the required networkx version for cgenff\_charmm2gmx\_py3\_nx2.py  
It still gave me an error, but it was easier to fix this than to get the python2 version or networkx.1.11 version working.  
My error was related to not being able to deal with some special characters, which I’ve solved by adding 'encoding=“utf-8” ’ to every open file function.  
I’ve thought this might help someone with the same issue.

I am still interested in using the website generated parameters directly if possible.

---

<div class="post-metadata">

**Author:** ![Marius](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Marius](https://gromacs.bioexcel.eu/u/Marius)\
**Post date:** [March 24, 2025, 9:48pm UTC](https://gromacs.bioexcel.eu/t/how-to-use-the-charmm36-force-field-parameters-from-cgenff-for-ligand/11057/4 "2025-03-24T21:48:32Z")

</div>

Hi,  
If you just want to use the topology of your ligand for an already existing structure (i.e., no need to run pdb2gmx on the ligand or the protein-ligand complex), you could proceed the following:

1. Remove the **[system]** and the **[molecules]** directive from **jz4\_fix\_gmx.top**
2. Remove all **#include** statements, except the positions restraints if required
3. Re-name **jz4\_fix\_gmx.top** to **jz4\_fix\_gmx.itp**
4. Include **jz4\_fix\_gmx.itp** into your protein-ligand-solvent **.top** file
5. Include **jz4\_ffbonded.itp** into your protein-ligand-solvent **.top** file (this should be your **.prm** file)

I am assuming here that you use a **.top** file in which you include all important force field files (e.g., forcefield.itp) and list all molecules under **[molecules]**.

Hope that could help you!  
Best,  
Marius
