Skip to content
Back to skills

Ai Science Alphafold Protein Design

ASecurity

AlphaFold2/3 architecture, confidence metrics (pLDDT/PAE), structure fetching, and protein design ranking workflows

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 27, 2026
data-aipythongoangulargit

Works with

  • cli

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add Pavel-Kravchenko/Bioinformatics --skill ai-science-alphafold-protein-design --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ai Science Alphafold Protein Design?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ai Science Alphafold Protein Design
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pavel-kravchenko-ai-science-alphafold-protein-design/badge)](https://www.skillsdirectory.com/skills/pavel-kravchenko-ai-science-alphafold-protein-design)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ai-science-alphafold-protein-design
description: "AlphaFold2/3 architecture, confidence metrics (pLDDT/PAE), structure fetching, and protein design ranking workflows"
tool_type: python
primary_tool: NumPy
---

# AlphaFold and Protein Design

## Key Gotchas

- **AF2 does not predict dynamics** — single static conformation, typically most stable
- **High pLDDT ≠ biologically correct** — disordered regions can predict high pLDDT if they resemble structured training data
- **PAE is directional**: PAE[i,j] asks "if residue i is placed correctly, how confident about j?" — not symmetric
- **AF2 vs AF3**: AF2 is for single proteins/homomers. AF3 handles protein-DNA, protein-RNA, protein-ligand, modified residues

## AF2 Architecture

**Inputs**: MSA representation (N_seq × L × 256) + Pair representation (L × L × 128)

**Evoformer** (48 blocks): Row-wise gated self-attention → column-wise attention → outer product mean (MSA→pair) → triangular multiplicative updates (pair→pair) → triangular attention

**Structure Module** (8 iterations): Invariant Point Attention (IPA) — attention using both scalar pair features AND local 3D point attention within each residue's rigid frame. Equivariant to global rotations/translations.

**Outputs**: 3D coordinates (all-atom), per-residue pLDDT, distogram

**AF3 changes**: Replaces Structure Module with a **Diffusion Module** generating all-atom coordinates for proteins, nucleic acids, small molecules, and ions.

## Confidence Metrics

- **pLDDT** (0–100): per-residue local confidence. >90 high, 70–90 useful, <50 often disordered
- **PAE** (angstroms): pairwise relative placement uncertainty. Low inter-domain PAE = reliable domain orientation

```python
import numpy as np
from Bio.PDB import PDBParser, Superimposer

def ca_rmsd(pdb_a: str, pdb_b: str) -> float:
    parser = PDBParser(QUIET=True)
    s1 = parser.get_structure('a', pdb_a)
    s2 = parser.get_structure('b', pdb_b)
    ca1 = [a for a in s1.get_atoms() if a.name == 'CA']
    ca2 = [a for a in s2.get_atoms() if a.name == 'CA']
    n = min(len(ca1), len(ca2))
    if n == 0:
        raise ValueError('No CA atoms found')
    sup = Superimposer()
    sup.set_atoms(ca1[:n], ca2[:n])
    return float(sup.rms)
```

## Fetching from AlphaFold DB

```python
import requests
from pathlib import Path

def fetch_alphafold_pdb(uniprot_id: str, out_dir: str = 'pdb_files'):
    out = Path(out_dir)
    out.mkdir(exist_ok=True)
    url = f'https://alphafold.ebi.ac.uk/files/AF-{uniprot_id}-F1-model_v4.pdb'
    r = requests.get(url, timeout=30)
    if r.status_code != 200:
        raise RuntimeError(f'Fetch failed: {uniprot_id} ({r.status_code})')
    path = out / f'{uniprot_id}.pdb'
    path.write_text(r.text)
    return str(path)
```

## Design Priority Ranking

Pipeline: RFdiffusion (backbones) → ProteinMPNN (sequences) → AF2/AF3 (validation)

```python
def design_priority(mean_plddt: float, interface_pae: float, seq_novelty: float) -> float:
    conf = 0.7 * (mean_plddt / 100.0) + 0.3 * (1.0 - np.clip(interface_pae / 30.0, 0, 1))
    return float(0.8 * conf + 0.2 * seq_novelty)
```

## Sources

- [Jumper et al. 2021, AlphaFold2 (Nature)](https://www.nature.com/articles/s41586-021-03819-2)
- [Abramson et al. 2024, AlphaFold3 (Nature)](https://www.nature.com/articles/s41586-024-07487-w)
- [AlphaFold repo](https://github.com/google-deepmind/alphafold) / [AF3 repo](https://github.com/google-deepmind/alphafold3)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.