Repository navigation
Searches without complexes no longer crash - #77
Merged
Merged
Conversation
_collect_complexes skips its final pruning when nothing was collected (a job of -p N without any complex consistent with a restraint raised a ValueError with max_complexes). Without any accessible complex, write_results raises a ValueError and disvis exits with a clear error, pointing to --min-interaction for small molecules, instead of an IndexError. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do and why?
Fixes two crashes of searches without complexes, found with the haddock3 protein-ligand example (neuraminidase and oseltamivir):
_collect_complexesskips its final pruning when nothing was collected. Withmax_complexes(the default of--max-complexes), a search, or a job of-p N, without any complex consistent with a restraint called_smallest_keys([])(ValueError: need at least one array to concatenate,queue.Emptyin the parent).write_resultsraises aValueErroranddisvisexits with anERROR:message, pointing to--min-interactionand--max-clash, instead of anIndexErrorin the false-positive analysis.How was this tested?
min_interactionandmax_complexescollects no complexes, andwrite_resultsraises the error. It fails without the change.python -W error -m unittest: 49 tests OK (9 GPU tests skipped).-p 12 -wc 75:ValueErrorbefore, the new error after; with-iv 100, 15956 complexes are found.-a 20 -vs 2 -p 4 -wc 75): result files byte-identical to before.AI assistance
Written with Claude Code (Claude Opus 5.5). Checked with the test and runs above.
Checklist
README.md,INSTALLATION.md) — not neededtest-cases/*/example-results/updated if the output changes — output unchangedRelated issues
Closes #76
Notes for reviewers
The default
--min-interaction(300 A^3) is too large for small molecules such as oseltamivir (44 atoms); this PR only makes the error say so.