add swig exception for pdbqt_parse_error by shazj99 · Pull Request #139 · ccsb-scripps/AutoDock-Vina (original) (raw)
While doing large scale virtual screening using vina, the python process may corrupt due to invalid atoms in some of ligand pdbqt files. The error shows as bellow:
PDBQT parsing error: Atom type B is not a valid AutoDock type (atom types are case-sensitive).
> ATOM 1 B UNL 1 0.126 -0.559 0.434 1.00 0.00 0.400 B
The reason of corruption is the calling of exit() in underlying C++ codes like parse_ligand_pdbqt_from_file() or parse_ligand_pdbqt_from_string(). So we add a swig exception to throw it out instead of exit directly.
The test code is attached here: parse_test.tar.gz