{"id":"b7783fe9-e435-43b7-ba09-042196d45b53","shortId":"wa28qb","kind":"skill","title":"chai","tagline":"Structure prediction using Chai-1, a foundation model for molecular structure. Use this skill when: (1) Predicting protein-protein complex structures, (2) Validating designed binders, (3) Predicting protein-ligand complexes, (4) Using the Chai API for high-throughput prediction, ","description":"# Chai-1 Structure Prediction\n\n## Prerequisites\n\n| Requirement | Minimum | Recommended |\n|-------------|---------|-------------|\n| Python | 3.10+ | 3.11 |\n| CUDA | 12.0+ | 12.1+ |\n| GPU VRAM | 24GB | 40GB (A100) |\n| RAM | 32GB | 64GB |\n\n## How to run\n\n> **First time?** See [Installation Guide](../../docs/installation.md) to set up Modal and biomodals.\n\n### Option 1: Modal\n```bash\ncd biomodals\nmodal run modal_chai1.py \\\n  --input-faa complex.fasta \\\n  --out-dir predictions/\n```\n\n**GPU**: A100 (40GB) | **Timeout**: 30min default\n\n### Option 2: Chai API (recommended)\n```bash\npip install chai_lab\n\npython -c \"\nimport chai_lab\nfrom chai_lab.chai1 import run_inference\n\n# Run prediction\nrun_inference(\n    fasta_file='complex.fasta',\n    output_dir='predictions/',\n    num_trunk_recycles=3\n)\n\"\n```\n\n### Option 3: Local installation\n```bash\ngit clone https://github.com/chaidiscovery/chai-lab.git\ncd chai-lab\npip install -e .\n\nchai-lab predict \\\n  --fasta complex.fasta \\\n  --output predictions/\n```\n\n## FASTA Format\n\n### Protein complex\n```\n>binder\nMKTAYIAKQRQISFVKSHFSRQLE...\n>target\nMVLSPADKTNVKAAWGKVGAHAGE...\n```\n\n### Protein + ligand\n```\n>protein\nMKTAYIAKQRQISFVKSHFSRQLE...\n>ligand|smiles\nCCO\n```\n\n### Protein + DNA/RNA\n```\n>protein\nMKTAYIAKQRQISFVKSHFSRQLE...\n>dna\nATCGATCGATCG\n```\n\n## Key parameters\n\n| Parameter | Default | Range | Description |\n|-----------|---------|-------|-------------|\n| `num_trunk_recycles` | 3 | 1-10 | Recycles (more = better) |\n| `num_diffn_timesteps` | 200 | 50-500 | Diffusion steps |\n| `seed` | 0 | int | Random seed |\n\n## Output format\n\n```\npredictions/\n├── pred.model_idx_0.cif    # Best model (CIF format)\n├── pred.model_idx_1.cif    # Second model\n├── scores.json             # Confidence scores\n├── pae.npy                 # PAE matrix\n└── plddt.npy               # pLDDT values\n```\n\n**Note**: Chai-1 outputs CIF format. Convert to PDB if needed:\n```python\nfrom Bio.PDB import MMCIFParser, PDBIO\nparser = MMCIFParser()\nstructure = parser.get_structure(\"pred\", \"pred.model_idx_0.cif\")\nio = PDBIO()\nio.set_structure(structure)\nio.save(\"pred.model_idx_0.pdb\")\n```\n\n### Extracting metrics\n```python\nimport numpy as np\nimport json\n\n# Load scores\nwith open('predictions/scores.json') as f:\n    scores = json.load(f)\n\nplddt = np.load('predictions/plddt.npy')\npae = np.load('predictions/pae.npy')\n\nprint(f\"pLDDT: {plddt.mean():.3f}\")\nprint(f\"pTM: {scores['ptm']:.3f}\")\nprint(f\"ipTM: {scores.get('iptm', 'N/A')}\")\n```\n\n## Use cases\n\n### Binder validation\n```python\n# Predict complex with Chai\nchai-lab predict --fasta binder_target.fasta --output val/\n\n# Check ipTM > 0.5\nscores = json.load(open('val/scores.json'))\nif scores['iptm'] > 0.5:\n    print(\"Design passes validation\")\n```\n\n### Protein-ligand complex\n```python\n# FASTA with SMILES\nfasta = \"\"\"\n>protein\nMKTA...\n>ligand|smiles\nCCO\n\"\"\"\n\n# Chai handles both protein and small molecules\n```\n\n### Batch prediction\n```bash\n# Multiple sequences\nfor fasta in sequences/*.fasta; do\n    chai-lab predict \\\n        --fasta \"$fasta\" \\\n        --output \"predictions/$(basename $fasta .fasta)\"\ndone\n```\n\n## Comparison with AF2\n\n| Aspect | Chai-1 | AlphaFold2 |\n|--------|--------|------------|\n| MSA required | No | Yes |\n| Small molecules | Yes | No |\n| DNA/RNA | Yes | Limited |\n| Speed | Faster | Slower |\n| Accuracy | Comparable | Reference |\n\n## Sample output\n\n### Successful run\n```\n$ chai-lab predict --fasta complex.fasta --output predictions/\n[INFO] Loading Chai-1 model...\n[INFO] Running inference...\n[INFO] Saved 5 models to predictions/\n\npredictions/scores.json:\n{\n  \"ptm\": 0.82,\n  \"iptm\": 0.71,\n  \"ranking_score\": 0.76\n}\n```\n\n**What good output looks like:**\n- pTM: > 0.7 (confident global structure)\n- ipTM: > 0.5 (confident interface, > 0.7 for high confidence)\n- CIF files with reasonable atom positions\n\n## Decision tree\n\n```\nShould I use Chai?\n│\n├─ What are you predicting?\n│  ├─ Protein-protein complex → Chai ✓ or ColabFold\n│  ├─ Protein + small molecule → Chai ✓\n│  ├─ Protein + DNA/RNA → Chai ✓\n│  └─ Single protein only → Use ESMFold (faster)\n│\n├─ Need MSA?\n│  ├─ No / want speed → Chai ✓\n│  └─ Yes / want accuracy → ColabFold\n│\n└─ Priority?\n   ├─ Highest accuracy → ColabFold with MSA\n   ├─ Speed / no MSA → Chai ✓\n   └─ Ligand binding → Chai ✓\n```\n\n## Typical performance\n\n| Campaign Size | Time (A100) | Cost (Modal) | Notes |\n|---------------|-------------|--------------|-------|\n| 100 complexes | 30-60 min | ~$10 | Standard validation |\n| 500 complexes | 2-4h | ~$45 | Large campaign |\n| 1000 complexes | 5-8h | ~$90 | Comprehensive |\n\n**Per-complex**: ~20-40s for typical binder-target complex.\n\n---\n\n## Verify\n\n```bash\nfind predictions -name \"*.cif\" | wc -l  # Should match input count\n```\n\n---\n\n## Troubleshooting\n\n**Low pLDDT**: Increase num_trunk_recycles\n**Low ipTM**: Check chain order, interface region\n**OOM errors**: Use A100-80GB or reduce batch\n**Slow prediction**: Reduce num_diffn_timesteps\n\n### Error interpretation\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| `RuntimeError: CUDA out of memory` | Complex too large | Use A100-80GB or split prediction |\n| `KeyError: 'iptm'` | Single chain predicted | Ensure FASTA has multiple chains |\n| `ValueError: invalid SMILES` | Malformed ligand | Validate SMILES with RDKit |\n| `torch.cuda.OutOfMemoryError` | GPU exhausted | Reduce num_diffn_timesteps to 100 |\n\n---\n\n**Next**: `protein-qc` for filtering and ranking.","tags":["chai","protein","design","skills","adaptyvbio","agent-skills","claude-code","protein-design","protein-engineering"],"capabilities":["skill","source-adaptyvbio","skill-chai","topic-agent-skills","topic-claude-code","topic-protein-design","topic-protein-engineering"],"categories":["protein-design-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/adaptyvbio/protein-design-skills/chai","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add adaptyvbio/protein-design-skills","source_repo":"https://github.com/adaptyvbio/protein-design-skills","install_from":"skills.sh"}},"qualityScore":"0.513","qualityRationale":"deterministic score 0.51 from registry signals: · indexed on github topic:agent-skills · 126 github stars · SKILL.md body (5,391 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-02T12:54:48.542Z","embedding":null,"createdAt":"2026-04-18T22:10:06.789Z","updatedAt":"2026-05-02T12:54:48.542Z","lastSeenAt":"2026-05-02T12:54:48.542Z","tsv":"'-1':6,45,235,387,421 '-10':196 '-4':537 '-40':553 '-500':205 '-60':529 '-8':545 '/../docs/installation.md':74 '/chaidiscovery/chai-lab.git':148 '0':209 '0.5':325,333,451 '0.7':446,454 '0.71':436 '0.76':439 '0.82':434 '1':17,82,195 '10':531 '100':526,649 '1000':542 '12.0':56 '12.1':57 '2':24,105,536 '20':552 '200':203 '24gb':60 '3':28,138,140,194 '3.10':53 '3.11':54 '30':528 '30min':102 '32gb':64 '3f':293,299 '4':34 '40gb':61,100 '45':539 '5':428,544 '50':204 '500':534 '64gb':65 '80gb':592,618 '90':547 'a100':62,99,522,591,617 'a100-80gb':590,616 'accuraci':403,502,506 'af2':384 'alphafold2':388 'api':38,107 'aspect':385 'atcgatcgatcg':184 'atom':462 'basenam':378 'bash':84,109,143,361,562 'batch':359,595 'best':217 'better':199 'bind':515 'binder':27,168,308,558 'binder-target':557 'binder_target.fasta':320 'bio.pdb':246 'biomod':80,86 'c':115 'campaign':519,541 'case':307 'caus':605 'cco':178,351 'cd':85,149 'chai':1,5,37,44,106,112,117,120,151,157,234,314,316,352,371,386,411,420,469,478,484,487,499,513,516 'chai-lab':150,156,315,370,410 'chain':583,625,631 'check':323,582 'cif':219,237,458,566 'clone':145 'colabfold':480,503,507 'compar':404 'comparison':382 'complex':22,33,167,312,341,477,527,535,543,551,560,612 'complex.fasta':93,131,161,415 'comprehens':548 'confid':225,447,452,457 'convert':239 'cost':523 'count':572 'cuda':55,608 'decis':464 'default':103,188 'descript':190 'design':26,335 'diffn':201,600,646 'diffus':206 'dir':96,133 'dna':183 'dna/rna':180,397,486 'done':381 'e':155 'ensur':627 'error':588,602,604 'esmfold':492 'exhaust':643 'extract':264 'f':279,282,290,295,301 'faa':92 'fasta':129,160,164,319,343,346,365,368,374,375,379,380,414,628 'faster':401,493 'file':130,459 'filter':655 'find':563 'first':69 'fix':606 'format':165,214,220,238 'foundat':8 'git':144 'github.com':147 'github.com/chaidiscovery/chai-lab.git':146 'global':448 'good':441 'gpu':58,98,642 'guid':73 'h':538,546 'handl':353 'high':41,456 'high-throughput':40 'highest':505 'import':116,122,247,267,271 'increas':576 'infer':124,128,425 'info':418,423,426 'input':91,571 'input-faa':90 'instal':72,111,142,154 'int':210 'interfac':453,585 'interpret':603 'invalid':633 'io':257 'io.save':262 'io.set':259 'iptm':302,304,324,332,435,450,581,623 'json':272 'json.load':281,327 'key':185 'keyerror':622 'l':568 'lab':113,118,152,158,317,372,412 'lab.chai1':121 'larg':540,614 'ligand':32,173,176,340,349,514,636 'like':444 'limit':399 'load':273,419 'local':141 'look':443 'low':574,580 'malform':635 'match':570 'matrix':229 'memori':611 'metric':265 'min':530 'minimum':50 'mkta':348 'mktayiakqrqisfvkshfsrql':169,175,182 'mmcifpars':248,251 'modal':78,83,87,524 'modal_chai1.py':89 'model':9,218,223,422,429 'molecul':358,394,483 'molecular':11 'msa':389,495,509,512 'multipl':362,630 'mvlspadktnvkaawgkvgahag':171 'n/a':305 'name':565 'need':243,494 'next':650 'note':233,525 'np':270 'np.load':284,287 'num':135,191,200,577,599,645 'numpi':268 'oom':587 'open':276,328 'option':81,104,139 'order':584 'out-dir':94 'output':132,162,213,236,321,376,407,416,442 'pae':228,286 'pae.npy':227 'paramet':186,187 'parser':250 'parser.get':253 'pass':336 'pdb':241 'pdbio':249,258 'per':550 'per-complex':549 'perform':518 'pip':110,153 'plddt':231,283,291,575 'plddt.mean':292 'plddt.npy':230 'posit':463 'pred':255 'pred.model_idx_0.cif':216,256 'pred.model_idx_0.pdb':263 'pred.model_idx_1.cif':221 'predict':3,18,29,43,47,97,126,134,159,163,215,311,318,360,373,377,413,417,431,473,564,597,621,626 'predictions/pae.npy':288 'predictions/plddt.npy':285 'predictions/scores.json':277,432 'prerequisit':48 'print':289,294,300,334 'prioriti':504 'protein':20,21,31,166,172,174,179,181,339,347,355,475,476,481,485,489,652 'protein-ligand':30,338 'protein-protein':19,474 'protein-qc':651 'ptm':296,298,433,445 'python':52,114,244,266,310,342 'qc':653 'ram':63 'random':211 'rang':189 'rank':437,657 'rdkit':640 'reason':461 'recommend':51,108 'recycl':137,193,197,579 'reduc':594,598,644 'refer':405 'region':586 'requir':49,390 'run':68,88,123,125,127,409,424 'runtimeerror':607 'sampl':406 'save':427 'score':226,274,280,297,326,331,438 'scores.get':303 'scores.json':224 'second':222 'see':71 'seed':208,212 'sequenc':363,367 'set':76 'singl':488,624 'size':520 'skill':15 'skill-chai' 'slow':596 'slower':402 'small':357,393,482 'smile':177,345,350,634,638 'source-adaptyvbio' 'speed':400,498,510 'split':620 'standard':532 'step':207 'structur':2,12,23,46,252,254,260,261,449 'success':408 'target':170,559 'throughput':42 'time':70,521 'timeout':101 'timestep':202,601,647 'topic-agent-skills' 'topic-claude-code' 'topic-protein-design' 'topic-protein-engineering' 'torch.cuda.outofmemoryerror':641 'tree':465 'troubleshoot':573 'trunk':136,192,578 'typic':517,556 'use':4,13,35,306,468,491,589,615 'val':322 'val/scores.json':329 'valid':25,309,337,533,637 'valu':232 'valueerror':632 'verifi':561 'vram':59 'want':497,501 'wc':567 'yes':392,395,398,500","prices":[{"id":"26dc40e7-b509-4a43-b75b-6ceda2343506","listingId":"b7783fe9-e435-43b7-ba09-042196d45b53","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"adaptyvbio","category":"protein-design-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:10:06.789Z"}],"sources":[{"listingId":"b7783fe9-e435-43b7-ba09-042196d45b53","source":"github","sourceId":"adaptyvbio/protein-design-skills/chai","sourceUrl":"https://github.com/adaptyvbio/protein-design-skills/tree/main/skills/chai","isPrimary":false,"firstSeenAt":"2026-04-18T22:10:06.789Z","lastSeenAt":"2026-05-02T12:54:48.542Z"}],"details":{"listingId":"b7783fe9-e435-43b7-ba09-042196d45b53","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"adaptyvbio","slug":"chai","github":{"repo":"adaptyvbio/protein-design-skills","stars":126,"topics":["agent-skills","claude-code","protein-design","protein-engineering"],"license":"mit","html_url":"https://github.com/adaptyvbio/protein-design-skills","pushed_at":"2026-01-19T13:06:29Z","description":"Claude Code skills for protein design","skill_md_sha":"1e06ea1da17d3075ec399367e3723e6ee2bc2b51","skill_md_path":"skills/chai/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/adaptyvbio/protein-design-skills/tree/main/skills/chai"},"layout":"multi","source":"github","category":"protein-design-skills","frontmatter":{"name":"chai","license":"MIT","description":"Structure prediction using Chai-1, a foundation model for molecular structure. Use this skill when: (1) Predicting protein-protein complex structures, (2) Validating designed binders, (3) Predicting protein-ligand complexes, (4) Using the Chai API for high-throughput prediction, (5) Need an alternative to AlphaFold2.  For QC thresholds, use protein-qc. For AlphaFold2 prediction, use alphafold. For ESM-based analysis, use esm."},"skills_sh_url":"https://skills.sh/adaptyvbio/protein-design-skills/chai"},"updatedAt":"2026-05-02T12:54:48.542Z"}}