Quick example
Methods
.fold()
Predict the 3D structure of one or more protein sequences.
A single amino acid sequence string or a list of sequences. Use
":" to separate chains in a multimer (e.g., "CHAIN_A:CHAIN_B").Per-call configuration overrides. Only dynamic config keys can be set here — static keys raise
ValueError. See Configuration.ESMFoldOutput (see Output below)
Output
TheESMFoldOutput dataclass returned by .fold().
Always included
Prediction metadata with timing information. See PredictionMetadata.
List of Biotite
AtomArray objects, one per input sequence. Always generated.Confidence metrics
Per-residue predicted local distance difference test. Shape:
(batch, residue, 37).Predicted TM-score (scalar per sample).
Predicted aligned error. Shape:
(batch, residue, residue).Maximum predicted aligned error (scalar per sample).
Structure representations
PDB-formatted structure strings. Only generated when
include_fields contains "pdb" or "*".mmCIF-formatted structure strings. Only generated when
include_fields contains "cif" or "*".Index arrays
Per-residue chain assignment. Shape:
(batch, residue).Per-residue residue numbering. Shape:
(batch, residue).Model internals
Backbone frames. Shape:
(model_layer, batch, residue, 7).Sidechain frames. Shape:
(model_layer, batch, residue, 8, 4, 4).Torsion angles. Shape:
(model_layer, batch, residue, 7, 2).Intermediate structure module states. Shape:
(model_layer, batch, residue, dim).Single representation from the trunk. Shape:
(batch, residue, 1024).Pair representation from the trunk. Shape:
(batch, residue, residue, 128).Distogram logits. Shape:
(batch, residue, residue, 64).Configuration
These keys can be set viaconfig={} at initialization or options={} per call (unless marked static).
| Key | Type | Default | Static | Description |
|---|---|---|---|---|
device | str | "cuda:0" | Yes | GPU device identifier |
glycine_linker | str | "" | No | Linker string inserted between chains for multimer tokenization |
position_ids_skip | int | 512 | No | Position ID offset between chains in multimer mode |
include_fields | list[str] | None | None | No | Which output fields to return. None returns all; use ["pdb"] or ["cif"] to generate structure strings. Use ["*"] for everything including PDB/CIF |
Multimer prediction
Separate chains with":" in the sequence string:
