esmfold2
What it does
This skill teaches an agent how to run ESMFold2 and related ESMC language models from the Biohub release. It covers folding complexes with or without alignments, and scoring or embedding protein sequences.
When to use it
- ✓When a researcher wants a complex structure predicted quickly without an alignment step.
- ✓When a scientist wants a protein language model's embeddings or mutation scores.
- ✓When a team wants to predict how a designed sequence folds with ligands or DNA.
Skill link
https://github.com/aipoch/open-science/blob/main/resources/skills/esmfold2/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Predict the structure of this antibody and antigen with ESMFold2 and tell me the confidence.”
5 new skills a week. 1 minute to read.
How it works
The agent sets up the required environment, which needs a recent GPU and Python 3.12, then runs the folding model in single-sequence or alignment mode. It returns structures and confidence measures.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
ESMFold2 (Biohub)
All-atom diffusion co-folding from the Biohub ESM release (2026). ESMFold2 = 48 pair layers with MSA support; ESMFold2-Fast = 24 layers, single-sequence only, ~1.7x faster.
License: MIT (code github.com/Biohub/esm + weights HF biohub/*).
Paper: "Language Modeling Materializes a World Model of Protein Biology" (2026).
Install
CUDA 12.x GPU (H100/A100-class); Python 3.12 only. Fresh venv; needs egress to HF Hub, GitHub, PyPI:
pip install --no-cache-dir uv
uv venv --python 3.12 /work/venv && source /work/venv/bin/activate
uv pip install \
"torch>=2.5,<2.8" einops "biotite>=1.0" rdkit msgpack-numpy biopython \
scikit-learn brotli attrs pandas cloudpathlib httpx tenacity zstd pydssp \
pygtrie accelerate huggingface_hub safetensors "numpy<3" networkx \
sentencepiece tokenizers regex packaging filelock pyyaml typing_extensions \
"transformers @ git+https://github.com/Biohub/transformers.git@3a8956fb4d4ea16b0ec8e71deef2c2909b6a5cbf"
uv pip install --no-deps "esm @ git+https://github.com/Biohub/esm.git@f652b471"
# OPTIONAL — only affects ESMC attention; trunk speedup comes from set_kernel_backend("fused")
uv pip install ninja packaging wheel setuptools
MAX_JOBS=8 uv pip install --no-deps --no-build-isolation "flash-attn<3"
# Do NOT install transformer-engine — RuntimeError (not ImportError) on import
# slips ESMC's guard and kills ESMFold2Model import.
The bundled esmfold2_gpu Modal env (remote-compute-modal skill) is the
canonical, version-pinned recipe.
Gotchas:
- Default kernel backend is
None(reference PyTorch, ~12x slower than paper). Callmodel.set_kernel_backend('fused')afterfrom_pretrained(). See section below. - Match torch CUDA build to your driver; the pin
<2.8targets CUDA 12.2. - Weights via Xet bridge ~300 MB/s: ESMFold2 1.36 GB, ESMFold2-Fast 0.76 GB. Set
HF_HOME=/work/hf_cache.
Usage — local model
from esm.models.esmfold2 import (
ESMFold2InputBuilder, StructurePredictionInput,
ProteinInput, DNAInput, RNAInput, LigandInput, Modification,
)
from transformers.models.esmfold2.modeling_esmfold2 import ESMFold2Model
model = ESMFold2Model.from_pretrained("biohub/ESMFold2").cuda().eval()
# or "biohub/ESMFold2-Fast" (24 layers, no MSA, ~1.7x faster)
# or "biohub/ESMFold2-Experimental{,-Fast}{,-Cutoff2025}" (4 design-critic models)
spi = StructurePredictionInput(sequences=[
ProteinInput(id="A", sequence=target_seq),
ProteinInput(id="B", sequence=binder_seq),
# DNAInput(id="C", sequence="ACGT", modifications=[Modification(position=5, ccd="C36")]),
# RNAInput(id="D", sequence="ACGU"),
# LigandInput(id="L", ccd=["SAH"]), # or smiles="..."
])
# Homodimer: ProteinInput(id=["A","B"], sequence=seq)
results = ESMFold2InputBuilder().fold(
model, spi,
num_loops=10, # paper FoldBench eval: 10; 20-loop variant: 20
num_sampling_steps=68, # paper eval: 68 (truncated EDM)
num_diffusion_samples=5, # paper eval: 5/seed
seed=0,
)
# fold() returns list[Prediction], one per diffusion sample. Each carries
# .plddt [L], .ptm, .iptm, .pae [L,L], .pair_chains_iptm, .complex.to_mmcif().
# Rank by ipTM for complexes / mean pLDDT for monomers:
best = max(results, key=lambda r: float(r.iptm if r.iptm is not None
else r.plddt.mean()))
open("pred.cif", "w").write(best.complex.to_mmcif())
Paper-faithful FoldBench settings: 10 loops, 68 sampling steps, 25 seeds
x 5 diffusion samples; rank by ipTM (complexes) or pLDDT (monomers); MSA mode
adds msa_depth=1024 with 10% column masking and ESMC dropout 0.3.
Model variants on HF biohub/
| repo | size | pair layers | MSA | use |
|---|---|---|---|---|
ESMFold2 |
0.94 GB + ccd.pkl 0.42 GB | 48 | yes | full eval |
ESMFold2-Fast |
0.76 GB | 24 | no | fast single-seq |
ESMFold2-Experimental{,-Fast} |
0.90 / 0.72 GB | 48 / 24 | — | design search (Alg 11) |
ESMFold2-Experimental{,-Fast}-Cutoff2025 |
0.90 / 0.72 GB |
FAQ
What hardware does it need?
The skill says it needs a CUDA GPU of the H100 or A100 class, and Python 3.12.
Does it need a multiple sequence alignment?
No. The skill covers a single-sequence mode as well as an alignment mode.
What license covers it?
The skill says the code and weights are MIT licensed.
Details
Original description by the author
Biohub ESMFold2 / ESMFold2-Fast all-atom co-folding (Candido et al. 2026, github.com/Biohub/esm). Single-sequence and MSA modes; protein, DNA, RNA, ligand (CCD/SMILES), modified residues. FoldBench Ab-Ag 50-55%, PPI 70-77% DockQ-pass. Also covers the ESMC-{300M,600M,6B} protein language models from the same release: masked-LM logits, hidden states, mutation scoring, contact prediction, and the SAE interpretability head. MIT-licensed weights on HuggingFace org `biohub`. Use this skill when: (1) Predicting complex structures with single-sequence input, (2) Validating designed binders with ESMFol
repo: aipoch/open-science
Popularity
- GitHub stars
- 5.4k
- Ranking position
- #14858
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
alphafold2
5.4kHelps your agent predict a protein's 3D structure from its sequence, including protein complexes, using AlphaFold2 through the ColabFold runner.
boltz
5.4kHelps your agent predict the structure of protein, DNA, RNA, and small-molecule complexes using the open-source Boltz-2 model, with optional binding affinity estimates.
borzoi
5.4kHelps your agent predict genome-wide activity tracks, such as expression and accessibility, from DNA sequence, and compare variants by their predicted effect.
chai1
5.4kHelps your agent predict the structure of protein, nucleic acid, and ligand complexes from one FASTA file, using the Apache-licensed Chai-1 model.
Similar skills
pytorch-patterns
280kHelps your agent use PyTorch for machine learning models. It applies best practices for efficient model training and ensures reproducible results.
evm-token-decimals
280kHelps your agent avoid errors with decimal numbers across different blockchain networks. It ensures token values are accurate in transactions and calculations.
ito-inference
280kLets your agent check the availability of AI models for use. It connects the compute request with the ready model service.