Skip to content

test(rfd3): unit tests for symmetry frame and contig helpers#299

Open
lyskov-ai wants to merge 1 commit into
RosettaCommons:productionfrom
lyskov-ai:0013-test-rfd3-units
Open

test(rfd3): unit tests for symmetry frame and contig helpers#299
lyskov-ai wants to merge 1 commit into
RosettaCommons:productionfrom
lyskov-ai:0013-test-rfd3-units

Conversation

@lyskov-ai
Copy link
Copy Markdown
Contributor

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) and inference/symmetry/contigs.py (contig-string expansion). 29 tests in a new tests/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_matrix checks only orthogonality (R @ R.T == I), not det == +1, so it accepts reflections.

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>
@lyskov-ai lyskov-ai requested a review from woodsh17 June 3, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants