Add diagnostic text output format for failed checks - #100
Merged
Merged
Conversation
Owner
|
Thank you for suggesting a diagnostics output. I am very happy to add it. Right now one of the tests outside of the scope of this PR fails which I will investigate. |
Owner
|
I also like the visual output. Thank you for sharing! This looks very useful indeed. |
Contributor
Author
|
Sounds great! I'll already open a PR from the branch that supports the HTML report. It might be easier to work from that one since it already contains the commit included in this PR. |
Owner
|
I have updated the tests for RDKit v2026.3. Please rebase to rerun the checks. |
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.
Summary
This PR adds a new
diagnostictext output format for failed PoseBusters checks:It keeps the normal concise summary, but adds extra context where available, for example:
Atom numbering is reported as zero-based RDKit indices.
The example below is from the OpenBind enteroviral 2A protease dataset:
The diagnostic output reuses results already produced by the existing modules. It does not change checks, thresholds, pass/fail behaviour, or the existing
short,long, andcsvoutput formats.For checks without detailed structured information, the failure is still listed with a simple fallback message.
Current limitation
diagnosticoutput currently runs sequentially and does not use PoseBusters' multiprocessing mode. Existing output modes are unaffected.Tests
Tests cover geometry, flatness, intermolecular clashes, formatting, multi-record SDF input, fallback behaviour, and equivalence of the underlying PoseBusters results between normal and diagnostic execution.
I do have one pre-existing failure in the upstream test suite:
This also fails without this PR in my current RDKit/Python environment.
Possible follow-up: HTML report
I have also been experimenting with a self-contained HTML diagnostic report on my
feature/html-diagnosticsbranch. This is especially useful for understanding failures in less obvious or edge-case structures.It builds on the structured diagnostics from this PR and adds summary tables and visualisations of the implicated atoms and distances.
Here is the same example from OpenBind I shared before, but in the HTML output format:

The label placement is heuristic and is not always perfect for crowded structures, but I have found the report very useful for quickly understanding failures.
I have kept that work separate to keep this PR focused. If useful, I would be happy to open the HTML report as a follow-up PR.