Add exception PDBQT_PARSE_ERROR for python by everburstSun · Pull Request #100 · ccsb-scripps/AutoDock-Vina (original) (raw)
Navigation Menu
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Conversation
The program exits when I load a ligand which has an invalid atom type. This can be a disaster when performing virtual screening with python, because the try/except block will not work and the python process terminates. So I commented the try/catch block in C++ code and added a new exception PDBQT_PARSE_ERROR for python, which can be imported using from vina.vina_wrapper import PDBQT_PARSE_ERROR, so that the exception can be captured by python and the user could deal with the failed molecule later. This change basically won't affect the behavior of the binary of vina, since the uncaught exception will cause the process be killed by OS.
Thank you @sssssimon for this.
Just a note: we implemented a standard TypeError as in #139
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})