agentsclimarketplace

Chai1

Skill naity/FM4Life/skills/chai1

Skills for life science foundation models — structured knowledge bundles that let AI coding agents work with ESM, AlphaFold, RFdiffusion, DiffDock, scGPT, and more out of the box.

Install
npx -y skills add naity/FM4Life --skill chai1

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

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).

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.4 KB, as published. Nobody here has run it

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 sequences
  • ligand — SMILES-encoded small molecules
  • rna — RNA sequences
  • dna — DNA sequences
  • Modified residues (e.g., phosphoserine: AAA(SEP)AAA)

Installation

pip install chai_lab==0.6.1

Requirements: 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.pqt

Key Parameters

ParameterDefaultDescription
num_trunk_recycles3Recycling iterations (more = slower, better)
num_diffn_timesteps200Diffusion denoising steps
num_diffn_samples5Structures generated per trunk sample
num_trunk_samples1Independent trunk sampling runs
use_esm_embeddingsTrueUse ESM protein language model embeddings
use_msa_serverFalseQuery ColabFold MMseqs2 server for MSA
msa_server_urlhttps://api.colabfold.comMSA server endpoint
use_templates_serverFalseFetch PDB templates from server
low_memoryTrueOffload tensors to CPU between operations
seedNoneRandom seed for reproducibility
deviceNoneTorch device (default: cuda:0)
fasta_names_as_cif_chainsFalseUse 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

MetricRangeInterpretation
aggregate_score0–1Primary ranking; combine pTM + clash + pLDDT
complex_ptm0–1Overall fold quality (>0.5 = good)
interface_ptm (ipTM)0–1Interface confidence (>0.6 = confident)
plddt per-residue0–100Local confidence (>70 = reliable)
PAE (Å)0–31Position 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; see scripts/predict.py --help

Resources

References

  • references/api-reference.md — full Python API reference, confidence metric details, restraints, covalent bonds, template handling

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.