Core model
Use this skill when the request is to build or run alphafold2_pytorch.Alphafold2, configure its Evoformer trunk, supply sequence/MSA/template features or masks, or diagnose core shape and output-routing errors.
Route first
- Read the API reference before choosing constructor or forward arguments.
- Use the workflows for small, CPU-safe synthetic calls and output inspection. The bundled smoke helper is deterministic, has no network or data-file step, and defaults to CPU.
- Route coordinate refinement, confidence, and recycling semantics to structure-and-recycling.
- Route pretrained ESM/MSA/ProtTrans wrappers and downloaded embedding models to embeddings.
- Route distance metrics, bucket utilities, and MDS to utilities.
- For import, dimension, memory, or README/source-drift failures, use troubleshooting.
Minimum safe recipe
- Install distribution
alphafold2-pytorch==0.4.32with its native scientific dependencies, then verifyimport alphafold2_pytorch. - Construct
Alphafold2(dim=16, depth=1, heads=1, dim_head=16)and callmodel.eval()withtorch.no_grad()for inference. - Pass
seqas integer shape(B, N), an optional integermsashape(B, M, N), and booleanmask/msa_maskwith matching shapes. The inspected source asserts that MSA width equals primary-sequence width; do not follow the README examples that use different widths. - Read
ReturnValues.distancefor distogram logits. Setpredict_angles=Trueto additionally readtheta_logits,phi_logits, andomega_logits; the source returns an object, not the tuple shown in the README. - For already embedded pair/MSA representations, use the direct public
Evoformerroute in the API reference; it returns updated representations and does not produce distogram or angle logits itself.
The exact contracts, source/installed provenance, template and embedding dimensions, supported knobs, and drift warnings are in the linked references. Do not claim README-only flags such as reversible, use_conv, sparse/linear/Kronecker/compressed attention, or custom_block_types are constructor features at this version: they are absent from the inspected public signature.