chai1
它能做什么
这项技能教智能体如何运行 Chai-1,这是一个预测蛋白质、RNA、DNA 和小分子复合物的开源模型。它适用于抗体、结合物和配体的研究。
适用场景
- ✓当研究人员想根据 FASTA 文件预测抗体与抗原的复合物时。
- ✓当科学家想用第二个模型检验蛋白质与配体的预测结果时。
- ✓当团队需要在 GPU 上批量运行复合物预测时。
技能链接
https://github.com/aipoch/open-science/blob/main/resources/skills/chai1/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我根据这个 FASTA 文件预测抗体与其抗原的复合物,并对结果排序。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会编写一个 FASTA 文件,列出每条链或配体,然后用循环次数和采样设置运行 Chai-1,并读取排序分数。输出包括带有置信度指标的结构文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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 see | It 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 embedding |
The 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.
常见问题
它使用什么许可证?
技能说明,代码和权重采用 Apache 2.0 许可证,允许商业使用。
可以包含配体吗?
可以。配体在 FASTA 文件中以 SMILES 字符串的形式给出。
可以在循环中使用吗?
可以。技能说明,它的 Python 入口便于批量循环运行。
详情
作者的原始描述
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.
repo: aipoch/open-science
热度
- GitHub 星标
- 5.4k
- 排名
- #14852
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
alphafold2
5.4k帮你的智能体通过 ColabFold 运行器,使用 AlphaFold2 根据蛋白质序列预测其三维结构,包括蛋白质复合物。
boltz
5.4k帮你的智能体使用开源的 Boltz-2 模型预测蛋白质、DNA、RNA 和小分子复合物的结构,并可选择估算结合亲和力。
borzoi
5.4k帮你的智能体根据 DNA 序列预测全基因组的活性轨迹,例如表达和可及性,并通过预测效果比较变异。
compute-env-setup
5.4k帮你的智能体在 Open Science 的 SSH 计算主机上准备可重复使用的软件环境,让远程任务能加载所需的软件包。