Alterlab alphafold db

From NVlabs/Skill2Env · View interactive version

Alterlab alphafold db is an AI agent skill from the GitHub repository NVlabs/Skill2Env. Access 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, fo

How to use this skill

Skill file

AlphaFold Database

Overview

AlphaFold DB is a public repository of AI-predicted 3D protein structures for over 200 million proteins, maintained by DeepMind and EMBL-EBI. Access structure predictions with confidence metrics, download coordinate files, retrieve bulk datasets, and integrate predictions into computational workflows.

When to Use This Skill

This skill should be used when working with AI-predicted protein structures in scenarios such as:

Core Capabilities

Worked, copy-paste Python recipes for every capability below live in

references/code_examples.md. Load it when you need runnable code; the summaries

here give the routing and the key decisions.

1. Searching and Retrieving Predictions

Three entry points, in order of preference:

download_cif_for(...), get_structural_models_for(...) — simplest path.

the AlphaFold ID is response[0]['entryId'].

use the UniProt ID-mapping job API (get_uniprot_ids helper in

code_examples.md §1; valid db names at

https://rest.uniprot.org/configure/idmapping/fields).

2. Downloading Structure Files

The /prediction response carries version-stamped file URLs — **use those, don't

hand-build a _v{N} suffix.** The DB version advances (currently v6) and old

_v4 file URLs now 404:

Download recipe (resolve URLs from the API, write bytes) in code_examples.md §2.

3. Working with Confidence Metrics

residueNumber, confidenceScore, confidenceCategory); thresholds in

"Confidence Interpretation Guidelines" below.

one object, so index [0] before the key

(pae[0]['predicted_aligned_error']). Visualization recipe in

code_examples.md §3.

4. Bulk Data Access via Google Cloud

For proteome-scale work, pull from gs://public-datasets-deepmind-alphafold-v4/

with gsutil, or query bigquery-public-data.deepmind_alphafold.metadata to

filter by organism/confidence. The species-download helper validates the taxonomy

ID and uses list-form subprocess.run (never shell=True). See

code_examples.md §4 and references/api_reference.md (Google Cloud / BigQuery).

5. Parsing and Analyzing Structures

Parse mmCIF with Bio.PDB.MMCIFParser; pLDDT is stored in the B-factor column

(residue['CA'].get_bfactor()). Contact-map and B-factor extraction recipes in

code_examples.md §5.

6. Batch Processing Multiple Proteins

Loop accessions → predictions → confidence stats → summary DataFrame. Full

example in code_examples.md §6.

Installation and Setup

uv pip install biopython requests          # core: structure access + API
uv pip install numpy matplotlib pandas scipy  # analysis + PAE plots
uv pip install google-cloud-bigquery gsutil   # optional: bulk GCP access

3D-Beacons alternative: AlphaFold is also reachable via the 3D-Beacons

federated API (https://www.ebi.ac.uk/pdbe/pdbe-kb/3dbeacons/api/uniprot/summary/{id}.json),

filtering structures where provider == 'AlphaFold DB'. Recipe in

code_examples.md (3D-Beacons section).

Common Use Cases

Structural Proteomics

Drug Discovery

Protein Engineering

Evolutionary Studies

Key Concepts

UniProt Accession: Primary identifier for proteins (e.g., "P00520"). Required for querying AlphaFold DB.

AlphaFold ID: Internal identifier format: AF-[UniProt accession]-F[fragment number] (e.g., "AF-P00520-F1").

pLDDT (predicted Local Distance Difference Test): Per-residue confidence metric (0-100). Higher values indicate more confident predictions.

PAE (Predicted Aligned Error): Matrix indicating confidence in relative positions between residue pairs. Low values (<5 Å) suggest confident relative positioning.

Database Version: The REST API currently serves v6 (the response reports latestVersion / allVersions); the bulk GCS/BigQuery datasets lag at v4. File URLs include a version suffix (e.g., model_v6.cif) — read them from the prediction response rather than hardcoding the suffix.

Fragment Number: Large proteins may be split into fragments. Fragment number appears in AlphaFold ID (e.g., F1, F2).

Confidence Interpretation Guidelines

pLDDT Thresholds:

PAE Guidelines:

Resources

references/code_examples.md

Worked, copy-paste Python recipes for every Core Capability: prediction

retrieval (Biopython / REST / UniProt mapping), file downloads, pLDDT + PAE

analysis, GCP/BigQuery bulk access, mmCIF parsing, batch processing, and the

3D-Beacons alternative.

Load this when you need runnable code.

references/api_reference.md

Comprehensive API documentation covering:

Consult this reference for detailed API information, bulk download strategies, or when working with large-scale datasets.

Important Notes

Data Usage and Attribution

Version Management

Data Quality Considerations

Performance Tips

Additional Resources

Scripts

scripts/query_alphafold.py — runnable helper for the AlphaFold REST API (no key):

python scripts/query_alphafold.py prediction P00520
python scripts/query_alphafold.py confidence P00520 --summary
python scripts/query_alphafold.py download P00520 --fmt cif -o ./structures
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.