Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Covalent Docking Broken #261

Closed
gorrie06 opened this issue Dec 28, 2023 · 7 comments
Closed

Covalent Docking Broken #261

gorrie06 opened this issue Dec 28, 2023 · 7 comments

Comments

@gorrie06
Copy link

Environment Information

Open Babel version: 3.1.0
Operating system and version: windows 11 running ubuntu in WSL running Anaconda3

Expected Behavior

I am running the script prepareCovalent.py to prepare a ligand for covalent docking in AutoDock Vina. I have tried with my own files and the tutorial files provided. The script imports pybel.py, when it attempts to perform _formatstodict it crashes. Instead of the expected output of a .pdb file with the ligand properly oriented in 3D space for covalent docking I get an error message.

Actual Behavior

This is the error message I get:

(vina) gorrie06@DMGLaptop:~/docking/covalent$ python ~/docking/covalent/adcovalent/prepareCovalent.py --ligand /3upo_test/ligand.mol2 --ligindices 1,2 --receptor /3upo_test/3upo_protein.pdb --residue B:SER222 --outputfile ligcov.pdb
Traceback (most recent call last):
File "/home/gorrie06/docking/covalent/adcovalent/prepareCovalent.py", line 36, in
import pybel
File "/home/gorrie06/anaconda3/envs/vina/lib/python2.7/site-packages/pybel.py", line 89, in
informats = _formatstodict(_obconv.GetSupportedInputFormat())
File "/home/gorrie06/anaconda3/envs/vina/lib/python2.7/site-packages/pybel.py", line 68, in _formatstodict
broken = [(x, y.strip()) for x, y in broken]
ValueError: need more than 1 value to unpack

Steps to Reproduce

This file contains the prepareCovalent.py script and the tutorial files for covalent docking
adCovalentDockResidue_v1.2.tar.gz
This is the prepareCovalent script
prepareCovalent.txt
This file contains pybel.py
original-pybel.txt
If you run the prepareCovalent script with the following inputs:

python ~/local/adcovalent/prepareCovalent.py --ligand ligand.mol2
--ligindices 1,2
--receptor 3upo_protein.pdb
--residue B:SER222
--outputfile ligcovalent.pdb

you get the error message

@rwxayheee
Copy link

Hi @gorrie06

I don't think we can use this to prepare covalent docking with vina 1.2.x at the moment. But this should at least work for autodock4 as in the tutorial (README from https://autodock.scripps.edu/resources/covalent-docking/).

The problem with import pybel might have something to do with openbabel version or your operating system. prepareCovalent.py expects openbabel 2.x. The usage of modules has changed slightly:
https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html#python-module

For the covalent docking tutorial with autodock4, you can try running prepareCovalent.py with $MGLROOT/bin/pythonsh which has openbabel 2.4.1.

Consider other ways to do covalent/reactive docking with the AutoDock programs:
Docking a Covalently Bound Ligand with ADFR
https://ccsb.scripps.edu/adfr/tutorial-covalent/
Reactive Docking with AD-GPU, which might need ligand preparation with Meeko
https://github.com/forlilab/Meeko?tab=readme-ov-file#reactive-docking

If you prefer openbabel 3.0, try changing the way you import python modules and keep an eye on other necessary updates/behavior changes. I'm also watching openbabel and saw you posted there

@diogomart
Copy link
Member

See also: https://github.com/forlilab/Meeko?tab=readme-ov-file#docking-covalent-ligands-as-flexible-sidechains

@gorrie06
Copy link
Author

Great! Thank you

@gorrie06
Copy link
Author

So the docking covalent ligands as flexible side chains requires Prody which is unavailable. The help file warns you about this. If you try to run with correct inputs you get an error that Prody is required and unavailable.

The ADFR tutorial doesn't make sense, the example shows the covalent bond as being between the alpha and beta carbon. This is pointless, the covalent bond should be between the ligand and the receptor, not between two carbons on a sidechain. Secondly, it seems to require that you have ligand atoms modeled into your receptor structure, although this is not totally clear because of what I said previously.

I'm now going to attempt to perform covalent docking with AD-GPU and update here. It may not be currently possible to covalently dock using this software suite.

@rwxayheee
Copy link

Hi @gorrie06
The ADFR tutorial doesn't make sense, the example shows the covalent bond as being between the alpha and beta carbon. This is pointless, the covalent bond should be between the ligand and the receptor, not between two carbons on a sidechain.
Actually you can choose where to place the covalent bond. Placing it near CA allows additional flexibility of the residue sidechains in docking.
Secondly, it seems to require that you have ligand atoms modeled into your receptor structure
The receptor has to contain the covalent bond atoms but should not include the ligand.
This repository is not really for ADFR. But if it's something you would be interested in using (considering the method, scoring function, etc.) feel free to reach out or post on the list server to connect with other users :)

@diogomart
Copy link
Member

You could install Prody

@diogomart
Copy link
Member

Added the following to Meeko's README

Prody is required for preparing ligands as flexible sidechains. Often, pip install prody suffices to install Prody in the currently active virtual environment (e.g., conda). For more detailed installation instructions visit http://prody.csb.pitt.edu/downloads/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants