fix: size legacy RDF bins from the smallest box edge - #199
Open
galjos wants to merge 1 commit into
Open
Conversation
The legacy bin setup derived the bin count from the largest box edge while both histogram kernels discard every pair beyond half the smallest edge. For non-cubic boxes this emitted a tail of bins that could never be filled and normalized the curve over a range the kernels never count, fabricating zero g(r) rows and large negative pair-count residuals. Deriving the count from the global minimum edge matches the kernel cutoff and the general path; cubic parity fixtures are unaffected.
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 #199 +/- ##
=======================================
Coverage 93.94% 93.94%
=======================================
Files 177 177
Lines 9227 9227
=======================================
Hits 8668 8668
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.
The legacy bin setup used the largest box edge while both kernels cut off at half the smallest edge, so for non-cubic boxes the histogram carried structurally empty tail bins and the differential column fabricated values over a range the kernel never counted. Both reductions now use
min, matching_infer_r_maxand the kernels.The added test pins a hand-computed two-atom expectation in a 20x20x60 box for both the Python and compiled kernels. The cubic parity SHA256 fixtures are unchanged.
Fixes #198.