← Workbench

AnalyseVia your AI assistantProtein

Sample and score sequences on a backbone (ESM-IF1)

Free · seconds to about a minute

Give a protein structure (a UniProt accession, one of your folds or coordinates) and ESM-IF1, an inverse-folding model, samples sequences for one chain in the order they were drawn, each with the model’s own log-likelihood, its identity to the structure’s sequence and the positions that changed against your file’s numbering. Or give your own sequences and get the log-likelihood the model assigns each, overall and per position, with the structure’s own sequence scored the same way. The temperature, seed, checkpoint hash and every residue or hetero group that was not shown to the model are in the result. It runs on the CPU, so the size of a request is limited.

Try asking

Using rnafold, take the stored model for UniProt P01542, sample 4 sequences with ESM-IF1 at temperature 0.1, and tell me what the likelihoods and identities are and are not.

Tools your assistant calls

design_sequences_esm_ifscore_sequences_esm_if

Every tool, with its inputs and outputs →

How it works

The method behind this item.

ESM-IF1 (inverse folding)Tool · version esm_if1_gvp4_t16_142M_UR50 with fair-esm 2.0.0

ESM-IF1 is a GVP-Transformer: a geometric encoder reads the N, CA and C atoms of a protein backbone and an autoregressive decoder writes the sequence from the first residue to the last. To sample, residues are drawn one at a time with the model’s logits divided by the temperature you choose, with a seed per sample so a run can be repeated. To score, one deterministic pass gives the natural-log probability of each residue of the sequence you supply given the backbone and the residues before it; the total is their sum, in nats at temperature 1. Every sampled sequence is scored the same way. The structure is shifted so the centroid of its CA atoms is at the origin before the model reads it. We run it on the CPU, in order, and nothing is ranked or labelled.

Paper

Hsu C, Verkuil R, Liu J, Lin Z, Hie B, Sercu T, Lerer A, Rives A. Learning inverse folding from millions of predicted structures. bioRxiv (preprint, posted 2022-04-10; published at ICML 2022).

Code
ESM repository (archived)
Licence
MIT (code). No separate terms for the weights are stated by the repository or the weights host; we offer them on the basis that the project states it is open source · Copyright (c) Meta Platforms, Inc. and affiliates
Length cap here
1,000 model positions; about a minute of CPU per request (sampling: sequences x positions up to 1,800; scoring: (sequences + 1) x positions up to 6,000)

On crambin, hen lysozyme, a ubiquitin fusion and hemoglobin alpha, 16 sequences sampled at temperature 0.1 were 0.47 to 0.76 identical to the input sequence (ProteinMPNN, run beside it, 0.43 to 0.55); that is agreement with the input sequence on backbones that are probably in the training data, not a held-out test and not a statement about which model is better. Native sequences scored well above 20 shuffles and 20 random sequences of the same composition in all five structures tried. Our wrapper reproduces the upstream functions exactly except for the centring, which changes outputs by amounts comparable to sampling noise; rotation moves values by a few hundredths of a nat. A likelihood or an identity is the model agreeing with the backbone: it is not stability, foldability, expression, binding or function, and nothing here is folded. Other protein chains are shown as backbone context only, a zero-shot use of a model trained mainly on single chains; ligands, ions, waters, nucleic acids and modified residues are not shown to it.

Limits

  • A likelihood under the model, and an identity to the input sequence, are the model agreeing with this backbone. They are not stability, foldability, expression, binding or function, and nothing is folded here.
  • Sequences come back in sampling order or the order given. Nothing is ranked or labelled, and the numbers are on a different scale from any other design model’s.
  • The structure is shifted so its CA centroid is at the origin before the model reads it (without that the model’s values moved with where the file put the molecule); rotation still moves values by a few hundredths of a nat.
  • With several protein chains you name the one to work on; the others are shown as backbone context only, which is a zero-shot use of a model trained mainly on single chains. Ligands, ions, waters, nucleic acids and modified residues are not shown to the model, and the result lists them.
  • At most 1,000 model positions, and a request is limited to about a minute of CPU: sampled sequences times positions up to 1,800, scored sequences plus the input sequence times positions up to 6,000.