chai1
Skill2 starsChanged 7 months agoMITView on GitHub
Skill for biomolecular structure prediction with Chai-1 from Chai Discovery. Use this skill when a user wants to predict protein structures, protein-ligand complexes, protein-nucleic acid complexes, or multi-chain biomolecular assemblies. Also trigger when the user mentions Chai-1, chai-lab, or wants an AlphaFold3/Boltz-2 alternative that supports proteins, small molecules, RNA, and DNA. Chai-1 is Apache 2.0 licensed (commercial use allowed).
- Installs packages
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 65
All entities in one file form a complex
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Chai-1: Biomolecular Structure Prediction
Overview
Chai-1 is a multimodal structure prediction model that handles proteins, small molecules, RNA, DNA, and modifications in a single unified framework. It is a direct competitor to AlphaFold 3 and Boltz-2.
Key differentiators:
- Apache 2.0 license (commercial use explicitly permitted, including drug discovery)
- Simple pip install + FASTA-like input format
- Returns PAE, PDE, pLDDT, pTM, ipTM confidence metrics
- Optional MSA server integration (ColabFold MMseqs2)
- Supports templates, restraints, and covalent bonds
Supported entity types:
protein— amino acid sequencesligand— SMILES-encoded small moleculesrna— RNA sequencesdna— DNA sequences- Modified residues (e.g., phosphoserine:
AAA(SEP)AAA)
Installation
pip install chai_lab==0.6.1Requirements: Python ≥ 3.10, Linux, CUDA GPU with bfloat16 support.
Recommended GPUs: A100 (80GB), H100 (80GB), L40S (48GB). Also works on A10, A30, RTX 4090 for smaller complexes.
Model weights download automatically on first run to ~/.chai/ (or $CHAI_DOWNLOADS_DIR).
Input Format
Chai-1 uses a FASTA-like format with entity type headers:
>protein|name=receptor
AGSHSMRYFSTSVSRPGRGEPRFIAVGYVDDTQFVRFDSDAA...
>protein|name=peptide
GAAL
>ligand|name=inhibitor
CC(=O)Nc1ccc(O)cc1
>rna|name=guide_rna
AUGCUAGCUAGC
>dna|name=template
ATGCTAGCTAG- Each entity needs a unique
name=identifier - All entities in one file form a complex
- Ligands use SMILES notation
- Modified residues use parenthetical notation:
AAA(SEP)AAA(phosphoserine at position 4)
Core Usage
Python API
from pathlib import Path
from chai_lab.chai1 import run_inference
candidates = run_inference(
fasta_file=Path("input.fasta"),
output_dir=Path("output/"),
num_trunk_recycles=3,
num_diffn_timesteps=200,
num_diffn_samples=5,
seed=42,
)
# Access results
for i, (cif_path, ranking) in enumerate(zip(candidates.cif_paths, candidates.ranking_data)):
score = ranking.aggregate_score.item()
print(f"Sample {i}: {cif_path} aggregate_score={score:.3f}")
# Confidence tensors
plddt = candidates.plddt # (num_samples, num_tokens)
pae = candidates.pae # (num_samples, num_tokens, num_tokens)
pde = candidates.pde # (num_samples, num_tokens, num_tokens)CLI
# Basic prediction (no MSA)
chai-lab fold input.fasta output_folder/
# With MSA server (more accurate)
chai-lab fold --use-msa-server input.fasta output_folder/
# With MSA + templates
chai-lab fold --use-msa-server --use-templates-server input.fasta output_folder/
# Convert a3m MSA to chai format
chai-lab a3m-to-pqt input_a3m_dir/ output.pqtKey Parameters
| Parameter | Default | Description |
num_trunk_recycles | 3 | Recycling iterations (more = slower, better) |
num_diffn_timesteps | 200 | Diffusion denoising steps |
num_diffn_samples | 5 | Structures generated per trunk sample |
num_trunk_samples | 1 | Independent trunk sampling runs |
use_esm_embeddings | True | Use ESM protein language model embeddings |
use_msa_server | False | Query ColabFold MMseqs2 server for MSA |
msa_server_url | https://api.colabfold.com | MSA server endpoint |
use_templates_server | False | Fetch PDB templates from server |
low_memory | True | Offload tensors to CPU between operations |
seed | None | Random seed for reproducibility |
device | None | Torch device (default: cuda:0) |
fasta_names_as_cif_chains | False | Use entity names as mmCIF chain IDs |
Output Format
output_folder/
├── pred.model_idx_0.cif ← best structure (mmCIF)
├── pred.model_idx_1.cif
├── ...
├── scores.model_idx_0.npz ← confidence arrays
└── msa_coverage.png ← MSA depth plot (if MSA used)Scores NPZ arrays (per candidate):
plddt— per-token pLDDT (0–100)pae— predicted aligned error matrix (N×N, Å)pde— predicted distance error matrix (N×N, Å)
SampleRanking fields (from candidates.ranking_data[i]):
aggregate_score— primary ranking metric (higher = better)ptm_scores.complex_ptm— global fold quality (0–1)ptm_scores.interface_ptm— interface confidence (0–1)plddt_scores— per-chain pLDDT
Confidence Metrics
| Metric | Range | Interpretation |
aggregate_score | 0–1 | Primary ranking; combine pTM + clash + pLDDT |
complex_ptm | 0–1 | Overall fold quality (>0.5 = good) |
interface_ptm (ipTM) | 0–1 | Interface confidence (>0.6 = confident) |
plddt per-residue | 0–100 | Local confidence (>70 = reliable) |
| PAE (Å) | 0–31 | Position error; low = confident relative placement |
For complexes, filter by interface_ptm > 0.6 as the primary criterion.
MSA Handling
By default, Chai-1 runs without MSA (fast but less accurate). For best results:
# Option 1: use server (requires internet)
candidates = run_inference(
fasta_file=Path("input.fasta"),
output_dir=Path("output/"),
use_msa_server=True,
)
# Option 2: precomputed MSA directory
candidates = run_inference(
fasta_file=Path("input.fasta"),
output_dir=Path("output/"),
msa_directory=Path("msas/"), # contains aligned.pqt files
)Scripts
scripts/predict.py— predict structures from FASTA input; seescripts/predict.py --help
Resources
- GitHub: https://github.com/chaidiscovery/chai-lab
- Paper: Chai Discovery, bioRxiv 2024 — https://doi.org/10.1101/2024.10.10.615955
- Web app: https://lab.chaidiscovery.com (no local setup required)
References
references/api-reference.md— full Python API reference, confidence metric details, restraints, covalent bonds, template handling
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- JimLiu/science-skills★ 228same name
- JonathanChan-geek/claude-science-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- alphafold3Skill
- alphafoldSkill
- boltzSkill
- diffdockSkill
- esm2Skill
- esm3Skill
- esmcSkill
- evo2Skill
- prostt5Skill
- proteinmpnnSkill
- prott5Skill
- rfdiffusionSkill
- rnafmSkill
- scgptSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

