Cyclic BindCraft · v1.0

Designing cyclic
binders, end to end.

A modified BindCraft pipeline that closes the N- and C-termini of designed binders into a head-to-tail amide bond — porting RFpeptide's cyclization encoding onto AlphaFold2 hallucination.

Authors: Ali Tarkashvand, Amirali Roohi

Built on BindCraft v1.5.3 · Cyclization ported from RFpeptide · BSD-3-Clause

What it is

From linear binders to closed rings.

Cyclic BindCraft keeps the BindCraft pipeline intact and changes five places — the relative-position encoding, the bonded-edge feature, the termini loss, FastRelax, and the filters.

From linear to cyclic

Stock BindCraft designs linear binders of 70–150 residues by hallucinating an AlphaFold2 structure module through four backpropagation stages. Cyclic BindCraft keeps that pipeline but adds a cyclic wrap so residues 1 and L on the binder chain are seen as sequence-adjacent — mirroring RFpeptide's cyclize_relpos trick.

Cyclization, computationally

A new cyclic_reses mask, a cyclic bonded edge between residues L and 1, and a hard harmonic loss on the real amide-bond geometry (1.33 Å N–C, 3.80 Å Cα–Cα, ω = 180°) replace the soft add_termini_distance_loss hook.

Production-ready

A coordinate-constrained FastRelax with DeclareBond closes the ring chemically; CONECT records and a REMARK 470 CYCLIC line make the topology explicit on disk. Two new JSON presets, a --cyclic CLI flag, and a best-effort AfCycDesign / RF2-cyclic validator hook ship with the patch.

Why cyclic binders

Four reasons to close the ring.

Linear peptides are convenient to compute but poor drugs — they are degraded within minutes, fail to cross membranes, and pay a large entropic penalty on binding. Head-to-tail cyclization addresses all four problems at once.

Proteolytic stability

Exopeptidases require a free N- or C-terminus. A cyclic peptide has neither; endopeptidase access is further reduced by ring rigidity. Empirically, cyclic peptides show 10–100× longer serum half-lives than their linear counterparts.

Conformational preorganization

A linear peptide samples an ensemble; on binding it adopts a single conformer, paying T·ΔS_conf ≈ 1–3 kcal/mol for a 15-mer. Ring closure sharply reduces the conformational space, so the entropic cost of binding is smaller.

Entropic binding advantage

For ordered binders, ΔG = ΔH − T·ΔS. Reducing |T·ΔS_unfavorable| directly improves ΔG — the same principle as preorganization in host–guest chemistry. Apparent K_D improves by 1–3 orders of magnitude.

Oral bioavailability

Cyclic peptides can be orally bioavailable. Cyclosporin A — an 11-aa cyclic peptide with 7 N-methylations — is the canonical example. Cyclization reduces solvent-exposed polar surface and promotes the chameleonic conformer needed for passive permeation.

The pipeline

Five stages, one Python process.

Each iteration of the outer loop is one trajectory: sample a binder length → AF2 hallucination with the cyclic relative positional encoding, bonded edge, and bond loss → constrained FastRelax → ProteinMPNN → AF2 re-prediction + cyclic-aware filters.

The five-stage Cyclic BindCraft pipeline: target ingestion, cyclic AF2 hallucination, constrained FastRelax, ProteinMPNN redesign, and cyclic-aware filters.

Stage 1 — Target ingestion

load_json_settings reads three JSONs; binder_hallucination builds the AF2 model and the cyclic_reses mask via build_cyclic_reses_mask — a 1-D bool tensor True for every residue on the binder chain.

Stage 2 — Cyclic AF2 hallucination

3-stage design (design_logits → design_soft → design_pssm_semigreedy) with cyclized relpos, a cyclic bonded edge between binder residues L and 1, and a hard add_cyclic_bond_loss on the real amide-bond geometry.

Stage 3 — Constrained FastRelax

pr_relax_cyclic calls DeclareBond between res(L):C and res(1):N, adds bond-length, bond-angle, and dihedral constraints, then runs FastRelax with the chainbreak term enabled.

Stage 4 — ProteinMPNN redesign

mk_mpnn_model(weights="soluble") with fix_pos on the target + binder interface; MPNN sees a single chain B — cyclic geometry is implicit in the backbone, so MPNN needs no modification.

Stage 5 — Cyclic-aware filters

AF2 monomer re-prediction (with cyclic relpos), PyRosetta InterfaceAnalyzerMover, then run_cyclic_filters appends cyclic_NC_distance, cyclic_omega, and cyclic_CACA_distance to every design's metric dict.

Rank & stop

When #Accepted ≥ number_of_final_designs, the loop exits and writes final_design_stats.csv sorted by Average_i_pTM descending (tie-broken by closure distance when cyclic mode is active).

Deep-dive the architecture →

Stock vs. cyclic

What changed, file by file.

The patch touches nine files. When cyclic: false, the behavior is byte-for-byte identical to upstream BindCraft v1.5.3 — nothing is removed, only added.

Aspect Stock BindCraft Cyclic BindCraft
Binder topologyLinear, chain B with free N- and C-terminiCyclic, chain B with N(L)–C(1) peptide bond
Length range65–150 aa typical25–55 aa recommended
AF2 relative positional encodingStandard (linear residue index)Cyclic wrap on binder chain (RFpeptide trick)
AF2 bonded-edge feature+1 only for (i, i+1)Adds +1 for (L, 1) on binder chain
Termini lossadd_termini_distance_loss (ELU, 7 Å, off by default)add_cyclic_bond_loss (harmonic, 1.33 Å target, on)
FastRelaxMoveMap(CHI+BB, jump=off), no closureDeclareBond + bond/dihedral constraints + chainbreak
AF2 validationAF2 monomer models 1, 2 (sees linear sequence)Same AF2, with cyclic relpos applied; optional AfCycDesign / RF2-cyclic
Clash exclusionabs(res_i − res_j) == 1Adds {res_i, res_j} == {1, L} exclusion
PDB outputATOM / HETATM / MODEL / TER / END / LINKAdds CONECT + REMARK 470 CYCLIC
Filter presetdefault_filters.jsonpeptide_cyclic_filters.json with cyclic_NC_distance, cyclic_omega
Recommended presetdefault_4stage_multimer.jsonpeptide_cyclic_3stage.json
CLI flags--settings --filters --advancedAdds --cyclic, --cyclic_validator

Key features

Six surgical changes.

The whole cyclic machinery fits in ~250 lines of Python on top of stock BindCraft v1.5.3 — every change is gated by if advanced_settings.get("cyclic", False):.

Cyclic relpos patch

install_cyclic_relpos_patch monkey-patches colabdesign's AF2 model with a "pre" callback that wraps the binder's relative-position tensor by ±L — the direct port of RFpeptide's PositionalEncoding2D.forward.

Hard cyclic bond loss

add_cyclic_bond_loss replaces the soft 7 Å ELU pull with a quadratic penalty on N(1)–C(L) distance, Cα–Cα distance, and ω dihedral — targeting the real trans amide geometry (1.33 / 3.80 / 180°).

DeclareBond + constraints

declare_cyclic_bond creates the covalent N–C edge; add_cyclic_constraints adds AtomPairConstraint and DihedralConstraint (HarmonicFunc + PeriodicFunc) to lock the closing amide during FastRelax.

Cyclic-aware clash exclusion

calculate_clash_score now pre-computes the {first_res, last_res} frozenset of the binder chain and skips those atom pairs — otherwise the 1.33 Å N–C amide bond always triggers a false clash.

CONECT records on disk

clean_pdb_with_conect preserves CONECT/REMARK records and re-derives the cyclic CONECT line via cyclic_bond_conect_records — PyMOL, ChimeraX, and Rosetta now draw the cyclic bond visually.

Two new JSON presets

peptide_cyclic_3stage.json (3-stage, helix bias 0.5, 100/50/20 iters, MPNN num_seqs=20 at temp 0.05) and peptide_cyclic_filters.json (relaxed RMSD, tightened dG, three new cyclic closure gates).

~50 Lines of cyclization core
1.33 Å N–C amide bond length
25–55 aa binder range
BSD-3 Open-source license

Ready to design your first cyclic binder?

Install in ~30 minutes. Design 50 PD-L1 cyclic binders in ~4 hours on a single A100.