ESMFold
Structure prediction · Meta AI · 2023

ESMFold

Predicts a structure from a single sequence with no alignment search at query time. A frozen ESM-2 supplies sequence representations to a folding trunk and a structure module derived from AlphaFold2.

In plain language

It folds a protein from the sequence alone. No search for relatives, no waiting on a database. The language model already read enough proteins that its internal state stands in for the alignment.

One way to picture it

A translator who has read the whole library does not stop to look words up. Faster, and slightly worse on the rare sentence where looking it up would have helped.

Commonly misread as

Faster does not mean better. When a deep alignment exists, an alignment-based predictor usually wins, and giving up that evidence is a trade you are choosing to make.

How it is put together

Select a component to read it
Sequence and pair features
Refined representations

Try it

Predict a structure and write a PDB file
import torch
from transformers import AutoTokenizer, EsmForProteinFolding

tok = AutoTokenizer.from_pretrained("facebook/esmfold_v1")
model = EsmForProteinFolding.from_pretrained("facebook/esmfold_v1").eval()

seq = "MALWMRLLPLLALLALWGPDPAAAFVNQHLCGSHLVEALYLVCGERGFFYTPKT"
inputs = tok([seq], return_tensors="pt", add_special_tokens=False)
with torch.no_grad():
    output = model(**inputs)

pdb = model.output_to_pdb(output)[0]
open("prediction.pdb", "w").write(pdb)

These snippets have not been executed here. Versions move; check the model card before trusting a line of it.

01 / Why it is here

Standing

Made the language-model route to structure practical at the scale of metagenomic surveys. It is a structure predictor built on ESM-2, not another name for the language model.

02 / What sets it apart

Distinctions

  • The alignment search disappears, which is where most of the speed comes from.
  • The language model is frozen. Only the folding trunk is trained.
  • Accuracy trails alignment-based prediction on targets with deep, informative alignments.
03 / Where it stops

Limits

When a rich alignment exists, the evidence it carries is real and a model that ignores it gives that up. Single-sequence folding is a trade, not a free improvement.

Weights and code

Checked against the registry, not from memory
RepositorySizeLicenceNote
facebook/esmfold_v1ESM-2 3B plus folding trunkMIT

Sources

Each number above comes from one of these

Same task, other answers

Structure prediction