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

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:

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
(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.

Edit: Update

Nevermind, just importing networkx gives this error, even though conda claims that it is installed and it is version 1.11.

(conda list

networkx 1.11 py27_1 anaconda
…)

I’m desperate at this point.

Edit finished.


I’ve finally managed to get a python 2.7.18 Anaconda up and running with the Networkx1.11. I know that the tested python version was 2.7.3 and 2.7.12 but conda simply won’t let me create an environment with those versions or anything in between.

This is what I was running:

python cgenff_charmm2gmx.py JZ4 jz4_fix.mol2 jz4.str charmm36-jul2022.ff

The error message is:

Traceback (most recent call last):
File “cgenff_charmm2gmx_py2.py”, line 51, in
import networkx as nx
File “/home/chongee/anaconda3/envs/p2/lib/python2.7/site-packages/networkx/init.py”, line 68, in
import networkx.utils
File “/home/chongee/anaconda3/envs/p2/lib/python2.7/site-packages/networkx/utils/init.py”, line 2, in
from networkx.utils.decorators import *
File “/home/chongee/anaconda3/envs/p2/lib/python2.7/site-packages/networkx/utils/decorators.py”, line 7, in
from decorator import decorator
File “/home/chongee/anaconda3/envs/p2/lib/python2.7/site-packages/decorator.py”, line 162
print(‘Error in generated code:’, file=sys.stderr)

This is if I am using the jz4.str that is given by Justin in the tutorial.
If I try to run the one I’ve got from the website (cgenff) or with the .mol2 file they gave, or any combination of these gives the same error.

Any help is greatly appreciated