[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AWTH0X3MEEKNKAMG9ZZR8K":3,"skill-same:01M7AWTH0X3MEEKNKAMG9ZZR8K":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":14,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M7AWTH0X3MEEKNKAMG9ZZR8K","esmfold2",null,"Biohub ESMFold2 \u002F ESMFold2-Fast all-atom co-folding (Candido et al. 2026, github.com\u002FBiohub\u002Fesm). Single-sequence and MSA modes; protein, DNA, RNA, ligand (CCD\u002FSMILES), 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 ESMFold2-Fast, (3) Running ESMFold2 with MSA input, (4) Getting ESMC embeddings or per-residue mutation scores, (5) Choosing kernel backend and sampling-step settings for paper-faithful throughput.","flyme2bluemoon\u002Fskills","flyme2bluemoon","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F37197710?v=4","01M7AWSKCXRPGZSNS26MTB5YR4","Matthew Shen","01M7AWSKE11G83QK1885PSGJ3K",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills-examples\u002Fclaude-science-skills\u002Fesmfold2\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: esmfold2\ndescription: >\n  Biohub ESMFold2 \u002F ESMFold2-Fast all-atom co-folding (Candido et al. 2026,\n  github.com\u002FBiohub\u002Fesm). Single-sequence and MSA modes; protein, DNA, RNA,\n  ligand (CCD\u002FSMILES), modified residues. FoldBench Ab-Ag 50-55%, PPI 70-77%\n  DockQ-pass. Also covers the ESMC-{300M,600M,6B} protein language models from\n  the same release: masked-LM logits, hidden states, mutation scoring, contact\n  prediction, and the SAE interpretability head. MIT-licensed weights on\n  HuggingFace org `biohub`. Use this skill when: (1) Predicting complex\n  structures with single-sequence input, (2) Validating designed binders with\n  ESMFold2-Fast, (3) Running ESMFold2 with MSA input, (4) Getting ESMC\n  embeddings or per-residue mutation scores, (5) Choosing kernel backend and\n  sampling-step settings for paper-faithful throughput.\n\nlicense: Apache-2.0\nmetadata:\n  category: biomodels\n  requirements: [gpu]\n  display-name: ESMFold2\n  # SKILL.md body: \"**License:** MIT (code github.com\u002FBiohub\u002Fesm + weights HF\n  # `biohub\u002F*`)\"\n  # github.com\u002FBiohub\u002Fesm\u002Fblob\u002Fmain\u002FLICENSE.md: MIT (© 2026 Chan Zuckerberg\n  # Biohub, Inc.). verified 2026-06-30\n  third_party:\n    - kind: weights\n      name: ESMFold2 \u002F ESMC\n      provider: Biohub\n      license: MIT\n      terms_url: https:\u002F\u002Fgithub.com\u002FBiohub\u002Fesm\u002Fblob\u002Fmain\u002FLICENSE.md\n---\n\n# ESMFold2 (Biohub)\n\nAll-atom diffusion co-folding from the Biohub ESM release (2026). ESMFold2 =\n48 pair layers with MSA support; ESMFold2-Fast = 24 layers, single-sequence\nonly, ~1.7x faster.\n\n**License:** MIT (code github.com\u002FBiohub\u002Fesm + weights HF `biohub\u002F*`).\n**Paper:** \"Language Modeling Materializes a World Model of Protein Biology\" (2026).\n\n## Install\n\nCUDA 12.x GPU (H100\u002FA100-class); Python **3.12 only**. Fresh venv; needs\negress to HF Hub, GitHub, PyPI:\n\n```bash\npip install --no-cache-dir uv\nuv venv --python 3.12 \u002Fwork\u002Fvenv && source \u002Fwork\u002Fvenv\u002Fbin\u002Factivate\nuv pip install \\\n  \"torch>=2.5,\u003C2.8\" einops \"biotite>=1.0\" rdkit msgpack-numpy biopython \\\n  scikit-learn brotli attrs pandas cloudpathlib httpx tenacity zstd pydssp \\\n  pygtrie accelerate huggingface_hub safetensors \"numpy\u003C3\" networkx \\\n  sentencepiece tokenizers regex packaging filelock pyyaml typing_extensions \\\n  \"transformers @ git+https:\u002F\u002Fgithub.com\u002FBiohub\u002Ftransformers.git@3a8956fb4d4ea16b0ec8e71deef2c2909b6a5cbf\"\nuv pip install --no-deps \"esm @ git+https:\u002F\u002Fgithub.com\u002FBiohub\u002Fesm.git@f652b471\"\n# OPTIONAL — only affects ESMC attention; trunk speedup comes from set_kernel_backend(\"fused\")\nuv pip install ninja packaging wheel setuptools\nMAX_JOBS=8 uv pip install --no-deps --no-build-isolation \"flash-attn\u003C3\"\n# Do NOT install transformer-engine — RuntimeError (not ImportError) on import\n# slips ESMC's guard and kills ESMFold2Model import.\n```\n\nThe bundled `esmfold2_gpu` Modal env (remote-compute-modal skill) is the\ncanonical, version-pinned recipe.\n\n**Gotchas:**\n- **Default kernel backend is `None`** (reference PyTorch, ~12x slower than paper). Call `model.set_kernel_backend('fused')` after `from_pretrained()`. See section below.\n- Match torch CUDA build to your driver; the pin `\u003C2.8` targets CUDA 12.2.\n- Weights via Xet bridge ~300 MB\u002Fs: ESMFold2 1.36 GB, ESMFold2-Fast 0.76 GB. Set `HF_HOME=\u002Fwork\u002Fhf_cache`.\n\n## Usage — local model\n\n```python\nfrom esm.models.esmfold2 import (\n    ESMFold2InputBuilder, StructurePredictionInput,\n    ProteinInput, DNAInput, RNAInput, LigandInput, Modification,\n)\nfrom transformers.models.esmfold2.modeling_esmfold2 import ESMFold2Model\n\nmodel = ESMFold2Model.from_pretrained(\"biohub\u002FESMFold2\").cuda().eval()\n# or \"biohub\u002FESMFold2-Fast\" (24 layers, no MSA, ~1.7x faster)\n# or \"biohub\u002FESMFold2-Experimental{,-Fast}{,-Cutoff2025}\" (4 design-critic models)\n\nspi = StructurePredictionInput(sequences=[\n    ProteinInput(id=\"A\", sequence=target_seq),\n    ProteinInput(id=\"B\", sequence=binder_seq),\n    # DNAInput(id=\"C\", sequence=\"ACGT\", modifications=[Modification(position=5, ccd=\"C36\")]),\n    # RNAInput(id=\"D\", sequence=\"ACGU\"),\n    # LigandInput(id=\"L\", ccd=[\"SAH\"]),  # or smiles=\"...\"\n])\n# Homodimer: ProteinInput(id=[\"A\",\"B\"], sequence=seq)\n\nresults = ESMFold2InputBuilder().fold(\n    model, spi,\n    num_loops=10,             # paper FoldBench eval: 10; 20-loop variant: 20\n    num_sampling_steps=68,    # paper eval: 68 (truncated EDM)\n    num_diffusion_samples=5,  # paper eval: 5\u002Fseed\n    seed=0,\n)\n# fold() returns list[Prediction], one per diffusion sample. Each carries\n# .plddt [L], .ptm, .iptm, .pae [L,L], .pair_chains_iptm, .complex.to_mmcif().\n# Rank by ipTM for complexes \u002F mean pLDDT for monomers:\nbest = max(results, key=lambda r: float(r.iptm if r.iptm is not None\n                                        else r.plddt.mean()))\nopen(\"pred.cif\", \"w\").write(best.complex.to_mmcif())\n```\n\n**Paper-faithful FoldBench settings:** 10 loops, 68 sampling steps, 25 seeds\nx 5 diffusion samples; rank by ipTM (complexes) or pLDDT (monomers); MSA mode\nadds `msa_depth=1024` with 10% column masking and ESMC dropout 0.3.\n\n## Model variants on HF `biohub\u002F`\n\n| repo | size | pair layers | MSA | use |\n|---|---|---|---|---|\n| `ESMFold2` | 0.94 GB + ccd.pkl 0.42 GB | 48 | yes | full eval |\n| `ESMFold2-Fast` | 0.76 GB | 24 | no | fast single-seq |\n| `ESMFold2-Experimental{,-Fast}` | 0.90 \u002F 0.72 GB | 48 \u002F 24 | — | design search (Alg 11) |\n| `ESMFold2-Experimental{,-Fast}-Cutoff2025` | 0.90 \u002F 0.72 GB | — | — | design search + critic |\n| `ESMFold2-Experimental-Fast-base{300M,600M,6B}-step{250k..1500k}` | — | — | — | 15 critic ensemble |\n\n## Throughput: `set_kernel_backend(\"fused\")` is REQUIRED\n\n**Default is the slow path.** `ESMFold2Model.from_pretrained(...)` loads with\n`_kernel_backend=None` (reference PyTorch) and `chunk_size=64`. You MUST call:\n\n```python\nmodel = ESMFold2Model.from_pretrained(\"biohub\u002FESMFold2\").cuda().eval()\nmodel.set_kernel_backend(\"fused\")   # vendored Triton TriMul\u002FLN+SwiGLU\u002Fpair-bias kernels\nmodel.set_chunk_size(None)           # optimal & OOM-safe L\u003C=1024; use 256 above\n```\n\n`\"fused\"` gives ~1.5–6× trunk speedup over the reference backend, growing with\nL; end-to-end `fold()` is diffusion-bound at short L so fused breaks even\naround L≈300–400. Fused vs reference outputs are numerically consistent (pLDDT\nwithin noise). `\"fused\"` (Triton, bundled with the GPU torch wheel) is\n**inference-only** — auto-disables under backprop. Above ~L=1400\n(`chunk_size=128`) it hits illegal memory access — fall back to\n`set_kernel_backend(None)` + `set_chunk_size(64)`; validated through L=1024.\n\n**Do NOT use** `set_kernel_backend(\"cuequivariance\")`: the\n`cuequivariance-torch==0.10.0` wheel lacks the compiled ops and **silently\nfalls back** to the reference path. **`apply_torch_compile()`** is an\nalternative (NOT additive — call `set_kernel_backend(None)` first).\n\n## ESMFold2-Experimental* — design hook\n\nExperimental variants expose `res_type_soft` for gradient-guided design — see\n`references\u002Fdesign-hook.md`. Do NOT use the fused backend with them (fp32\u002Fbf16\ndtype crash; the reference path is correct).\n\n## Gotcha: cusolver SVD poison + structseq constructor\n\nThe Kabsch alignment in `modeling_esmfold2_common.py` calls\n`torch.linalg.svd(H32, driver=\"gesvd\")` on batched 3x3 matrices. NaN\u002FInf inputs\n(degenerate diffusion samples) corrupt the cusolver workspace — **all subsequent\nCUDA calls fail with \"illegal memory access\"**. Monkeypatch: redirect small\nbatched SVDs to CPU:\n\n```python\n_orig_svd = torch.linalg.svd\ndef _safe_svd(A, full_matrices=True, driver=None):\n    if A.is_cuda and A.shape[-1] \u003C= 4 and A.shape[-2] \u003C= 4:\n        Acpu = A.detach().float().cpu()\n        if not torch.isfinite(Acpu).all():\n            Acpu = torch.nan_to_num(Acpu, nan=0.0, posinf=1e6, neginf=-1e6)\n        out = _orig_svd(Acpu, full_matrices=full_matrices)\n        # torch.return_types.linalg_svd is a C structseq -> ctor takes ONE tuple.\n        return type(out)(tuple(t.to(A.device, A.dtype) for t in out))\n    return _orig_svd(A, full_matrices=full_matrices, driver=driver)\ntorch.linalg.svd = _safe_svd\n```\n\nNote `type(out)(tuple(...))`, **not** `type(out)(*(...))` — `torch.return_types.*` are\nC structseqs whose constructor takes a single tuple argument.\n\n## With-MSA mode\n\nESMFold2 supports per-chain MSA input via `ProteinInput(id, sequence, msa=MSA)`.\nThe `MSA` object lives at `esm.utils.msa.msa.MSA`:\n\n```python\nfrom esm.utils.msa.msa import MSA\n# ProteinInput, StructurePredictionInput as imported above\n\nmsa_A = MSA.from_a3m(\"\u002Fpath\u002Fchain_A.a3m\", max_sequences=2048)\nmsa_B = MSA.from_a3m(\"\u002Fpath\u002Fchain_B.a3m\", max_sequences=2048)\ninp = StructurePredictionInput(sequences=[\n    ProteinInput(id=\"A\", sequence=seq_A, msa=msa_A),\n    ProteinInput(id=\"B\", sequence=seq_B, msa=msa_B),\n])\n```\n\n**Gotchas:**\n- `MSA.from_a3m(remove_insertions=True)` asserts equal row lengths after\n  insertion removal. ColabFold a3m files often carry trailing **null bytes** and\n  off-by-one rows vs the query — `tr -d '\\000'` and force row 0 to the exact\n  query sequence (or `MSA.from_sequences` on manually cleaned, query-length rows).\n- **ESMFold2-Fast does NOT support MSA** (single-seq only).\n- With-MSA mode improves AbAg interface pass-rate per the paper's evaluation.\n\n## Paper-matched inference configuration\n\nThe paper's FoldBench protocol (section A.2.11):\n\n| Parameter | Paper default | Paper \"20lp\" | Notes |\n|---|---|---|---|\n| `num_loops` (folding-trunk recycles) | **10** | 20 | +2pp on AbAg |\n| `num_sampling_steps` (diffusion) | **68** | 68 | EDM-tuned; do **NOT** use 200 |\n| seeds x diffusion samples | 25 x 5 | 25 x 5 | Fig S6\u002FS7 oracle = best-of-125 |\n\n## Training data cutoff\n\nESMFold2 and ESMFold2-Fast both use a **Sept 2021** PDB training cutoff (HF\n`biohub\u002FESMFold2` README).\n\n## ESMC language model\n\nESMC is the Biohub successor to ESM-2; three sizes: 300M (30L), 600M (36L),\n6B (80L, d=2560). HF path: `AutoModelForMaskedLM.from_pretrained(\"biohub\u002FESMC-6B\")`.\n\n**Mask token is `\u003Cmask>`** (id 32) — use `tok.mask_token`. The native-SDK `_`\nconvention does NOT apply to the HF tokenizer: `_` is not in the vocab and\nencodes to `\u003Cunk>`, silently corrupting mutation scores.\n\nFull API, mutation scoring, SAE features, contact prediction: see\n`references\u002Fesmc.md`.\n","# ESMFold2 (Biohub)\n\nAll-atom diffusion co-folding from the Biohub ESM release (2026). ESMFold2 =\n48 pair layers with MSA support; ESMFold2-Fast = 24 layers, single-sequence\nonly, ~1.7x faster.\n\n**License:** MIT (code github.com\u002FBiohub\u002Fesm + weights HF `biohub\u002F*`).\n**Paper:** \"Language Modeling Materializes a World Model of Protein Biology\" (2026).\n\n## Install\n\nCUDA 12.x GPU (H100\u002FA100-class); Python **3.12 only**. Fresh venv; needs\negress to HF Hub, GitHub, PyPI:\n\n```bash\npip install --no-cache-dir uv\nuv venv --python 3.12 \u002Fwork\u002Fvenv && source \u002Fwork\u002Fvenv\u002Fbin\u002Factivate\nuv pip install \\\n  \"torch>=2.5,\u003C2.8\" einops \"biotite>=1.0\" rdkit msgpack-numpy biopython \\\n  scikit-learn brotli attrs pandas cloudpathlib httpx tenacity zstd pydssp \\\n  pygtrie accelerate huggingface_hub safetensors \"numpy\u003C3\" networkx \\\n  sentencepiece tokenizers regex packaging filelock pyyaml typing_extensions \\\n  \"transformers @ git+https:\u002F\u002Fgithub.com\u002FBiohub\u002Ftransformers.git@3a8956fb4d4ea16b0ec8e71deef2c2909b6a5cbf\"\nuv pip install --no-deps \"esm @ git+https:\u002F\u002Fgithub.com\u002FBiohub\u002Fesm.git@f652b471\"\n# OPTIONAL — only affects ESMC attention; trunk speedup comes from set_kernel_backend(\"fused\")\nuv pip install ninja packaging wheel setuptools\nMAX_JOBS=8 uv pip install --no-deps --no-build-isolation \"flash-attn\u003C3\"\n# Do NOT install transformer-engine — RuntimeError (not ImportError) on import\n# slips ESMC's guard and kills ESMFold2Model import.\n```\n\nThe bundled `esmfold2_gpu` Modal env (remote-compute-modal skill) is the\ncanonical, version-pinned recipe.\n\n**Gotchas:**\n- **Default kernel backend is `None`** (reference PyTorch, ~12x slower than paper). Call `model.set_kernel_backend('fused')` after `from_pretrained()`. See section below.\n- Match torch CUDA build to your driver; the pin `\u003C2.8` targets CUDA 12.2.\n- Weights via Xet bridge ~300 MB\u002Fs: ESMFold2 1.36 GB, ESMFold2-Fast 0.76 GB. Set `HF_HOME=\u002Fwork\u002Fhf_cache`.\n\n## Usage — local model\n\n```python\nfrom esm.models.esmfold2 import (\n    ESMFold2InputBuilder, StructurePredictionInput,\n    ProteinInput, DNAInput, RNAInput, LigandInput, Modification,\n)\nfrom transformers.models.esmfold2.modeling_esmfold2 import ESMFold2Model\n\nmodel = ESMFold2Model.from_pretrained(\"biohub\u002FESMFold2\").cuda().eval()\n# or \"biohub\u002FESMFold2-Fast\" (24 layers, no MSA, ~1.7x faster)\n# or \"biohub\u002FESMFold2-Experimental{,-Fast}{,-Cutoff2025}\" (4 design-critic models)\n\nspi = StructurePredictionInput(sequences=[\n    ProteinInput(id=\"A\", sequence=target_seq),\n    ProteinInput(id=\"B\", sequence=binder_seq),\n    # DNAInput(id=\"C\", sequence=\"ACGT\", modifications=[Modification(position=5, ccd=\"C36\")]),\n    # RNAInput(id=\"D\", sequence=\"ACGU\"),\n    # LigandInput(id=\"L\", ccd=[\"SAH\"]),  # or smiles=\"...\"\n])\n# Homodimer: ProteinInput(id=[\"A\",\"B\"], sequence=seq)\n\nresults = ESMFold2InputBuilder().fold(\n    model, spi,\n    num_loops=10,             # paper FoldBench eval: 10; 20-loop variant: 20\n    num_sampling_steps=68,    # paper eval: 68 (truncated EDM)\n    num_diffusion_samples=5,  # paper eval: 5\u002Fseed\n    seed=0,\n)\n# fold() returns list[Prediction], one per diffusion sample. Each carries\n# .plddt [L], .ptm, .iptm, .pae [L,L], .pair_chains_iptm, .complex.to_mmcif().\n# Rank by ipTM for complexes \u002F mean pLDDT for monomers:\nbest = max(results, key=lambda r: float(r.iptm if r.iptm is not None\n                                        else r.plddt.mean()))\nopen(\"pred.cif\", \"w\").write(best.complex.to_mmcif())\n```\n\n**Paper-faithful FoldBench settings:** 10 loops, 68 sampling steps, 25 seeds\nx 5 diffusion samples; rank by ipTM (complexes) or pLDDT (monomers); MSA mode\nadds `msa_depth=1024` with 10% column masking and ESMC dropout 0.3.\n\n## Model variants on HF `biohub\u002F`\n\n| repo | size | pair layers | MSA | use |\n|---|---|---|---|---|\n| `ESMFold2` | 0.94 GB + ccd.pkl 0.42 GB | 48 | yes | full eval |\n| `ESMFold2-Fast` | 0.76 GB | 24 | no | fast single-seq |\n| `ESMFold2-Experimental{,-Fast}` | 0.90 \u002F 0.72 GB | 48 \u002F 24 | — | design search (Alg 11) |\n| `ESMFold2-Experimental{,-Fast}-Cutoff2025` | 0.90 \u002F 0.72 GB | — | — | design search + critic |\n| `ESMFold2-Experimental-Fast-base{300M,600M,6B}-step{250k..1500k}` | — | — | — | 15 critic ensemble |\n\n## Throughput: `set_kernel_backend(\"fused\")` is REQUIRED\n\n**Default is the slow path.** `ESMFold2Model.from_pretrained(...)` loads with\n`_kernel_backend=None` (reference PyTorch) and `chunk_size=64`. You MUST call:\n\n```python\nmodel = ESMFold2Model.from_pretrained(\"biohub\u002FESMFold2\").cuda().eval()\nmodel.set_kernel_backend(\"fused\")   # vendored Triton TriMul\u002FLN+SwiGLU\u002Fpair-bias kernels\nmodel.set_chunk_size(None)           # optimal & OOM-safe L\u003C=1024; use 256 above\n```\n\n`\"fused\"` gives ~1.5–6× trunk speedup over the reference backend, growing with\nL; end-to-end `fold()` is diffusion-bound at short L so fused breaks even\naround L≈300–400. Fused vs reference outputs are numerically consistent (pLDDT\nwithin noise). `\"fused\"` (Triton, bundled with the GPU torch wheel) is\n**inference-only** — auto-disables under backprop. Above ~L=1400\n(`chunk_size=128`) it hits illegal memory access — fall back to\n`set_kernel_backend(None)` + `set_chunk_size(64)`; validated through L=1024.\n\n**Do NOT use** `set_kernel_backend(\"cuequivariance\")`: the\n`cuequivariance-torch==0.10.0` wheel lacks the compiled ops and **silently\nfalls back** to the reference path. **`apply_torch_compile()`** is an\nalternative (NOT additive — call `set_kernel_backend(None)` first).\n\n## ESMFold2-Experimental* — design hook\n\nExperimental variants expose `res_type_soft` for gradient-guided design — see\n`references\u002Fdesign-hook.md`. Do NOT use the fused backend with them (fp32\u002Fbf16\ndtype crash; the reference path is correct).\n\n## Gotcha: cusolver SVD poison + structseq constructor\n\nThe Kabsch alignment in `modeling_esmfold2_common.py` calls\n`torch.linalg.svd(H32, driver=\"gesvd\")` on batched 3x3 matrices. NaN\u002FInf inputs\n(degenerate diffusion samples) corrupt the cusolver workspace — **all subsequent\nCUDA calls fail with \"illegal memory access\"**. Monkeypatch: redirect small\nbatched SVDs to CPU:\n\n```python\n_orig_svd = torch.linalg.svd\ndef _safe_svd(A, full_matrices=True, driver=None):\n    if A.is_cuda and A.shape[-1] \u003C= 4 and A.shape[-2] \u003C= 4:\n        Acpu = A.detach().float().cpu()\n        if not torch.isfinite(Acpu).all():\n            Acpu = torch.nan_to_num(Acpu, nan=0.0, posinf=1e6, neginf=-1e6)\n        out = _orig_svd(Acpu, full_matrices=full_matrices)\n        # torch.return_types.linalg_svd is a C structseq -> ctor takes ONE tuple.\n        return type(out)(tuple(t.to(A.device, A.dtype) for t in out))\n    return _orig_svd(A, full_matrices=full_matrices, driver=driver)\ntorch.linalg.svd = _safe_svd\n```\n\nNote `type(out)(tuple(...))`, **not** `type(out)(*(...))` — `torch.return_types.*` are\nC structseqs whose constructor takes a single tuple argument.\n\n## With-MSA mode\n\nESMFold2 supports per-chain MSA input via `ProteinInput(id, sequence, msa=MSA)`.\nThe `MSA` object lives at `esm.utils.msa.msa.MSA`:\n\n```python\nfrom esm.utils.msa.msa import MSA\n# ProteinInput, StructurePredictionInput as imported above\n\nmsa_A = MSA.from_a3m(\"\u002Fpath\u002Fchain_A.a3m\", max_sequences=2048)\nmsa_B = MSA.from_a3m(\"\u002Fpath\u002Fchain_B.a3m\", max_sequences=2048)\ninp = StructurePredictionInput(sequences=[\n    ProteinInput(id=\"A\", sequence=seq_A, msa=msa_A),\n    ProteinInput(id=\"B\", sequence=seq_B, msa=msa_B),\n])\n```\n\n**Gotchas:**\n- `MSA.from_a3m(remove_insertions=True)` asserts equal row lengths after\n  insertion removal. ColabFold a3m files often carry trailing **null bytes** and\n  off-by-one rows vs the query — `tr -d '\\000'` and force row 0 to the exact\n  query sequence (or `MSA.from_sequences` on manually cleaned, query-length rows).\n- **ESMFold2-Fast does NOT support MSA** (single-seq only).\n- With-MSA mode improves AbAg interface pass-rate per the paper's evaluation.\n\n## Paper-matched inference configuration\n\nThe paper's FoldBench protocol (section A.2.11):\n\n| Parameter | Paper default | Paper \"20lp\" | Notes |\n|---|---|---|---|\n| `num_loops` (folding-trunk recycles) | **10** | 20 | +2pp on AbAg |\n| `num_sampling_steps` (diffusion) | **68** | 68 | EDM-tuned; do **NOT** use 200 |\n| seeds x diffusion samples | 25 x 5 | 25 x 5 | Fig S6\u002FS7 oracle = best-of-125 |\n\n## Training data cutoff\n\nESMFold2 and ESMFold2-Fast both use a **Sept 2021** PDB training cutoff (HF\n`biohub\u002FESMFold2` README).\n\n## ESMC language model\n\nESMC is the Biohub successor to ESM-2; three sizes: 300M (30L), 600M (36L),\n6B (80L, d=2560). HF path: `AutoModelForMaskedLM.from_pretrained(\"biohub\u002FESMC-6B\")`.\n\n**Mask token is `\u003Cmask>`** (id 32) — use `tok.mask_token`. The native-SDK `_`\nconvention does NOT apply to the HF tokenizer: `_` is not in the vocab and\nencodes to `\u003Cunk>`, silently corrupting mutation scores.\n\nFull API, mutation scoring, SAE features, contact prediction: see\n`references\u002Fesmc.md`.\n",{"name":5,"license":15,"metadata":24,"description":36},{"category":25,"third_party":26,"display-name":33,"requirements":34},"biomodels",[27],{"kind":28,"name":29,"license":30,"provider":31,"terms_url":32},"weights","ESMFold2 \u002F ESMC","MIT","Biohub","https:\u002F\u002Fgithub.com\u002FBiohub\u002Fesm\u002Fblob\u002Fmain\u002FLICENSE.md","ESMFold2",[35],"gpu","Biohub ESMFold2 \u002F ESMFold2-Fast all-atom co-folding (Candido et al. 2026, github.com\u002FBiohub\u002Fesm). Single-sequence and MSA modes; protein, DNA, RNA, ligand (CCD\u002FSMILES), 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 ESMFold2-Fast, (3) Running ESMFold2 with MSA input, (4) Getting ESMC embeddings or per-residue mutation scores, (5) Choosing kernel backend and sampling-step settings for paper-faithful throughput.\n","main","9a28ca56870fad42cc4efa04a1d487c07a561ab1","skills-examples\u002Fclaude-science-skills\u002Fesmfold2","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon","https:\u002F\u002Fflyme2bluemoon.github.io","Computer Science and Biology @ McGill University | making computer do cool thing","2026-10-31 13:32:13",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add flyme2bluemoon\u002Fskills --skill esmfold2",{"tool":51,"command":52},"bunx","bunx skills add flyme2bluemoon\u002Fskills --skill esmfold2",{"tool":54,"command":55},"pnpm","pnpm dlx skills add flyme2bluemoon\u002Fskills --skill esmfold2","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills-examples\u002Fclaude-science-skills\u002Fesmfold2\u002FSKILL.md",true,[59,65],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fdesign-hook.md","REFERENCE","参考文档",1452,"https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills-examples\u002Fclaude-science-skills\u002Fesmfold2\u002Freferences\u002Fdesign-hook.md",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fesmc.md",3052,"https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills-examples\u002Fclaude-science-skills\u002Fesmfold2\u002Freferences\u002Fesmc.md",[70,77,84,91,98,105],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":30,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7AWZ83KYJ9YSB4E5VQJ1K9B","unslop","Edit substantive human-facing prose to remove AI writing patterns while preserving meaning and tone.","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Funslop\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":30,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7AWZ4FJPVNRMFFJC6JSHHKQ","pstack-principle-type-system-discipline","Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, refuse to lie to the compiler, exhaust variants, derive from authoritative schemas.","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fpstack-principle-type-system-discipline\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":30,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7AWZ11K4KET3ASESNABPE52","pstack-principle-test-behavior-not-implementation","Apply when you write, change, or keep a test. Call the code the way its users do and assert the result they observe against a literal expected value. If the test would still pass when every imported function returns undefined, rewrite the assertion or delete the test.","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fpstack-principle-test-behavior-not-implementation\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":30,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7AWYWT47M5JG7XV6ZK6QSSX","pstack-principle-subtract-before-you-add","Apply when sequencing an addition, refactor, or rewrite. Remove dead weight, redundant validators, and stub references first, then build on the simpler base.","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fpstack-principle-subtract-before-you-add\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":30,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7AWYTNNHNGHB583NEV888BB","pstack-principle-sequence-verifiable-units","Sequence migrations or dependent changes around meaningful verification boundaries.","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fpstack-principle-sequence-verifiable-units\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":30,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7AWYQ2C15PV2W2V6ZVMK3ZM","pstack-principle-separate-before-serializing-shared-state","Apply when concurrent actors might write to the same file, branch, key, or state object. Eliminate the sharing first; serialize structurally only when one shared writer is a real invariant.","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fpstack-principle-separate-before-serializing-shared-state\u002FSKILL.md",[],[]]