Skip to content

Fix CI: open rebuilt examples as Annotated CIF and protonate them - #20

Merged
m1c0l merged 5 commits into
RosettaCommons:mainfrom
AtharvaTilewale:fix/ci-examples-import-presets
Oct 22, 2026
Merged

m1c0l merged 5 commits into
RosettaCommons:mainfrom
AtharvaTilewale:fix/ci-examples-import-presets

Conversation

@AtharvaTilewale

@AtharvaTilewale AtharvaTilewale commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Since the example rebuild in #7, the unit job fails on main with 9 failures in test_api, test_design_workflows and test_protonation. Every open dependabot PR (#10–#19) is red for the same reason, not because of its bump.

Causes and fixes

  1. Import inference on the rebuilt examples. Five examples (protein_binder, ptm_binder, enzyme_design, inverse_folding, partial_diffusion) lack a chain-terminal OXT. inspect_import counted that as a missing heavy atom, returned preset=None, and asked the user to pick a preset. Design outputs routinely omit OXT, so it is now counted separately: these files open as Annotated CIF, and the import message says how many terminal OXT atoms are left absent. Other missing heavy atoms still require an explicit choice. Validation still reports the missing atom, which matches the studio_validation already recorded in hit-example-provenance.json.
  2. Protonate failed on two examples. enzyme_design and inverse_folding stored the nitrophenyl phosphate ring (L:0) with AROM bond orders, so Protonate returned 422 (Bonds of unstated order (BondType.ANY or AROMATIC) cannot be protonated). The six ring bonds are now stated as alternating single/double, which gives every ring carbon a valence of 4, and the aromatic flag is kept. They load as AROMATIC_SINGLE/AROMATIC_DOUBLE. Protonate now succeeds (76 H) and the CIF round-trip is lossless. The two sha256 entries in hit-example-provenance.json are updated.
  3. Stale workflow fixtures. workflow_cases.json/nim_workflow_cases.json still described the pre-rebuild examples.
    • Atom counts now match hit-example-provenance.json: 1267, 107 and 1739, plus 2150 for the unchanged BHRF1 complex.
    • Two queries pointed at entities that no longer exist and are retargeted. The ppi hotspots move from chain A to the BHRF1 target (chain B), because chain A is now the one-atom binder segment placeholder. The enzyme substrate moves from ORO to L:0.

The docs (WEB.md, PYMOL.md) describe the terminal-OXT rule.

Validation

  • Local run of the CI unit command (Python 3.12, atomworks[ml]==3.0.4, pymol-open-source, gradio): 386 passed, 19 skipped, 0 failed. On main it is 376 passed, 9 failed.
  • New regression test test_packaged_examples_infer_an_unambiguous_import_preset fails on main and passes here.
  • ruff check and ruff format --check are clean.

For review

Since the example rebuild in RosettaCommons#7, the unit job fails on main (9 tests),
which also blocks every dependabot PR. There are three causes:

- inspect_import treated a missing chain-terminal OXT as a missing heavy
  atom, so 5 of the 10 bundled examples (protein_binder, ptm_binder,
  enzyme_design, inverse_folding, partial_diffusion) returned preset=None
  and asked the user to choose. Design outputs routinely omit OXT, so it is
  now counted separately and reported in the import message.
- enzyme_design and inverse_folding stored the nitrophenyl phosphate
  ring (L:0) with AROM bond orders, which protonation rejects ("Bonds of
  unstated order ... cannot be protonated"). The six ring bonds are now
  stated as alternating single/double with the aromatic flag kept. This
  round-trips losslessly, and Protonate returns 76 hydrogens instead of 422.
  Provenance hashes are updated.
- The workflow fixtures still described the pre-rebuild examples. Atom
  counts now match hit-example-provenance.json (1267, 107, 1739; 2150 for
  the unchanged BHRF1 complex). Their queries are retargeted: hotspots move
  to the BHRF1 target (chain B), since chain A is now the binder segment
  placeholder, and the enzyme substrate moves from ORO to L:0.

Adds a regression test that every packaged example infers a preset.
Copilot AI balanced review requested due to automatic review settings October 22, 2026 08:02