dvampire/autogenesis/esmfold2-skill
Claude Code and agent skill by dvampire/autogenesis
- community
Checking that the SKILL.md file is still in the repository.
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)…
Install
npx vskill@latest install dvampire/autogenesis/esmfold2-skillSKILL.md
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:
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). Call
model.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
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 | — | — | design search + critic | |
ESMFold2-Experimental-Fast-base{300M,600M,6B}-step{250k..1500k} | — | — | — | 15 critic ensemble |
Throughput: set_kernel_backend("fused") is REQUIRED
Default is the slow path. ESMFold2Model.from_pretrained(...) loads with _kernel_backend=None (reference PyTorch) and chunk_size=64. You MUST call:
"fused" gives ~1.5–6× trunk speedup over the reference backend, growing with L; end-to-end fold() is diffusion-bound at short L so fused breaks even around L≈300–400. Fused vs reference outputs are numerically consistent (pLDDT within noise). "fused" (Triton, bundled with the GPU torch wheel) is inference-only — auto-disables under backprop. Above ~L=1400 (chunk_size=128) it hits illegal memory access — fall back to set_kernel_backend(None) + set_chunk_size(64); validated through L=1024.
Do NOT use set_kernel_backend("cuequivariance"): the cuequivariance-torch==0.10.0 wheel lacks the compiled ops and silently falls back to the reference path. `apply_torch_compile()` is an alternative (NOT additive — call set_kernel_backend(None) first).
ESMFold2-Experimental* — design hook
Experimental variants expose res_type_soft for gradient-guided design — see references/design-hook.md. Do NOT use the fused backend with them (fp32/bf16 dtype crash; the reference path is correct).
Gotcha: cusolver SVD poison + structseq constructor
The Kabsch alignment in modeling_esmfold2_common.py calls torch.linalg.svd(H32, driver="gesvd") on batched 3x3 matrices. NaN/Inf inputs (degenerate diffusion samples) corrupt the cusolver workspace — all subsequent CUDA calls fail with "illegal memory access". Monkeypatch: redirect small batched SVDs to CPU:
Note type(out)(tuple(...)), not type(out)(*(...)) — torch.return_types.* are C structseqs whose constructor takes a single tuple argument.
With-MSA mode
ESMFold2 supports per-chain MSA input via ProteinInput(id, sequence, msa=MSA). The MSA object lives at esm.utils.msa.msa.MSA:
Gotchas:
MSA.from_a3m(remove_insertions=True)asserts equal row lengths after
insertion removal. ColabFold a3m files often carry trailing null bytes and off-by-one rows vs the query — tr -d '\000' and force row 0 to the exact query sequence (or MSA.from_sequences on manually cleaned, query-length rows).
- ESMFold2-Fast does NOT support MSA (single-seq only).
- With-MSA mode improves AbAg interface pass-rate per the paper's evaluation.
Paper-matched inference configuration
The paper's FoldBench protocol (section A.2.11):
| Parameter | Paper default | Paper "20lp" | Notes | |
|---|---|---|---|---|
num_loops (folding-trunk recycles) | 10 | 20 | +2pp on AbAg | |
num_sampling_steps (diffusion) | 68 | 68 | EDM-tuned; do NOT use 200 | |
| seeds x diffusion samples | 25 x 5 | 25 x 5 | Fig S6/S7 oracle = best-of-125 |
Training data cutoff
ESMFold2 and ESMFold2-Fast both use a Sept 2021 PDB training cutoff (HF biohub/ESMFold2 README).
ESMC language model
ESMC is the Biohub successor to ESM-2; three sizes: 300M (30L), 600M (36L), 6B (80L, d=2560). HF path: AutoModelForMaskedLM.from_pretrained("biohub/ESMC-6B").
Mask token is `<mask>` (id 32) — use tok.mask_token. The native-SDK _ convention does NOT apply to the HF tokenizer: _ is not in the vocab and encodes to <unk>, silently corrupting mutation scores.
Full API, mutation scoring, SAE features, contact prediction: see references/esmc.md.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingautogenesis/skill/science/esmfold2_skill/SKILL.md
Popularity
- Repository stars
- 68
- Repository forks
- 8
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dvampire/autogenesis/esmfold2-skill)