# Alphafold3

> Skill for structure prediction with AlphaFold 3 (AF3) from Google DeepMind. Use this skill when a user wants to predict the structure of a protein complex with ligands, DNA, or RNA; predict protein-ligand binding poses; model protein-nucleic acid interactions; use SMILES or CCD codes to specify small molecules; parse AF3 mmCIF or confidence JSON outputs; or work with AF3's structured JSON input f…

- **Type:** Skill
- **Install:** `agentstack add skill-naity-fm4life-alphafold3`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [naity](https://agentstack.voostack.com/s/naity)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [naity](https://github.com/naity)
- **Source:** https://github.com/naity/FM4Life/tree/main/skills/alphafold3

## Install

```sh
agentstack add skill-naity-fm4life-alphafold3
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# AlphaFold 3: Biomolecular Structure Prediction

## Overview

AlphaFold 3 predicts the structure of **mixed biomolecular systems** in a single unified model:
- Proteins (including post-translational modifications)
- RNA and DNA (including modified bases)
- Small molecule ligands (via CCD codes or SMILES)
- Ions and cofactors
- Covalently modified residues

This makes AF3 the tool of choice when your system contains anything beyond a bare protein. For pure protein structure prediction, AlphaFold 2 / ColabFold remains widely used and well-benchmarked.

## ⚠️ License and Access

**AF3 is non-commercial only.** Key constraints:
- Source code: CC-BY-NC-SA 4.0 — non-commercial use only
- Model weights: separate [terms of use](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md) — must apply directly from Google; commercial use requires a separate agreement
- Outputs: subject to [output terms of use](https://github.com/google-deepmind/alphafold3/blob/main/OUTPUT_TERMS_OF_USE.md)

For commercial use, check with Google DeepMind directly.

## Access Options

### Option 1: Web Server (fastest, no install)

https://alphafoldserver.com — free, up to 20 jobs/day, no installation required. Best for:
- Exploratory work
- Single predictions
- Proteins + limited ligand set

The web server uses a slightly simplified JSON format (`alphafoldserver` dialect) and has a more limited set of ligands and covalent modifications than the local install.

### Option 2: Local Install (full capabilities)

Requires:
- Linux (Ubuntu 22.04 recommended)
- NVIDIA GPU with Compute Capability ≥ 8.0 (A100 or H100 80GB)
- ≥ 64 GB RAM
- ~1 TB disk for databases (SSD recommended)
- Model weights from Google (apply [here](https://forms.gle/svvpY4u2jsHEwWYS6))

```bash
# Clone and build Docker image
git clone https://github.com/google-deepmind/alphafold3.git && cd alphafold3
docker build -t alphafold3 -f docker/Dockerfile .

# Download databases (~600 GB download)
bash fetch_databases.sh /data/af3_databases

# Run prediction
docker run -it \
  --volume $HOME/af_input:/root/af_input \
  --volume $HOME/af_output:/root/af_output \
  --volume /data/af3_models:/root/models \
  --volume /data/af3_databases:/root/public_databases \
  --gpus all \
  alphafold3 \
  python run_alphafold.py \
    --json_path=/root/af_input/input.json \
    --model_dir=/root/models \
    --output_dir=/root/af_output
```

**Two-stage pipeline:**
- `--run_data_pipeline=true` (default) — MSA and template search, CPU-only, run separately on a compute node
- `--run_inference=true` (default) — structure prediction, requires GPU

## Input JSON Format

Unlike AF2 (FASTA input), AF3 uses a **structured JSON file** specifying every molecular entity. Each entity gets a chain ID.

### Minimal example: single protein

```json
{
  "name": "my_protein",
  "modelSeeds": [1, 2, 3],
  "sequences": [
    {
      "protein": {
        "id": "A",
        "sequence": "MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQAPILSRVGD"
      }
    }
  ],
  "dialect": "alphafold3",
  "version": 1
}
```

### Protein–ligand complex

```json
{
  "name": "kinase_atp",
  "modelSeeds": [1],
  "sequences": [
    {
      "protein": {
        "id": "A",
        "sequence": "MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQAPILSRVGD"
      }
    },
    {
      "ligand": {
        "id": "B",
        "ccdCodes": ["ATP"]
      }
    },
    {
      "ligand": {
        "id": "C",
        "ccdCodes": ["MG"]
      }
    }
  ],
  "dialect": "alphafold3",
  "version": 1
}
```

### Protein–DNA complex

```json
{
  "name": "transcription_factor",
  "modelSeeds": [1],
  "sequences": [
    {
      "protein": {
        "id": "A",
        "sequence": "MKTAYIAKQRQISFVK"
      }
    },
    {
      "dna": {
        "id": ["B", "C"],
        "sequence": "GACCTCTGAGGT"
      }
    }
  ],
  "dialect": "alphafold3",
  "version": 1
}
```

### Custom ligand via SMILES

```json
{
  "ligand": {
    "id": "B",
    "smiles": "CC(=O)Nc1ccc(O)cc1"
  }
}
```

Note: backslashes in SMILES must be escaped as `\\` in JSON.

### Homomeric complex (multiple copies of the same chain)

```json
{
  "protein": {
    "id": ["A", "B", "C"],
    "sequence": "MKTAYIAKQRQISFVK"
  }
}
```

### Post-translational modifications

```json
{
  "protein": {
    "id": "A",
    "sequence": "PVLSCGEWQL",
    "modifications": [
      {"ptmType": "SEP", "ptmPosition": 3},
      {"ptmType": "TPO", "ptmPosition": 7}
    ]
  }
}
```

See `references/input-format.md` for the full entity type reference, covalent bonds, custom MSA, and template specification.

## Building Input JSON Programmatically

```bash
python scripts/build_input.py \
  --name my_complex \
  --protein "MKTAYIAKQRQISFVK" \
  --ligand-ccd ATP MG \
  --seeds 1 2 3 \
  --output input.json
```

## Output Format

AF3 outputs **mmCIF files** (not PDB) plus JSON confidence files.

```
/
├── _model.cif                    ← best prediction (top ranking_score)
├── _confidences.json             ← full confidence arrays for best model
├── _summary_confidences.json     ← summary metrics for best model
├── _ranking_scores.csv           ← all predictions ranked
├── seed-1_sample-0/                        ← all individual predictions
│   ├── *_model.cif
│   ├── *_confidences.json
│   └── *_summary_confidences.json
└── seed-1_sample-1/  ...
```

### Key confidence metrics

| Metric | Type | Range | Interpretation |
|---|---|---|---|
| `atom_plddts` | per-atom array | 0–100 | Local confidence; >70 = reliable |
| `pae` | N×N matrix | 0–∞ Å | Relative position error; low = confident |
| `ptm` | scalar | 0–1 | Global fold confidence; >0.5 = plausible |
| `iptm` | scalar | 0–1 | Interface confidence; >0.8 = high, <0.6 = failed |
| `chain_pair_pae_min` | M×M matrix | 0–∞ Å | Inter-chain interaction confidence |
| `contact_probs` | N×N matrix | 0–1 | Probability of contact (<8 Å) |
| `ranking_score` | scalar | | `0.8×iptm + 0.2×ptm + 0.5×disorder − 100×has_clash` |

**Note:** AF3 pLDDT is per-atom (not per-residue like AF2). For proteins, mean per-residue pLDDT can be derived by averaging atoms in each residue.

See `references/outputs.md` for parsing mmCIF and confidence JSON in Python.

## AF3 vs AF2 Comparison

| | AlphaFold 2 | AlphaFold 3 |
|---|---|---|
| Input format | FASTA | JSON |
| Output format | PDB | mmCIF |
| Proteins | ✓ | ✓ |
| Protein complexes | ✓ (Multimer) | ✓ |
| RNA/DNA | ✗ | ✓ |
| Small molecule ligands | ✗ | ✓ |
| PTMs / modified bases | ✗ | ✓ |
| License | Apache 2.0 | CC-BY-NC-SA 4.0 |
| Model weights | CC BY 4.0 | Non-commercial only |
| Web server | AFDB (precomputed) | alphafoldserver.com |

## Resources

- **Web server:** https://alphafoldserver.com
- **GitHub:** https://github.com/google-deepmind/alphafold3
- **Model weights request:** https://forms.gle/svvpY4u2jsHEwWYS6
- **Paper:** Abramson et al., Nature 2024 — https://doi.org/10.1038/s41586-024-07487-w

## References

- `references/input-format.md` — full JSON schema: RNA, DNA, ligands, PTMs, covalent bonds, custom MSA, templates
- `references/outputs.md` — parsing mmCIF structures, confidence JSON, embeddings, contact probabilities

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [naity](https://github.com/naity)
- **Source:** [naity/FM4Life](https://github.com/naity/FM4Life)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-naity-fm4life-alphafold3
- Seller: https://agentstack.voostack.com/s/naity
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
