Skip to content

AlphaFold2 Format

Expected input format for tsp-maker parse af2.

Directory Structure

af2_outputs/
├── P12345/                       ← Folder name becomes protein ID
│   ├── ranking_debug.json        # Required: ranking info
│   ├── relaxed_model_1_*.pdb     # Preferred: relaxed structures
│   ├── ranked_0.pdb              # Fallback: ranked structures
│   ├── result_model_1_*.pkl      # Metrics and PAE
│   └── ...
├── Q67890/                       ← Folder name becomes protein ID
│   └── ...
└── ...

Folder Names = Protein IDs

The folder name (e.g., P12345) becomes the protein ID in your dataset. Ensure folders are named with the identifiers you want. See Protein ID Rules.

Required Files

ranking_debug.json

Contains model ranking information:

{
  "order": ["model_1_pred_0", "model_2_pred_0", ...],
  "plddts": {
    "model_1_pred_0": 85.2,
    "model_2_pred_0": 82.1,
    ...
  }
}

For multimer predictions, uses iptm+ptm instead of plddts.

Structure Files

tsp-maker looks for structures in this order:

  1. relaxed_{model_name}.pdb (preferred)
  2. ranked_{rank-1}.pdb (fallback)

Pickle Files

The result_model_*.pkl files contain:

Key Description
plddt Per-residue pLDDT array
ptm pTM score
iptm ipTM score (multimers only)
predicted_aligned_error PAE matrix

Extracted Metrics

Metric Source
plddt_mean Mean of plddt array
plddt_min Minimum plddt
plddt_median Median plddt
ptm From pkl
iptm From pkl (multimers)
ranking_score ptm or 0.8iptm + 0.2ptm
pae_mean/min/max From PAE matrix

Example Command

tsp-maker parse af2 /data/af2_outputs /intermediate --top-n 5

Output Naming

Files are named with _AF2_ suffix:

  • P12345_AF2_1.pdb
  • P12345_AF2.json
  • P12345_AF2_1.npy

ColabFold Compatibility

ColabFold outputs are compatible if they include ranking_debug.json. The parser handles both local ColabFold and Google Colab outputs.