alterlab-alphafold

$npx mdskill add AlterLab-IEU/AlterLab-Academic-Skills/alterlab-alphafold

Predict protein 3D structures with AlphaFold2 via ColabFold.

  • Folds monomeric or multimeric protein complexes from FASTA sequences.
  • Uses ColabFold with MMseqs2-accelerated MSAs and AlphaFold2 weights.
  • Ranks models by pLDDT, pTM/ipTM, and PAE confidence metrics.
  • Outputs predicted PDB structures and confidence scores for validation.

SKILL.md

.github/skills/alterlab-alphafoldView on GitHub ↗
---
name: alterlab-alphafold
description: Predict protein 3D structures with AlphaFold2 via ColabFold — MMseqs2-accelerated MSAs, monomer and AlphaFold2-Multimer complex folding, and confidence-based validation (pLDDT, pTM/ipTM, PAE). Use when folding a protein sequence or complex from FASTA, generating a predicted structure with confidence metrics, ranking models, or checking self-consistency of a design. For co-folding a protein WITH a small-molecule ligand or predicting binding affinity prefer alterlab-boltz; for antibody–antigen or one-FASTA multi-entity complexes prefer alterlab-chai; to LOOK UP an already-computed structure prefer alterlab-alphafold-db; for ESM embeddings or inverse folding prefer alterlab-esm. Part of the AlterLab Academic Skills suite.
license: MIT
allowed-tools: Read Write Edit Bash(python:*) Bash(uv:*)
compatibility: "Runs via ColabFold (`colabfold_batch`; install `colabfold[alphafold]` — TODO(verify) exact pin) under `uv run python`. Requires a CUDA GPU for folding (JAX/CUDA); the MSA step uses the hosted MMseqs2 API by default or a local database. AF2 network weights are downloaded once and cached (~several GB). Dispatch heavy runs via alterlab-remote-compute."
metadata:
    skill-author: AlterLab
    version: "1.0.0"
---

# AlphaFold (via ColabFold)

## Overview

Predict a protein's 3D structure from its amino-acid sequence with **AlphaFold2**, run through
**ColabFold** (Mirdita et al., *Nature Methods* 2022) — which replaces AlphaFold's slow
genetic-database MSA search with the fast **MMseqs2** API, making folding practical on a
single GPU. Handles single chains (monomer) and complexes via **AlphaFold2-Multimer** (Evans
et al. 2021), and reports per-residue and per-interface **confidence metrics** so you know
which parts of a prediction to trust.

This skill **runs** folding and returns structures + confidence. To retrieve an
*already-computed* AlphaFold prediction for a known UniProt entry without running anything,
use `alterlab-alphafold-db` instead.

## When to Use This Skill

Use this skill when the user wants to:
- Fold a protein sequence (FASTA) into a predicted 3D structure (PDB/mmCIF).
- Predict a protein **complex** (AF2-Multimer) and score the interface (ipTM).
- Rank multiple models and read confidence (pLDDT, pTM, PAE) to judge reliability.
- Validate a designed sequence by refolding it and checking self-consistency vs. a target.

### Does NOT Trigger

| Scenario | Use instead |
|----------|-------------|
| Co-fold a protein **with a ligand** (SMILES/CCD) or predict binding affinity | `alterlab-boltz` |
| Antibody–antigen / arbitrary multi-entity complex from one FASTA | `alterlab-chai` |
| Look up a **precomputed** AlphaFold model by UniProt id | `alterlab-alphafold-db` |
| ESM embeddings, inverse folding, generative design | `alterlab-esm` |
| Dock a ligand into an existing structure | `alterlab-diffdock` |
| De-novo backbone generation | `alterlab-rfdiffusion` |

## Core Capabilities

### 1. Monomer folding

```bash
# One sequence per FASTA record; MSAs via the hosted MMseqs2 API (--msa-mode)
colabfold_batch input.fasta out/ --num-models 5 --num-recycle 3
```

Outputs per record: ranked `*_relaxed_rank_001_*.pdb`, a JSON with `plddt`/`pae`, and
coverage/pLDDT plots. `TODO(verify)` exact flag names against your installed ColabFold.

### 2. Complex folding (AF2-Multimer)

Join chains with a colon in one FASTA record to fold a complex:

```text
>my_complex
MKT...AAA:MSE...GGG
```

```bash
colabfold_batch complex.fasta out/ --model-type alphafold2_multimer_v3
```

Read **ipTM** (interface confidence) and the inter-chain **PAE** block to judge whether the
predicted interface is meaningful, not just the intra-chain pLDDT.

### 3. Confidence and validation

| Metric | Reads |
|--------|-------|
| **pLDDT** (0–100, per residue) | local confidence; <50 = likely disordered/unreliable |
| **pTM** | global fold confidence |
| **ipTM** | interface confidence (complexes) — the number that matters for binding |
| **PAE** | expected positional error between residue pairs; low off-diagonal = confident relative orientation |

**Self-consistency check** (validating a design): fold the candidate, then compare to the
intended backbone (e.g. TM-score / RMSD). A design that folds back to its target with high
pLDDT and low PAE is self-consistent — the standard acceptance gate in a
design→fold→score loop (see `alterlab-proteinmpnn`, `alterlab-rfdiffusion`).

### 4. Running on a GPU

Folding needs a CUDA GPU. For anything beyond a quick monomer, dispatch through
`alterlab-remote-compute` (SLURM or a managed GPU provider): submit `colabfold_batch`, poll
to completion, and harvest `out/`.

## Resources

- `references/colabfold_usage.md` — install/pinning, MSA modes (API vs. local DB), templates,
  relaxation, batch/array runs, and full metric interpretation. Loaded on demand.

Part of the AlterLab Academic Skills suite.

More from AlterLab-IEU/AlterLab-Academic-Skills

SkillDescription
alterlab-abm-mesaBuilds agent-based models of social systems with Mesa 3 — the current AgentSet API (model.agents.shuffle_do('step'), auto-assigned unique_id, mandatory super().__init__(seed=...)), cell spaces (mesa.discrete_space OrthogonalMooreGrid / classic mesa.space grids), the DataCollector, batch_run parameter sweeps, and SolaraViz — for emergence, segregation, diffusion, opinion dynamics, and cooperation models. It uses the Mesa 3.x API (the old mesa.time schedulers like RandomActivation are removed) and treats the model as a generative theory to be validated, not just run. Use when the request mentions an agent-based model, Mesa, simulating interacting agents, or emergent macro behavior from micro rules. For discrete-event (queueing/process) simulation prefer alterlab-simpy; for reinforcement learning prefer alterlab-stable-baselines3. Part of the AlterLab Academic Skills suite.
alterlab-academic-careerPrepares academic career documents and professional-development materials for faculty and researchers. Use when drafting academic CVs, research statements, teaching philosophies, diversity statements, faculty-position cover letters, tenure dossiers, promotion narratives, academic portfolios, or mentorship statements, and when planning conference-networking strategy, building academic web presence, setting up ORCID profiles, or understanding impact metrics. Part of the AlterLab Academic Skills suite.
alterlab-accreditation-aolScaffolds program-level Assurance-of-Learning (AoL) documentation for AACSB (2020 Standard 5) and ABET (Criterion 3 Student Outcomes, Criterion 4 Continuous Improvement) accreditation — program learning outcomes / competency goals, curriculum-to-outcome mapping matrices, direct- and indirect-assessment plans, rubric design, and closing-the-loop continuous-improvement narratives — and validates the structure of an outcome-mapping matrix with scripts/aol_matrix.py. Use when the user needs AACSB or ABET assurance-of-learning material, a program-learning-outcomes set, a curriculum/outcome map or coverage matrix, a direct/indirect assessment plan, a closing-the-loop report, or accreditation self-study text. For single-course design or course rubrics prefer alterlab-teaching-design; for post-award grant reports prefer alterlab-grant-reporting. Part of the AlterLab Academic Skills suite.
alterlab-adaptyvSubmits and tracks protein-testing experiments on the Adaptyv Bio Foundry cloud lab (wet-lab validation), and optimizes protein sequences before submission with computational tools (NetSolP, SoluProt, SolubleMPNN, ESM). Use when designing proteins that need wet-lab validation - binding/affinity screening, expression testing, thermostability, or fluorescence assays - or when submitting experiments to the Foundry API, browsing the target catalog, tracking experiment status, retrieving results, or pre-screening sequences for solubility/expression. Triggers on "Adaptyv", "Foundry API", "cloud lab", "biolayer interferometry / BLI", "wet-lab validation". Part of the AlterLab Academic Skills suite.
alterlab-aeonRuns time series machine learning with the aeon library — classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search via scikit-learn compatible APIs. Use when working with temporal data, sequential patterns, or time-indexed observations (univariate or multivariate) that need specialized algorithms beyond standard ML approaches. Part of the AlterLab Academic Skills suite.
alterlab-akademik-tesvikComputes the annual Turkish academic-incentive (akademik teşvik) score for Devlet (state) university öğretim elemanı (academic staff) from a classified activity list, applying the verified Akademik Teşvik Ödeneği Yönetmeliği (2018/11834) Faaliyet Hesaplama Tablosu headline puanları (Proje 20, Araştırma 15, Yayın 30, Patent 30, Atıf 30, Tebliğ 20, Ödül 20) with the k (author-count), p (Q1 1/Q2 0.8/Q3 0.5/Q4 0.25), and r (project-role) coefficients via türü puanı = Σ(faaliyet oranları) × headline (MADDE 8/2), then enforcing the per-type headline ceilings, the 100 cap (MADDE 8/3), and the net-30 payment gate (MADDE 10/3) in a deterministic scripts/tesvik_score.py. Use when the user wants to calculate akademik teşvik puanı, check the en az 30 (net-30) threshold, apply TABLO 4 ceilings, or estimate teşvik eligibility; keeps its coefficients separate from doçentlik scoring. For doçentlik point eligibility prefer alterlab-docentlik-eligibility. Part of the AlterLab Academic Skills suite.
alterlab-alpha-vantageAccesses real-time and historical stock market data, forex rates, cryptocurrency prices, commodities, economic indicators, and 50+ technical indicators via the Alpha Vantage API (requires a free API key from alphavantage.co). Use when fetching stock prices (OHLCV), company fundamentals (income statement, balance sheet, cash flow), earnings, options data, market news/sentiment, insider transactions, GDP, CPI, treasury yields, gold/silver/oil prices, Bitcoin/crypto prices, forex exchange rates, or calculating technical indicators (SMA, EMA, MACD, RSI, Bollinger Bands). Part of the AlterLab Academic Skills suite.
alterlab-alphafold-dbAccess the AlphaFold DB of 200M+ AI-PREDICTED protein structures — retrieve models by UniProt accession, download PDB/mmCIF files, and analyze prediction confidence metrics (pLDDT, PAE). Use when a UniProt ID needs a computationally predicted 3D structure or when no experimental structure exists, for homology modeling, protein engineering, or structure-based drug discovery; for EXPERIMENTALLY determined structures (X-ray, cryo-EM, NMR) prefer alterlab-pdb, and for protein sequences, annotations, or accession ID mapping prefer alterlab-uniprot instead. Part of the AlterLab Academic Skills suite.
alterlab-anndataBuild, slice, concatenate, read, and write AnnData annotated data matrices (obs, var, X, layers, obsm, uns) — the scverse data STRUCTURE, not an analysis pipeline. Use when creating or wrangling .h5ad/zarr files, managing cell and gene annotations, concatenating batches, or handling layers/obsm/backed-mode; for the QC, normalization, clustering, UMAP, and differential-expression analysis pipeline prefer alterlab-scanpy instead, and for RNA velocity from spliced/unspliced layers prefer alterlab-scvelo instead. Part of the AlterLab Academic Skills suite.
alterlab-apertaDrives TÜBİTAK Açık Bilim Politikası (Open Science Policy) compliance and deposition into Aperta — TÜBİTAK ULAKBİM's national open archive at aperta.ulakbim.gov.tr — encoding the binding mandates (green-road deposit of the accepted manuscript on acceptance; open access within 6 months for fen/mühendislik (STEM) and 12 months for sosyal/beşeri (SSH); İlke-6 documentation when data must stay closed for KVKK/privacy reasons) and scaffolding a TÜBİTAK Veri Yönetim Planı / VYP (data management plan) at grant-application time. Use when depositing to Aperta, complying with the TÜBİTAK açık bilim policy, preparing a TÜBİTAK data management plan (VYP), reporting open-access compliance in a final report, or documenting a justified data embargo. For Zenodo/Dryad/OSF and international DMPs prefer alterlab-open-science; for the KVKK lawful-basis/anonymisation plan prefer alterlab-kvkk-dmp. Part of the AlterLab Academic Skills suite.