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

How to test the vina_dock.py program #18

Open
NavyaR13 opened this issue Apr 22, 2022 · 9 comments
Open

How to test the vina_dock.py program #18

NavyaR13 opened this issue Apr 22, 2022 · 9 comments

Comments

@NavyaR13
Copy link

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
main()
File "/home/ubuntu/Desktop/rdkit-scripts/vina_dock.py", line 453, in main
add_protonation(args.output)
File "/home/ubuntu/Desktop/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

Could you please help me resolve it or do I have to give more information while running it ?

Thanks in advance,
Navya

@GuzelMinibaeva
Copy link
Contributor

GuzelMinibaeva commented Apr 24, 2022

Dear Navya,
could you please show the full path of the command line you used to run vina_dock.py ?

@NavyaR13
Copy link
Author

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.

@GuzelMinibaeva
Copy link
Contributor

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.

@NavyaR13
Copy link
Author

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
main()
File "/home/ubuntu/Desktop/rdkit-scripts/vina_dock.py", line 451, in main
create_db(args.output, args.input, not args.no_protonation, args.protein, args.protein_setup, args.prefix)
File "/home/ubuntu/Desktop/rdkit-scripts/vina_dock.py", line 356, in create_db
pdbqt_string = open(pdbqt_fname).read()
TypeError: expected str, bytes or os.PathLike object, not NoneType

Am I missing a pdbqt file ? Please help me with this.

Thank you,
Navya

@GuzelMinibaeva
Copy link
Contributor

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

@AnzorGozalishvili
Copy link

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.

@DrrDom
Copy link
Owner

DrrDom commented Jun 9, 2022

Hi, @AnzorGozalishvili, could you attach your input files to reproduce this behavior? It seems like a simple issue.

@AnzorGozalishvili
Copy link

It worked locally on my laptop. I amn't able to run it in Google Colab. This is the issue, probably.

@AnzorGozalishvili
Copy link

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

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

4 participants