AugmentClaude
Apache-2.0SimulationML

Chai-1

Predict protein, nucleic acid, and small-molecule complex structures from FASTA sequences.

Installation

  1. Make sure Claude is on your device and in your terminal.

    Skills load from ~/.claude/skills/ when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then run claude in any terminal to verify.

    One-time setup
    npm i -g @anthropic-ai/claude-code

    Already have it? Skip ahead.

  2. Paste into Claude Code or into your terminal.

    This copies the whole skill folder into ~/.claude/skills/chai1-xuzhougeng/ — the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.

    Faster alternative (instruction-only skills)

    Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.

    Quick install (SKILL.md only)
    Sign up to copy
  3. Restart Claude Code.

    Quit and reopen Claude Code (or any other agent that loads from ~/.claude/skills/). New skills are picked up on startup.

  4. Just ask Claude.

    Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.

Prefer to read the source first? Open on GitHub.

When Claude uses it

Structure prediction for protein, nucleic-acid, and small-molecule complexes with the Chai-1 foundation model (Chai Discovery 2024, github.com/chaidiscovery/chai-lab). Reach for this skill to predict an antibody-antigen or protein-ligand complex from a single FASTA, to re-fold designed binders as an AlphaFold-multimer alternative, or to drive co-folding from Python for batched campaigns on a GPU.

What this skill does

Chai-1

Chai-1 is an all-atom diffusion co-folder in the same family as Boltz-2 and AlphaFold3: a multi-entity FASTA in, mmCIF plus pTM/ipTM/pLDDT out, with protein, RNA, DNA, and SMILES-ligand chains all first-class. It and boltz cover the same surface; running both and keeping designs that pass either is a common consensus filter, and Chai's Python entry point makes it the easier of the two to embed in a loop. Code and weights are Apache-2.0 — commercial use including drug discovery is explicitly permitted (github.com/chaidiscovery/chai-lab).

Running it

from pathlib import Path
from chai_lab.chai1 import run_inference

Path("complex.fasta").write_text("""
>protein|name=target
MVTPEGNVSLVDESLLVGVTDEDRAVRS...
>protein|name=binder
AIQRTPKIQVYSRHPAENG...
>ligand|name=cofactor
CCCCCCCCCCCCCC(=O)O
""".strip())

candidates = run_inference(
    fasta_file=Path("complex.fasta"),
    output_dir=Path("out/"),
    num_trunk_recycles=3,
    num_diffn_timesteps=200,
    seed=42,
    device="cuda:0",
    use_esm_embeddings=True,
)
print([rd.aggregate_score.item() for rd in candidates.ranking_data])

The FASTA header is >{entity_type}|name={id} with entity_type ∈ {protein, rna, dna, ligand}; ligand records carry a SMILES string as the sequence body, and modified residues are written inline as ...AAK(SEP)AAG.... From the shell the same job is chai-lab fold complex.fasta out/ --use-msa-server. Without --use-msa-server (or use_msa_server=True in Python) the model runs on ESM embeddings alone, which is faster but typically a few ipTM points behind the MSA-backed run.

output_dir receives pred.model_idx_{0..4}.cif plus a matching scores.model_idx_{N}.npz per sample with aggregate_score, ptm, iptm, per_chain_ptm, and clash flags. Rank by aggregate_score; treat iptm > 0.5 as a soft pass for an interface. The function refuses a non-empty output_dir, so clear or rotate it between calls.

Unset CHAI_DOWNLOADS_DIR fails mid-run with PermissionError on a read-only image

Chai downloads ~5 GB on the first inference call (not at install time), including its own traced ESM2-3B for the embedding path. If CHAI_DOWNLOADS_DIR is unset, the default is inside site-packages: on a read-only image that fails with a confusing PermissionError mid-run, and on a writable one it silently re-downloads ~5 GB into the container on every cold start. Export the variable to a persisted volume so the download happens once.

No-MSA mode still loads a 3 B-parameter ESM — same VRAM, not less

use_esm_embeddings=True without an MSA still loads a 3-billion-parameter language model into GPU memory alongside the trunk; it removes the MSA-server round-trip, not the VRAM cost. If you OOM, drop num_diffn_timesteps or fold fewer chains per call rather than expecting the no-MSA mode to fit a smaller card.

Errors worth recognizing

You seeIt means / do this
PermissionError under site-packages/chai_lab/...CHAI_DOWNLOADS_DIR not set on a read-only image — export it to a writable path or the pre-populated mount.
RuntimeError: CUDA out of memory during ESM embeddingThe traced ESM2-3B is loading alongside the trunk — use an 80 GB tier or split chains across calls.

Next: filter survivors on confidence/clash metrics or feed them back to proteinmpnn for the next design round.

Related skills