Skip to content

Harden folding input validation and fix DNA/RNA API inconsistencies - #704

Open
Ayush7614 wants to merge 1 commit into
google-deepmind:mainfrom
Ayush7614:fix/folding-input-validation-and-api
Open

Harden folding input validation and fix DNA/RNA API inconsistencies#704
Ayush7614 wants to merge 1 commit into
google-deepmind:mainfrom
Ayush7614:fix/folding-input-validation-and-api

Conversation

@Ayush7614

@Ayush7614 Ayush7614 commented Jul 28, 2026

Copy link
Copy Markdown

Summary

  • Reject malformed protein templates early: require exactly one of mmcif/mmcifPath, equal-length queryIndices/templateIndices, and non-empty mmCIF content (previously unequal index lists were silently truncated via zip, and missing mmCIF failed much later).
  • Fix RNA/DNA API correctness: RnaChain.fill_missing_fields() now preserves the raw sequence (instead of CCD-remapping unknown bases to N), and DnaChain.modifications is a @property consistent with RnaChain.
  • Reject empty ligand ccdCodes/smiles and empty --input_dir JSON directories with clear errors.
  • Add focused unit tests covering these validation and API paths (folding_input_test.py, 12 tests, all passing).

Why

These are input-path correctness bugs that produce cryptic late failures or silent data corruption. They are not tied to an existing issue; they close real gaps in JSON validation and chain API consistency.

Test plan

  • python src/alphafold3/common/folding_input_test.py — 12/12 passed
  • Review template JSON with mismatched indices / missing mmcif — expect clear ValueError
  • Round-trip modified RNA through fill_missing_fields() — raw sequence preserved
  • Confirm DnaChain.modifications is iterable like RNA

Reject malformed templates, empty ligands, and empty input dirs early;
preserve raw RNA sequences when filling missing fields; expose DNA
modifications as a property; and add unit tests covering these paths.
@alvinlitanamirasol339-max

Copy link
Copy Markdown

Alvin Litana Mirasol Meta Global Head of Executive founder Owner of Meta Platforms Inc Advance technology website
Alphafold3 DNA perfectly node to node the end of nodé

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