CBDD / rDock

rDock is a fast and versatile Open Source docking program that can be used to dock small molecules against proteins and nucleic acids. It is designed for High Throughput Virtual Screening (HTVS) campaigns and Binding Mode prediction studies.
https://rdock.github.io
GNU Lesser General Public License v3.0
51 stars 22 forks source link

RBT_FILE_READ_ERROR at ../src/lib/RbtBaseFileSource.cxx, line 170 End of file/empty record in xxxx/rdock_cavity.as #125

Closed wjkniko closed 1 month ago

wjkniko commented 2 months ago

Hello,

I am experiencing an issue when running the rbdock command with the following parameters:

rbdock -i <INPUT>.sd -o <OUTPUT> -r <PRMFILE> -p dock.prm -n 50

The command results in the following error message:

RBT_FILE_READ_ERROR at ../src/lib/RbtBaseFileSource.cxx, line 170
End of file/empty record in /public/home/qiang/miniconda3/envs/rdock/share/rdock-2022.0+1-1/data/ligands/1AJU/rdock/3D-balloon/rdock_cavity.as

Upon checking the rdock_cavity.as file, I found that it is garbled and not a readable file. image

Created the rdock_cavity.prm file with the following content:

RECEPTOR_FILE rna.mol2 RECEPTOR_FLEX 0.0

SECTION MAPPER SITE_MAPPER RbtLigandSiteMapper REF_MOL ligand.sdf RADIUS 10.0 SMALL_SPHERE 1.0 MIN_VOLUME 100 MAX_CAVITIES 1 VOL_INCR 0.0 GRIDSTEP 0.5 END_SECTION

SECTION CAVITY SCORING_FUNCTION RbtCavityGridSF WEIGHT 1.0 END_SECTION

I also ensured that all files are in ASCII text encoding. Despite these efforts, the generated rdock_cavity.as file is unreadable and causes the above error.

Could you please help identify what might be causing this issue and how I can resolve it?

Thank you in advance for your assistance.

wjkniko commented 2 months ago

ligand.zip rna.zip

Here is an updated draft of your question for GitHub, including a note about the attachment of the test .mol2 and .sdf files:

ggutierrez-sunbright commented 2 months ago

Hi,

Thanks for contacting us, and for sharing the receptor, ligand, and configuration. I'll try and reproduce the error.
The .as file is a binary file, so it is expected to look like that (it was never meant to be read by humans, unless it is with a hex editor for debugging purposes)

I've also noticed, the rDock version you're using looks like it is (at least) a couple years old, and probably installed with conda/miniconda.
Could you please try installing the current version? There's been quite a few bug fixes and improvements since then, and the issue could have been already fixed.
You could either compile from source, or use a precompiled build for the latest stable release. You will find the instructions on how to do that in the README.md file.

Regards,

Guillermo

wjkniko commented 2 months ago

Thank you for your help. Although I haven't found the root cause of the issue yet, I have temporarily resolved the docking problem. I installed rDock using the following conda command: conda install -c bioconda rxdock Then, I achieved the docking using the following Python code: `import os

os.system("rbdock -i {ligand} -o {output} -r {prm} -p {dock_prm} -n {poses_no}".format( ligand=ligand_sdf, output=os.path.join(ligand_docking_folder, ligand_name + "_out"), prm=prm_text_filepath, dock_prm=args.prm, poses_no=args.n_poses )) ` I hope this helps anyone who needs it.

ggutierrez-sunbright commented 1 month ago

Hi,

I've tried reproducing the issue with the latest version of rDock, but it runs to completion without errors. It looks like whatever the issue was, has been fixed in the last two years.

I'd also like to clarify that rxDock is a different project.
It was forked from rDock in 2019, and their team did a great job modernizing the program.
It's been unmaintained since early 2022, though, so unless there's an exclusive feature from rxDock you want to use I'd recommend using the latest version of rDock.

I'll create a ticket to update the bioconda recipe for rDock, so the latest version is available in this way.

Thanks and regards