Repository navigation
Refresh PyLOOS frame selections and cached alignments - #134
Merged
tromo merged 3 commits intoOct 20, 2026
Merged
Conversation
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.
Changing PyLOOS
skip()orstride()after construction can leave the old selection in use. Changing an aligned virtual selection can also reuse transforms for different source frames. This PR refreshes selections and invalidates the affected alignment cache.Direct child changes are included: after
child.skip(1), an already aligned parent could apply frame 0's transform to raw frame 1. Independent coordinates reproduced a 19.02 Å error. Parent frame maps now track each child's selection generation, so updates remain detectable afterlen(child)orchild.index()clears its stale flag, or when two child-length changes cancel each other.The final behavior:
ValueErrorbefore mutation when a custom iterator controls selection. Bulk setters preflight every child. Retain one-shot virtual iterator indices across rebuilds.frame()reporting and out-of-range negative frame indices. Reject noncontiguous custom ordering inframeBoundaries()instead of returning invalid slices.rmsd()/iters()report the existing uncomputed sentinel without triggering an expensive refit.Validation used a fresh full native build and separately installed Python package. All 31 local regression methods pass, along with 640,000 randomized state operations and 75 independent numerical/analysis cases. Public Barnaba UUCG coordinates for all 20,001 frames × 254 atoms match an independent MDTraj decoder exactly. NumPy alignment/selected-coordinate PCA comparisons pass, and the complete RNA pilot preserves 15 scientific artifacts and summary metrics. Tests and evidence remain outside the repository, as requested. CTest lists no registered tests, so this does not claim a full upstream test-suite pass.
Scope is Python trajectory selection/cache handling and documentation. Native code is unchanged; its pre-existing exact three-atom planar-alignment counterexample is outside this wrapper fix.
git diff --checkpasses.