I am running MD simulation for complex molecule from docking, while running python script following error occurred, can anyone please help me ? I have pasted the error message after running the python command. I am using Python 2.7.18 networkx=1.11.
Blockquote
(myenv) ws@ws2:~/simulation_n$ python cgenff_charmm2gmx.py MET ligand_fixed.mol2 MET.str charmm36-jul2022.ff/
NOTE1: Code tested with python 2.7.3. Your version: 2.7.18 (default, Jul 1 2022, 10:30:50)
[GCC 11.2.0]
NOTE2: Please be sure to use the same version of CGenFF in your simulations that was used during parameter generation:
–Version of CGenFF detected in MET.str : 4.6
–Version of CGenFF detected in charmm36-jul2022.ff//forcefield.doc : 4.6
NOTE3: In order to avoid duplicated parameters, do NOT select the ‘Include parameters that are already in CGenFF’ option when uploading a molecule into CGenFF.
Traceback (most recent call last):
File “cgenff_charmm2gmx.py”, line 797, in
m = atomgroup()
File “cgenff_charmm2gmx.py”, line 484, in init
self.G = nx.Graph()
NameError: global name ‘nx’ is not defined
I am sending you the python script as well as as ligand_fixed.mol2 and ELA.str file which I am trying to use for the command:
python cgenff_charmm2gmx_py3_nx2.py ELA ligand_fixed_mol2 ELA.str charm36-july2023.ff
I have python 3.11.4, numpy 1.25.0 and networkx 2.8 installed on ubuntu.
Regards,
Sunil
(Attachment ELA.str is missing)
(Attachment ligand_fixed.mol2 is missing)
(Attachment cgenff_charmm2gmx_py3_nx2.py is missing)
I tried using these files and an environment with python 3.7.3, networkx 2.3 and numpy 1.21.6 and it seems to work for me (numpy version probably doesn’t matter as much), could you give that a try?
Thank you so much, I created an environment (networkx) at conda and there installed Python3.7.3 and networkx=2.3 as suggested by you and the python script WORKED.