Providing Custom Structural Templates
Structural templates can be provided for protein chains to guide the structure prediction. Templates are specified as mmCIF files with explicit mappings between query and template residues.Structural templates are only supported for protein chains. RNA and DNA chains do not support templates.
Overview
A structural template consists of:- An mmCIF file containing a single protein chain
- A mapping from query residue indices to template residue indices
Template Structure
Required Fields
- Inline mmCIF
- External mmCIF File
Provide the mmCIF content directly in the JSON:
Query and Template Indices
The mapping between query and template residues is defined using two parallel lists:queryIndices: 0-based indices in the query sequencetemplateIndices: 0-based indices in the template sequence
Understanding the Mapping
Each position in This creates the mapping:
queryIndices corresponds to the same position in templateIndices.- Query residue 0 → Template residue 0
- Query residue 1 → Template residue 2
- Query residue 2 → Template residue 5
- Query residue 3 → Template residue 6
Handling Unresolved Residues
mmCIF files can have residues present in residue tables but missing atom coordinates (unresolved residues). These must be counted when specifying template indices.For example, PDB 8UXY has unresolved residues 1–20.To align query residues 0–3 with template residues 21–24 (which are residues 4–7 in the mmCIF with 0-based indexing after accounting for unresolved residues 1–20):
Template Modes
AlphaFold 3 supports several template usage modes:- Automatic (Default)
- Template-Free
- Custom Templates Only
- MSA with Template Search
Leave The data pipeline will run Hmmsearch to find structural templates.
templates unset. AlphaFold 3 will search for templates automatically:mmCIF Requirements
Valid Single-Chain mmCIF
Complete Examples
Example 1: Single Custom Template
Example 2: Template-Free with Custom MSA
Example 3: Multiple Templates with Gaps
Advanced: Explicitly Setting Templates to Null
Code Reference
Fromfolding_input.py:86-121:
folding_input.py:165-167: