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

Add exception PDBQT_PARSE_ERROR for python #100

Merged
merged 1 commit into from
Oct 28, 2022

Conversation

everburstSun
Copy link
Contributor

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.

@diogomart
Copy link
Member

Thank you @sssssimon for this.
Just a note: we implemented a standard TypeError as in #139

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

Successfully merging this pull request may close these issues.

2 participants