fix: validate RDF inputs before running - #201
Open
galjos wants to merge 1 commit into
Open
Conversation
The RDF setup accepted inputs it cannot handle: a selection matching no atoms produced an all-NaN g(r) on the general path and a bare ZeroDivisionError on the legacy path, delta_r = 0.0 aborted with an unhandled OverflowError or ZeroDivisionError, and a vacuum trajectory with an explicit radial range divided by an infinite average volume and silently wrote NaN and inf into every output column. Each case now raises a clear RDFError during setup, matching the empty selection handling of the MSD, VACF and momentum analyses. The user guide no longer claims vacuum trajectories are supported.
Contributor
|
PYLINT REPORT Your code has been rated at 9.78/10 Full reportRaw metrics
Duplication
Messages by category
% errors / warnings by module
Messages
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #201 +/- ##
=======================================
Coverage 93.94% 93.94%
=======================================
Files 177 177
Lines 9227 9235 +8
=======================================
+ Hits 8668 8676 +8
Misses 559 559
🚀 New features to boost your workflow:
|
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.
A vacuum trajectory ran to completion and wrote NaN and inf into g(r), selections matching no atoms did the same or died in a bare ZeroDivisionError on the legacy path, and
delta_r = 0.0raised an OverflowError from deep inside the bin setup. All four now raise anRDFErrornaming the actual problem: vacuum trajectories at the start of the run, empty reference or target selections and non-positivedelta_rat construction.PositiveRealitself is untouched, since other analyses use it for values where zero is valid. The user guide sentence claiming vacuum trajectories were supported is corrected.Fixes #200.