Valdes-Tresanco-MS / gmx_MMPBSA

gmx_MMPBSA is a new tool based on AMBER's MMPBSA.py aiming to perform end-state free energy calculations with GROMACS files.
https://valdes-tresanco-ms.github.io/gmx_MMPBSA/
GNU General Public License v3.0
229 stars 66 forks source link

[Question]: TypeError in res2map When Running Protein-Ligand Binding Free Energy Calculations #504

Closed huaiaee closed 5 months ago

huaiaee commented 6 months ago

My Question is...

I am currently facing an issue while attempting to run protein-ligand binding free energy calculations embedded in a membrane using CHARMM force field files via the gmx_MMPBSA tool. The process fails during the topology building phase, and I receive a TypeError related to string indices. Below is the error log and details about the issue:

huaiaee commented 6 months ago

[INFO ] Normal Ligand: Saving group MainChain (5) in _GMXMMPBSA_COM_index.ndx file as _GMXMMPBSA_LIG.pdb File "/root/miniconda3/envs/gmxMMPBSA/bin/gmx_MMPBSA", line 8, in sys.exit(gmxmmpbsa()) File "/root/miniconda3/envs/gmxMMPBSA/lib/python3.10/site-packages/GMXMMPBSA/app.py", line 98, in gmxmmpbsa app.make_prmtops() File "/root/miniconda3/envs/gmxMMPBSA/lib/python3.10/site-packages/GMXMMPBSA/main.py", line 681, in make_prmtops self.FILES.mutant_receptor_prmtop, self.FILES.mutant_ligand_prmtop) = maketop.buildTopology() File "/root/miniconda3/envs/gmxMMPBSA/lib/python3.10/site-packages/GMXMMPBSA/make_top.py", line 122, in buildTopology self.gmx2pdb() File "/root/miniconda3/envs/gmxMMPBSA/lib/python3.10/site-packages/GMXMMPBSA/make_top.py", line 523, in gmx2pdb self.resi, self.resl, self.orderl = res2map(self.indexes, self.complex_str) File "/root/miniconda3/envs/gmxMMPBSA/lib/python3.10/site-packages/GMXMMPBSA/utils.py", line 600, in res2map for e in value['num']: TypeError: string indices must be integers Exiting. All files have been retained. Could you please help identify what might be causing this issue? Is there a specific format or data type that value['num'] is supposed to adhere to which I might be overlooking?

Thank you for your help and for maintaining this valuable tool!

marioernestovaldes commented 6 months ago

are you selecting the proper index groups to perform the calculations? please, attach the gmxMMPBSA.log file

huaiaee commented 6 months ago

gmx_MMPBSA.log

marioernestovaldes commented 6 months ago

Exactly, you are selecting groups 6 and 5 "-cg 6 5" when it should be 1 and 13 (Protein and ligand)

huaiaee commented 6 months ago

Thank you so much,I will try again

huaiaee commented 6 months ago

gmx_MMPBSA.log Unfortunately, I encountered a new error during the re-run process, as follows: The LP pseudo-atom is not supported. Please remove them following these instructions: https://valdes-tresanco-ms.github.io/gmx_MMPBSA/dev/examples/Protein_ligand_LPH_atoms_CHARMMff

Check the gmx_MMPBSA.log file to report the problem. File "/root/miniconda3/envs/gmxMMPBSA/bin/gmx_MMPBSA", line 8, in sys.exit(gmxmmpbsa()) File "/root/miniconda3/envs/gmxMMPBSA/lib/python3.10/site-packages/GMXMMPBSA/app.py", line 98, in gmxmmpbsa app.make_prmtops() File "/root/miniconda3/envs/gmxMMPBSA/lib/python3.10/site-packages/GMXMMPBSA/main.py", line 681, in make_prmtops self.FILES.mutant_receptor_prmtop, self.FILES.mutant_ligand_prmtop) = maketop.buildTopology() File "/root/miniconda3/envs/gmxMMPBSA/lib/python3.10/site-packages/GMXMMPBSA/make_top.py", line 122, in buildTopology self.gmx2pdb() File "/root/miniconda3/envs/gmxMMPBSA/lib/python3.10/site-packages/GMXMMPBSA/make_top.py", line 524, in gmx2pdb self.check_structures(self.complex_str, self.receptor_str, self.ligand_str) File "/root/miniconda3/envs/gmxMMPBSA/lib/python3.10/site-packages/GMXMMPBSA/make_top.py", line 1390, in check_structures check_str(com_str) File "/root/miniconda3/envs/gmxMMPBSA/lib/python3.10/site-packages/GMXMMPBSA/utils.py", line 512, in check_str GMXMMPBSA_ERROR('The LP pseudo-atom is not supported. Please remove them following these instructions: ' File "/root/miniconda3/envs/gmxMMPBSA/lib/python3.10/site-packages/GMXMMPBSA/exceptions.py", line 171, in init raise exc('\n\n' + msg + '\n\nCheck the gmx_MMPBSA.log file to report the problem.') MMPBSA_Error:

The LP pseudo-atom is not supported. Please remove them following these instructions: https://valdes-tresanco-ms.github.io/gmx_MMPBSA/dev/examples/Protein_ligand_LPH_atoms_CHARMMff

This is my log file; please help me with this.

marioernestovaldes commented 6 months ago

follow the tutorial: https://valdes-tresanco-ms.github.io/gmx_MMPBSA/dev/examples/Protein_ligand_LPH_atoms_CHARMMff