AfCycDesign Binder Design
Optimise a cyclic binder directly through AlphaFold, then judge it on an independent re-prediction.
Table of contents
- Overview
- Install
- Key parameters
- Judge on re-predicted metrics only
- Batched design
- Multi-target campaigns
- Visualisation
- Full protocol
Overview
Seven stages:
- Validate target — check the input PDB and identify chains
- Submit binder design — AF2-guided optimisation, with optional hotspot targeting
- Monitor progress — poll the job; expect a 2–5 minute JAX compilation delay on the first run
- Collect results — PDB, logs, metadata,
output_metrics.json - Analyse — parse sequences and metrics into a summary CSV
- Re-predict complexes — AF-multimer with six recycles per design, for iPAE and an unbiased pLDDT (~90 s/design)
- Visualise — six publication-quality figures from the re-predicted table
Install
cpskill install binder_design_afcycdesign
This installs afcycdesign_mcp.
claude
> /binder-design-afcycdesign
Key parameters
| Parameter | Default | Notes |
|---|---|---|
optimizer |
pssm_semigreedy |
Recommended; 3stage runs 120 logits + 60 soft + 10 hard iterations |
binder_len |
8–16 | |
num_designs |
1 | Above 1 uses the batched fast path |
seed |
— | Required when num_designs > 1 |
num_recycles |
0 | Design-time recycles |
ipae_threshold |
0.15 | 0.11 for a strict run |
Chain convention: target is chain A, binder is chain B — the opposite of RFpeptides output.
Judge on re-predicted metrics only
Design-time pLDDT and iPAE are the optimiser’s objective function. They are optimistic by construction and cannot be used to classify a design. Classify on the stage 6 re-prediction.
Composite score on re-predicted values:
0.50 * pLDDT + 0.50 * (1 - iPAE)
Nested classification:
| Class | pLDDT | iPAE |
|---|---|---|
| Excellent | > 0.90 | < 0.11 |
| Good | > 0.85 | < 0.15 |
| Acceptable | > 0.70 | < 0.30 |
Batched design
Set num_designs > 1 and the AlphaFold model is built once per job rather than once per design. Seeds run seed … seed+num_designs-1, and output_file is treated as a directory.
Measured on an A100 — PCSK9 crop (107 residues), 14-mer binder, 10 designs:
| Mode | s/design | vs baseline |
|---|---|---|
| One process per design, no XLA cache | 241.7 | baseline |
| One process per design, XLA cache | 169 | −30% |
| Batched + XLA cache | 143 | −41% |
Output is bit-identical to one-process-per-design: same sequence, same pLDDT/iPAE/iPTM/pTM/i_con/loss, every atom to 0.0 Å.
The two savings are independent and compose. The persistent XLA compilation cache ($CYCPEP_JAX_CACHE) amortises compilation across processes and across targets; batching amortises model construction within one (target, binder_len) pair, which is the unit a model is built for. Changing either the target or the binder length needs a new process.
Constraints: binder_seq is unsupported with num_designs > 1, and an explicit seed is required.
Multi-target campaigns
Drive several targets from one JSON spec:
python workflow-skills/scripts/afcycdesign/batch_design_runner.py \
--spec campaign.json --container <container_id> --dry-run
{
"output_dir": "designs",
"chunk": 25,
"gpus": [0, 1],
"targets": {
"my_target": {
"pdb": "targets/my_target.pdb",
"chain": "A",
"hotspots": [12, 15, 19],
"lengths": [14, 16],
"n_per_length": 500,
"seed_base": 10000
}
}
}
The driver chunks work by (target, binder_len), spreads chunks over the available GPUs, writes one record per design, and resumes by skipping designs that already have a record. Seeds are seed_base + binder_len*1000 + index, unique across lengths as long as n_per_length stays under 1000. Run --dry-run first to see the chunk plan.
Visualisation
python workflow-skills/scripts/afcycdesign/afcycdesign_viz.py <results_dir> [--merged]
Six panels: pLDDT, iPAE, their scatter, the ranking, a metrics table and iPTM.