Skip to content

Remove unused atom14 default-frame gather#570

Open
taivu1998 wants to merge 1 commit into
aqlaboratory:mainfrom
taivu1998:tdv/issue-249-default-frames
Open

Remove unused atom14 default-frame gather#570
taivu1998 wants to merge 1 commit into
aqlaboratory:mainfrom
taivu1998:tdv/issue-249-default-frames

Conversation

@taivu1998
Copy link
Copy Markdown

Summary

  • Remove the unused default_frames[aatype, ...] gather from frames_and_literature_positions_to_atom14_pos.
  • Keep the rigid-group count explicit by deriving num_rigid_groups from default_frames.shape[-3] before building the atom-to-frame one-hot mask.
  • Add a regression test with a shape-only default_frames sentinel so the helper fails if it tries to gather default frames again.

Root cause

Issue #249 points out that frames_and_literature_positions_to_atom14_pos gathered default_frames by residue type even though the function selects per-atom rigid groups from group_idx and lit_positions. The gathered tensor was unused, and the surrounding comment suggested an atom14-shaped tensor even though default_frames is organized by the 8 rigid groups. Removing the dead gather keeps the implementation aligned with the actual atom14-to-rigid-group mapping and avoids a confusing, unnecessary tensor operation.

Validation

  • python -m py_compile openfold/utils/feats.py tests/test_feats.py
  • git diff --check
  • Direct regression check with a default_frames sentinel whose getitem raises, confirming the helper only needs the shape and still returns (1, 3, 14, 3)
  • Attempted focused pytest with python -m pytest tests/test_feats.py -k frames_and_literature_positions_to_atom14_pos -q; local collection is blocked by missing environment dependencies (ml_collections, and lightweight direct imports also showed missing tree/Bio outside the full repo environment)

Fixes #249

@taivu1998 taivu1998 marked this pull request as ready for review May 11, 2026 03:44
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.

Default_4x4 in frames_and_literature_positions_to_atom14_pos

1 participant