dptech-corp / Uni-GBSA

An automatic workflow to perform MM/GB(PB)SA calculations from force field building, and structure optimization to free energy calculation.
Apache License 2.0
82 stars 20 forks source link

ERROR - Ligand file only accept C N O S P H F Cl Br I, please check your input #52

Closed krinoz closed 1 month ago

krinoz commented 1 month ago

Hello,

Frist of all, thanks for your work! As I tried to reproduce your results of the paper 'Uni-GBSA: an open-source and web-based automatic workflow to perform MM/GB(PB)SA calculations for virtual screening' for PDBbind 2020 refined set, with the default parameter setting (solvation mode: GB-OBC1, protein force field: AMBER03, ligand force field: GAFF, ligand charge method: AM1-BCC, dielectric constant: 4.0)), it shows error for most of the ligands when building their topology:

unigbsa-pipeline -i "/4wkt/4wkt_protein_r.pdb" -l "/4wkt/4wkt_ligand.sdf" -validate -o "4wkt.csv"

07/16/2024` 10:45:46 AM - INFO - Build protein topology.

07/16/2024` 10:45:51 AM - ERROR - Ligand file only accept C N O S P H F Cl Br I, please check your input /4wkt/4wkt_ligand.mol2.

Can I ask how do you do this experiment when you are doing the manuscript? Thanks

krinoz commented 1 month ago

By the way, if I removed '--validate' there are mostly two types error in ligand forcefield generation. Namely Directory not empty: 'MOL.acpype' and Exception: ERROR run the acpype.

07/16/2024 16:33:45 PM - INFO - Build protein topology. 07/16/2024 16:34:00 PM - INFO - Build ligand topology: 5z5f_ligand Traceback (most recent call last): File "/rds/general/user/kl1623/home/miniconda3/envs/gbsa/lib/python3.9/site-packages/unigbsa/pipeline.py", line 139, in single build_topol(receptor, ligandfile, outpdb=grofile, outtop=topfile, File "/rds/general/user/kl1623/home/miniconda3/envs/gbsa/lib/python3.9/site-packages/unigbsa/simulation/topology.py", line 219, in build_topol moltop, molgro = build_lignad(ligand, forcefield=ligandforce, charge_method=charge_method, nt=nt, verbose=verbose) File "/rds/general/user/kl1623/home/miniconda3/envs/gbsa/lib/python3.9/site-packages/unigbsa/simulation/topology.py", line 81, in build_lignad shutil.rmtree(ligandName) File "/rds/general/user/kl1623/home/miniconda3/envs/gbsa/lib/python3.9/shutil.py", line 734, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/rds/general/user/kl1623/home/miniconda3/envs/gbsa/lib/python3.9/shutil.py", line 673, in _rmtree_safe_fd onerror(os.rmdir, fullname, sys.exc_info()) File "/rds/general/user/kl1623/home/miniconda3/envs/gbsa/lib/python3.9/shutil.py", line 671, in _rmtree_safe_fd os.rmdir(entry.name, dir_fd=topfd) OSError: [Errno 39] Directory not empty: 'MOL.acpype' 07/16/2024 16:34:01 PM - WARNING - Failed to generate forcefield for ligand: 5z5f_ligand 07/16/2024 16:34:02 PM - INFO - Build protein topology. 07/16/2024 16:34:06 PM - INFO - Build ligand topology: 5m9w_ligand Traceback (most recent call last): File "/rds/general/user/kl1623/home/miniconda3/envs/gbsa/lib/python3.9/site-packages/unigbsa/pipeline.py", line 139, in single build_topol(receptor, ligandfile, outpdb=grofile, outtop=topfile, File "/rds/general/user/kl1623/home/miniconda3/envs/gbsa/lib/python3.9/site-packages/unigbsa/simulation/topology.py", line 219, in build_topol moltop, molgro = build_lignad(ligand, forcefield=ligandforce, charge_method=charge_method, nt=nt, verbose=verbose) File "/rds/general/user/kl1623/home/miniconda3/envs/gbsa/lib/python3.9/site-packages/unigbsa/simulation/topology.py", line 68, in build_lignad raise Exception('ERROR run the acpype. see the %s for details.'%os.path.abspath("acpype.log")) Exception: ERROR run the acpype. see the /rds/general/user/kl1623/home/Benchmarks/Uni-GBSA/5m9w_ligand/5m9w_ligand.TOP/acpype.log for details. 07/16/2024 16:34:07 PM - WARNING - Failed to generate forcefield for ligand: 5m9w_ligand 07/16/2024 16:34:08 PM - INFO - Build protein topology. 07/16/2024 16:34:13 PM - INFO - Build ligand topology: 4ddk_ligand 07/16/2024 16:34:18 PM - INFO - Running energy minimization: 4ddk_ligand /bin/sh: line 3: warning: here-document at line 0 delimited by end-of-file (wanted `EOF')

Can I ask what kinds of pre-processing protocol did you used for ligands?

Jnelen commented 1 month ago

Hi there,

I think I know what could be going on In your 4wkt example, it won't work because the ligand contains Boron, which is not supported by the force-field. As such, there is no easy way to get it working. For other ligands, I would suggest making sure they have explicit hydrogens. I once tried it with ligands without explicit hydrogens, and the topology building also failed. If there are no explicit hydrogens, try to add them (you can use RDKit or Open Babel for this), and try again. Hopefully that can help you!

Kind regards, Jochem

krinoz commented 1 month ago

Hi there,

I think I know what could be going on In your 4wkt example, it won't work because the ligand contains Boron, which is not supported by the force-field. As such, there is no easy way to get it working. For other ligands, I would suggest making sure they have explicit hydrogens. I once tried it with ligands without explicit hydrogens, and the topology building also failed. If there are no explicit hydrogens, try to add them (you can use RDKit or Open Babel for this), and try again. Hopefully that can help you!

Kind regards, Jochem

Hi Jochem,

Many Thanks! This helps me a lot. Just wondering if you don't mind one more question about the parameters for MM/PBSA in the original paper, are them all included in the default.ini files that you provided?

Thanks again. Best, Krinos

Jnelen commented 1 month ago

Hi there, I think I know what could be going on In your 4wkt example, it won't work because the ligand contains Boron, which is not supported by the force-field. As such, there is no easy way to get it working. For other ligands, I would suggest making sure they have explicit hydrogens. I once tried it with ligands without explicit hydrogens, and the topology building also failed. If there are no explicit hydrogens, try to add them (you can use RDKit or Open Babel for this), and try again. Hopefully that can help you! Kind regards, Jochem

Hi Jochem,

Many Thanks! This helps me a lot. Just wondering if you don't mind one more question about the parameters for MM/PBSA in the original paper, are them all included in the default.ini files that you provided?

Thanks again. Best, Krinos

Hi Krinos,

Happy to help! As far as I can tell, the default.ini does contains the settings that were found to work best in previous work (Wang, Ercheng, et al. Chemical reviews 119.16 (2019): 9478-9508.). However, it is possible to customize these settings. If you have a dataset, you can even try to finetune the parameters using unigbsa-scan.

Kind regards, Jochem

krinoz commented 1 month ago

Hi there, I think I know what could be going on In your 4wkt example, it won't work because the ligand contains Boron, which is not supported by the force-field. As such, there is no easy way to get it working. For other ligands, I would suggest making sure they have explicit hydrogens. I once tried it with ligands without explicit hydrogens, and the topology building also failed. If there are no explicit hydrogens, try to add them (you can use RDKit or Open Babel for this), and try again. Hopefully that can help you! Kind regards, Jochem

Hi Jochem, Many Thanks! This helps me a lot. Just wondering if you don't mind one more question about the parameters for MM/PBSA in the original paper, are them all included in the default.ini files that you provided? Thanks again. Best, Krinos

Hi Krinos,

Happy to help! As far as I can tell, the default.ini does contains the settings that were found to work best in previous work (Wang, Ercheng, et al. Chemical reviews 119.16 (2019): 9478-9508.). However, it is possible to customize these settings. If you have a dataset, you can even try to finetune the parameters using unigbsa-scan.

Kind regards, Jochem

Hi Jochem,

Many thanks for the information, this really helps me a lot. I think I can close this issue.

Best, Krinos