Skip to content

refactor: move AF3 ModelCIF and storage helpers beside the AF3 outputs - #662

Merged
DimaMolod merged 2 commits into
mainfrom
refactor/af3-output-helpers
Oct 14, 2026
Merged

DimaMolod merged 2 commits into
mainfrom
refactor/af3-output-helpers

Conversation

@DimaMolod

@DimaMolod DimaMolod commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #658–#661: two AF3-only helpers that lived in utils/ move next to the AF3 output writer. No behaviour change.

  • utils/af3_modelcif.py → folding_backend/alphafold3_modelcif.py, byte-for-byte (a pure rename in git). Only alphafold3_outputs.py uses it.
  • The AF3 half of utils/post_modelling.py → folding_backend/alphafold3_storage.py: the ranking_scores.csv ledger reader, the best sample it names, and the --storage_mode presets. Like post_modelling, it imports no AlphaFold 3. post_modelling keeps the AF2 pickle presets and the shared compress_file.

Nothing outside AlphaPulldown imports either old path (checked AlphaPulldownSnakemake and AlphaJudge), so there are no compatibility aliases. The tests follow the code (test_alphafold3_modelcif.py, test_alphafold3_storage.py), and the expensive-test gate in test/cluster/code_changes.py tracks the new ModelCIF path.

The AF3 image's build-time test stage names the ModelCIF test by path, so the first push failed build-alphafold3-container. It now runs the renamed file, and a new unit test checks that every test file and test an image Dockerfile runs exists. Such a rename now fails in seconds in the unit suite.

Verification

  • Unit + integration, both release images: identical to main. AF2 image: 946 passed, 26 skipped. AF3 image: 1017 passed, 15 skipped. The same pre-existing environmental failures.
  • GPU, AF3 run modes, resume and the ModelCIF metadata end-to-end test: 30/30 passed. These cover the storage presets, the ranking ledger on resume, and ModelCIF augmentation from real features.

🤖 Generated with Claude Code

utils/af3_modelcif.py, used only by the AF3 output writer, moves unchanged to
folding_backend/alphafold3_modelcif.py. The AF3 half of utils/post_modelling.py
(the ranking_scores.csv ledger reader, the best sample it names and the
--storage_mode presets) moves to folding_backend/alphafold3_storage.py, which,
like post_modelling, imports no AlphaFold 3. post_modelling keeps the AF2
pickle presets and the shared compress_file.

Nothing outside AlphaPulldown imports either old path (checked
AlphaPulldownSnakemake and AlphaJudge). Tests follow the code; the expensive-
test gate tracks the new ModelCIF path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

The AF3 Dockerfile's test stage still named test/unit/test_af3_modelcif.py,
renamed in the previous commit, so the image build failed there. A unit test
now checks that every test file and test an image Dockerfile runs exists, so a
rename fails in seconds in the unit suite rather than after the image build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DimaMolod
DimaMolod merged commit eef1405 into main Oct 14, 2026
6 checks passed
@DimaMolod
DimaMolod deleted the refactor/af3-output-helpers branch October 14, 2026 08:00
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.

1 participant