rdkit-scripts
rdkit-scripts copied to clipboard
How to test the vina_dock.py program
I am trying to run : python vina_dock.py -i smiles.smi --no_protonation -o/ --output output.txt
Traceback (most recent call last):
File "/home/ubuntu/Desktop/rdkit-scripts/vina_dock.py", line 473, in
Could you please help me resolve it or do I have to give more information while running it ?
Thanks in advance, Navya
Dear Navya, could you please show the full path of the command line you used to run vina_dock.py ?
Hi,
I am trying to run the command : python vina_dock.py -i smiles.smi --no_protonation -o/ --output output.txt Terminal is in the same folder as rdkit-scripts.
Hi,
please run command: python vina_dock.py -i smiles.smi --no_protonation -o output.db You may need to check the existing database, remove it before starting.
Hi GuzelMinibaeva,
Thank you for your response.
I am still facing this error after deleting the existing database.
~/Desktop/rdkit-scripts$ python vina_dock.py -i AXL_smiles.smi --no_protonation -o output.db
Traceback (most recent call last):
File "/home/ubuntu/Desktop/rdkit-scripts/vina_dock.py", line 473, in
Am I missing a pdbqt file ? Please help me with this.
Thank you, Navya
Hi Navya,
for the first run you should use -p with a path for your pdbqt file and -s with a path for your setup file with grid box coordinates, these command line arguments are necessary for docking. Example: python vina_dock.py -i AXL_smiles.smi --no_protonation -o output.db -p protein.pdbqt -s setup.txt
If docking stops for any reason and you want to continue calculation, you may call the same command once more and docking will continue from the last checkpoint. Please note, you may omit arguments: -p, -s, -i, --no_protonation
in the repeated call, because the corresponding data is already saved in the database and will be read from there automatically.
Protein and setup files can be prepared in a standard way.
Example of a file with grid box coordinates:
size_x = 22.50
size_y = 22.50
size_z = 22.50
center_x = -18.77
center_y = -10.06
center_z = 8.12
Kind regards, Guzel
Hi @GuzelMinibaeva, I am getting the same error. It seems that database isn't being created at first run.
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/content/rdkit-scripts/vina_dock.py", line 473, in <module>
main()
File "/content/rdkit-scripts/vina_dock.py", line 453, in main
add_protonation(args.output)
File "/content/rdkit-scripts/vina_dock.py", line 54, in add_protonation
protonate, done = list(cur.execute('SELECT protonation, protonation_done FROM setup'))[0]
sqlite3.OperationalError: no such table: setup
The command I am trying to execute:
!python -m vina_dock \
-i <ligand file name>.sdf \
-o output.db \
-s <receptor box coordinates file name>.txt \
-p <receptor file name>.pdbqt \
--no_protonation \
-c 4 \
-v
If I solve this issue then I promise that i will send PR.
Hi, @AnzorGozalishvili, could you attach your input files to reproduce this behavior? It seems like a simple issue.
It worked locally on my laptop. I amn't able to run it in Google Colab. This is the issue, probably.
Hi @DrrDom There was some issue related to creating DB. I run this in advance to manually create db.
from vina_dock import create_db
import sqlite3
def test_create_db():
if os.path.isfile("output.db"):
os.remove("output.db")
create_db(
db_fname="output.db",
input_fname="/content/CHEMBL218068.sdf",
protonation=False,
pdbqt_fname="/content/cp2c9_1r9o_DUDE_2_0A.pdbqt",
protein_setup_fname="/content/cp2c9_1r9o_receptor_vina_box.txt",
prefix=None
)
conn = sqlite3.connect("output.db")
assert conn.execute('select * from mols')
assert conn.execute('select * from setup')
test_create_db()
protonation is set to False since I didn't have an license for cxcalc
Here is the command I was running
!python -m vina_dock \
-i /content/CHEMBL218068.sdf \
-o output.db \
-s /content/cp2c9_1r9o_receptor_vina_box.txt \
-p /content/cp2c9_1r9o_DUDE_2_0A.pdbqt \
--no_protonation \
-c=4 \
-v