test(rfd3): unit tests for symmetry frame and contig helpers#299
Open
lyskov-ai wants to merge 1 commit into
Open
test(rfd3): unit tests for symmetry frame and contig helpers#299lyskov-ai wants to merge 1 commit into
lyskov-ai wants to merge 1 commit into
Conversation
Fixture-backed CPU unit tests for the pure symmetry geometry in rfd3.inference.symmetry: cyclic/dihedral frame generation, the framecoord <-> (R, t) round-trip, pack/unpack, Kabsch _align/_rms recovery, symmetry-id parsing, and contig-string expansion. New tests/rfd3/ dir, auto-collected by testpaths and kept separate from the cluster-only models/rfd3/tests/. No source or config changes. Co-authored-by: lyskov-ai <277346777+lyskov-ai@users.noreply.github.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.
Adds CPU unit tests for the rfd3 symmetry geometry, which currently has no coverage in CI:
inference/symmetry/frames.py(cyclic/dihedral frame generation, the round-trip between a frame and its (rotation, translation), pack/unpack, Kabsch alignment recovery, and symmetry-id parsing) andinference/symmetry/contigs.py(contig-string expansion). 29 tests in a newtests/rfd3/directory, using small inline numpy/torch fixtures — no data files, GPU, or checkpoints. No source or config changes.One sharp edge is pinned with a documenting test:
is_valid_rotation_matrixchecks only orthogonality (R @ R.T == I), notdet == +1, so it accepts reflections.