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

Output file not containing structures #312

Closed
benrshep-iu opened this issue Jan 20, 2025 · 14 comments
Closed

Output file not containing structures #312

benrshep-iu opened this issue Jan 20, 2025 · 14 comments

Comments

@benrshep-iu
Copy link

I am trying to prepare a receptor file for docking.

Here is the script I ran and the resulting output:
(AutoDock_Sync) C:\Users\bensh\Documents\autodock-vina_build_environment>mk_prepare_receptor.py --pdb 3l61.pdb -o 3l61.pdbqt --box_size 65 39 57 --box_c
enter 3 27 12

Files written:
3l61.pdbqt <-- static (i.e., rigid) receptor input file
boron-silicon-atom_par.dat <-- atomic parameters for B and Si (for autogrid)
3l61.gpf <-- autogrid input file
3l61.gpf.pdb <-- PDB file to visualize the grid box

In the command prompt it appeared to run correctly, but the input file had a size of 334kb and all of the output files have a reported size of 0kb and when attempting to view the .pdbqt file in chimera, chimera could not find structures in the file data. Opening the .pdbqt in notepad dislpalys nothing. Am I forgetting something in the command line?

@rwxayheee
Copy link
Contributor

Hi @benrshep-iu

Could you please share the input fille, and all outputs (if any of them was not empty)? It would be greatly helpful to have the files so that we could reproduce and track down the issue.
Just to confirm: You were using Meeko in Windows Powershell, is that correct?

Thanks,

@benrshep-iu
Copy link
Author

benrshep-iu commented Jan 20, 2025 via email

@rwxayheee
Copy link
Contributor

rwxayheee commented Jan 20, 2025

It also seems like you were not using the most up-to-date version. There has been a syntax change since version 0.6. Would you be able to download the latest version of Meeko? Many issues have been fixed, including the one you mentioned (rdkit.six)

Please refer to basic usage with new syntax: https://rwxmeeko.readthedocs.io/en/latest/cli_rec_prep.html

If you are able to install the develop branch from this repository, there's a potentially important fix for Windows (#266) that currently exists in the develop version but not the release. Therefore, I recommend the develop version.

@rwxayheee
Copy link
Contributor

Note that we're unable to receive attachments from email. It would be greatly appreciated if you could upload the files in GitHub, here for the issue you opened: #312

Feel free to reach out if we can be of any further assistance.

@benrshep-iu
Copy link
Author

Hi,

I reinstalled Meeko to ensure I have the latest release. I attempted to run the script again and no files were generated at all this time.

(AutoDock_Sync) C:\Users\bensh\Documents\autodock-vina_build_environment>mk_
prepare_receptor.py -i 3l61.pdb --write_pdbqt 3l61.pdbqt
Unable to create process using '/bin/sh "C:\Users\bensh\anaconda3\envs\AutoDock_Sync\Scripts\mk_prepare_receptor.py" -i 3l61.pdb --write_pdbqt 3l61.pdbqt'

Github will not allow me to attach PDB files here. This is the source link of my file: https://www.rcsb.org/structure/3L61

@rwxayheee
Copy link
Contributor

Hi @benrshep-iu

Thanks for the prompt retry! I don't have a Windows device to test at the moment, but I will try to reproduce that later today. One minor concern I have is that mk_prepare_receptor.py is a python script, and it might not work using sh to run, as indicated by the error message.

Would it work if you do something like python mk_prepare_receptor.py? I can't recall if this is the exact working syntax in Windows CMD or PowerShell.

@benrshep-iu
Copy link
Author

I had forgotten a step when reinstalling Meeko, it should be correctly installed now and the new output is this:
(AutoDock_Sync) C:\Users\bensh\Documents\autodock-vina_build_environment>mk_prepare_receptor.py -i 3l61.pdb --write_pdbqt 3l61.pdbqt
usage: mk_prepare_receptor.py [-h] [--pdb PDB] [--pdbqt PDBQT] -o
OUTPUT_FILENAME [-f FLEXRES]
[-r REACTIVE_FLEXRES] [-g REACTIVE_NAME]
[-s REACTIVE_NAME_SPECIFIC]
[--box_size BOX_SIZE BOX_SIZE BOX_SIZE]
[--box_center BOX_CENTER BOX_CENTER BOX_CENTER]
[--box_center_on_reactive_res]
[--ligand LIGAND] [--padding PADDING]
[--skip_gpf] [--r_eq_12 R_EQ_12]
[--eps_12 EPS_12]
[--r_eq_13_scaling R_EQ_13_SCALING]
[--r_eq_14_scaling R_EQ_14_SCALING]

options:
-h, --help show this help message and exit
--pdb PDB input can be PDBQT but charges and types will be
reassigned
--pdbqt PDBQT keeps existing charges and types
-o OUTPUT_FILENAME, --output_filename OUTPUT_FILENAME
adds _rigid/_flex with flexible residues. Always
suffixes .pdbqt.
-f FLEXRES, --flexres FLEXRES
repeat flag for each residue, e.g: -f " :LYS:42"
-f "B:TYR:23" and keep space for empty chain
-r REACTIVE_FLEXRES, --reactive_flexres REACTIVE_FLEXRES
same as --flexres but for reactive residues (max
8)
-g REACTIVE_NAME, --reactive_name REACTIVE_NAME
set name of reactive atom of a residue type, e.g:
-g 'TRP:NE1'. Overridden by
--reactive_name_specific
-s REACTIVE_NAME_SPECIFIC, --reactive_name_specific REACTIVE_NAME_SPECIFIC
set name of reactive atom for an individual
residue, e.g: -s 'A:HIE:42:NE2'. Residue will be
reactive.
--box_size BOX_SIZE BOX_SIZE BOX_SIZE
size of grid box (x, y, z) in Angstrom
--box_center BOX_CENTER BOX_CENTER BOX_CENTER
center of grid box (x, y, z) in Angstrom
--box_center_on_reactive_res
project center of grid box along CA-CB bond 5 A
away from CB
--ligand LIGAND PDBQT of reference ligand
--padding PADDING padding around reference ligand [A]
--skip_gpf do not write a GPF file for autogrid
--r_eq_12 R_EQ_12 r_eq for reactive atoms (1-2 interaction)
--eps_12 EPS_12 epsilon for reactive atoms (1-2 interaction)
--r_eq_13_scaling R_EQ_13_SCALING
r_eq scaling for 1-3 interaction across reactive
atoms
--r_eq_14_scaling R_EQ_14_SCALING
r_eq scaling for 1-4 interaction across reactive
atoms

mk_prepare_receptor.py: error: the following arguments are required: -o/--output_filename

I went back to my original line which included parameters for the box, and the issue with the output file being empty is still persisting

@rwxayheee
Copy link
Contributor

mk_prepare_receptor.py: error: the following arguments are required: -o/--output_filename

Were you able to resolve this error?

Could you try the following instead?

(AutoDock_Sync) C:\Users\bensh\Documents\autodock-vina_build_environment>mk_prepare_receptor.py -i 3l61.pdb -o 3l61 -p

Also could you please confirm for me, that you were running it in Windows CMD (in the Windows Command Prompt, cmd.exe)?

@benrshep-iu
Copy link
Author

I believe i am running it in windows command prompt. I opened it through the Anaconda navigator, I do not know if that makes a difference.
I just tried the line you provided and recieved this error on the output:
error: unrecognized arguments: -i 3l61.pdb -p

I can replace -i with --pdb and it accepts that statement, but -p is still listed as an unrecognized argument

@rwxayheee
Copy link
Contributor

Hi @benrshep-iu
Could you please do a quick check for me, what's the version of Meeko you currently installed?
You can do it in different ways. One way is to start Python interactively, and type the following two lines:

import meeko
meeko.__version__

The expected output for the latest version is:

'0.6.1'

Thanks again for checking

@benrshep-iu
Copy link
Author

I must be installing meeko incorrectly i guess?
I used import meeko and this was the output:
(AutoDock_Sync) C:\Users\bensh\Documents\autodock-vina_build_environment>python
Python 3.8.20 (default, Oct 3 2024, 15:19:54) [MSC v.1929 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.

import meeko
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\bensh\anaconda3\envs\AutoDock_Sync\lib\site-packages\meeko_init_.py", line 16, in
from .preparation import MoleculePreparation
File "C:\Users\bensh\anaconda3\envs\AutoDock_Sync\lib\site-packages\meeko\preparation.py", line 15, in
import meeko.macrocycle
File "C:\Users\bensh\anaconda3\envs\AutoDock_Sync\lib\site-packages\meeko\macrocycle.py", line 10, in
from .molsetup import Bond
File "C:\Users\bensh\anaconda3\envs\AutoDock_Sync\lib\site-packages\meeko\molsetup.py", line 24, in
from .utils.jsonutils import rdkit_mol_from_json, tuple_to_string, string_to_tuple
File "C:\Users\bensh\anaconda3\envs\AutoDock_Sync\lib\site-packages\meeko\utils\jsonutils.py", line 16, in
def convert_to_int_keyed_dict(data: Optional[dict[str, Any]]) -> Optional[dict[int, Any]]:
TypeError: 'type' object is not subscriptable

@rwxayheee
Copy link
Contributor

rwxayheee commented Jan 20, 2025

Hey @benrshep-iu
It looks like you have Meeko in an environment with Python3.8. We have made the requirement that the Python version has to be 3.9 and higher, since we implemented features (such as type hints, regarding the error you observed) that are only available in newer Python.

Would you be able to try setting up a new python environment, with Python 3.9? If you use conda, here's one recommended way (in our tutorial: https://meeko.readthedocs.io/en/release/tutorial1.html):

conda create -c conda-forge -n meeko_tutorial_py39 python=3.9 -y
conda activate meeko_tutorial_py39
conda install -c conda-forge numpy scipy rdkit gemmi meeko -y

You might need to make some syntax adaptation to the platform, or the specific package manager you use

@benrshep-iu
Copy link
Author

Thank you very much! I think it is working now, I was able to have it format the example file correctly. Thank you for all of your help, I am new to having to run docking this way.

@rwxayheee
Copy link
Contributor

Thanks for the confirmation! Closing the issue for now, but please feel free to re-open or leave a comment if we can be of any further assistance with anything.

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

2 participants