skills/chai/SKILL.md
Use when predicting molecular structures (proteins, nucleic acids, small molecules, and complexes) with the Chai-1 foundation model via local inference or the Chai Discovery API.
npx skillsauth add lamm-mit/scienceclaw chaiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use when the user needs to predict molecular structures — proteins, nucleic acids, small molecules, or multi-chain complexes — using the Chai-1 foundation model. Supports both local GPU inference and the Chai Discovery API for remote execution.
pip install chai-lab
from chai_lab.chai1 import run_inference
import torch
from pathlib import Path
# Single protein
results = run_inference(
fasta_file=Path("input.fasta"),
output_dir=Path("results/"),
num_trunk_recycles=3,
num_diffn_timesteps=200,
seed=42,
device=torch.device("cuda:0"),
use_esm_embeddings=True,
)
# Access results
for i, result in enumerate(results):
print(f"Model {i}: pTM={result.ptm:.3f}, ipTM={result.iptm:.3f}")
# Single chain
>protein|A
MTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPT
# Complex: separate chains with different headers
>protein|A
EVQLVESGGGLVQPGGSLRLSCAASGFTFSDYYMSWVRQAP
>protein|B
MTEYKLVVVGAGGVGKSALTIQLIQNHFVDE
# With small molecule (SMILES)
>protein|A
MTEYKLVVVGAGGVGKS...
>ligand|L
CC1=CC=C(C=C1)NC(=O)C2=CC=C(C=C2)CN3CCN(CC3)C
# RNA
>rna|R
GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUCUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCACCA
import requests
# Submit prediction job
response = requests.post(
"https://api.chaidiscovery.com/v1/predictions",
headers={"Authorization": f"Bearer {CHAI_API_KEY}"},
json={
"sequences": [
{"type": "protein", "chain_id": "A", "sequence": "MTEYKLVV..."},
{"type": "protein", "chain_id": "B", "sequence": "EVQLVES..."}
],
"num_diffn_timesteps": 200,
"num_trunk_recycles": 3,
}
)
job_id = response.json()["job_id"]
# Poll for results
import time
while True:
status = requests.get(
f"https://api.chaidiscovery.com/v1/predictions/{job_id}",
headers={"Authorization": f"Bearer {CHAI_API_KEY}"}
).json()
if status["status"] == "completed":
break
time.sleep(30)
# Download structure
structure_url = status["results"]["structure_url"]
| File | Contents |
|------|----------|
| pred.model_idx_0.cif | Top-ranked structure (CIF format) |
| pred.model_idx_0.npz | Confidence arrays (pLDDT, PAE, pDE) |
| scores.json | Aggregate scores per model |
import numpy as np
data = np.load("pred.model_idx_0.npz")
plddt = data["plddt"] # Per-residue, shape (N,)
pae = data["pae"] # N×N matrix, Angstroms
pde = data.get("pde") # Predicted Distance Error
# Interface residues (chain A = target, chain B = binder)
chain_a_len = 150 # length of chain A
interface_pae = pae[:chain_a_len, chain_a_len:].mean()
print(f"Interface PAE: {interface_pae:.2f} Å (< 10 = good)")
| Feature | Chai-1 | Boltz | AF2 | |---------|--------|-------|-----| | Speed (complex) | Fast | Medium | Slow | | Small molecules | ✓ | ✓ | ✗ | | RNA/DNA | ✓ | ✓ | ✗ | | API available | ✓ | ✗ | ✗ | | Open weights | ✓ | ✓ | ✓ | | GPU VRAM | 16 GB | 24 GB | 32 GB |
| Metric | Marginal | Good | Excellent | |--------|----------|------|-----------| | Mean pLDDT | <60 | 60–80 | >80 | | ipTM (complex) | <0.5 | 0.5–0.75 | >0.75 | | Interface PAE | >20 Å | 10–20 Å | <10 Å |
tools
Onboard and manage Paperclip AI for research-paper knowledge and agent orchestration
development
Perform AI-powered web searches with real-time information using Perplexity models via LiteLLM and OpenRouter. This skill should be used when conducting web searches for current information, finding recent scientific literature, getting grounded answers with source citations, or accessing information beyond the model knowledge cutoff. Provides access to multiple Perplexity models including Sonar Pro, Sonar Pro Search (advanced agentic search), and Sonar Reasoning Pro through a single OpenRouter API key.
testing
Generate a structured scientific PDF report from a JSON description. Accepts a JSON file specifying title, authors, abstract, sections (headings, text, tables, figures), and inline data panels (heatmap, bar, scatter, line). Produces a publication-style A4 PDF using reportlab with no LaTeX dependency. All figures are either loaded from PNG paths or generated on-the-fly from inline data.
development
Execute arbitrary Python code and return stdout. NumPy, pandas, scipy, matplotlib, and other scientific libraries are available.