ESMFold Model¶
An inference-only oracle that runs ESMFold <https://huggingface.co/facebook/esmfold_v1>``_ structure
prediction on amino acid sequences and returns a scalar confidence score per candidate. Suitable for
use as a black-box oracle inside ``Oracle(scorer=ESMFoldModel(ESMFoldModelConfig(...))).
Three scoring metrics are available, all in the range [0, 1] (higher is better):
Metric |
What it measures |
Interpretation thresholds |
|---|---|---|
|
Global structural plausibility of the entire fold. Analogous to TM-score against a hypothetical template; captures whether the sequence adopts a coherent 3-D topology. |
> 0.5 — confident fold, well-defined topology
0.2–0.5 — moderate confidence, partially structured
< 0.1 — low confidence; typical for disordered proteins or peptides < ~20 residues
|
|
Per-residue predicted local distance difference test (pLDDT) score, averaged over all non-padding residues. Measures local structural accuracy at the residue level. (ESMFold normalises pLDDT to [0, 1] internally.) |
> 0.7 — well-structured, confident local geometry
0.5–0.7 — moderate confidence, flexible or partially ordered regions
< 0.5 — low confidence, likely disordered or unreliable residues
|
|
Weighted average |
Inherits the [0, 1] range; apply the same per-metric thresholds above to each component before interpreting the combined score. |
Key properties:
Input: Amino acid sequences stored in
Candidate.data(Modality.SEQUENCE)Output: Mean-only scalar predictions (no uncertainty estimates)
Batching:
batch_size > 1is supported only forscoring_metric='mean_plddt'; pTM/combined requirebatch_size=1CPU use: Backbone is automatically cast to fp32 on CPU to avoid fp16 numerical errors
Memory: Pass
chunk_sizeto reduce peak memory for long sequences; usecleanup()to free GPU memory after inference
Note
This model requires the optional esmfold dependency. Install it with:
pip install "transformers>=4.36.0" "accelerate>=0.26.0"