AfCycDesign
v1.1.3Cyclic peptide design with AlphaFold
A cyclic peptide has no free ends, but AlphaFold reads every chain as a line, so it places the first and last residues far apart. AfCycDesign changes one input to the model.
It rewrites the relative position encoding so that residue 1 and the last residue count as neighbours, and the chain closes head to tail. With that offset in place, AlphaFold can score a cyclic backbone, and the sequence can be optimised against it by gradient descent.
This page covers the AfCycDesign notebook from the ColabDesign project (release v1.1.3), published by Rettie, Bhardwaj and colleagues. It runs two protocols. Fixed backbone design searches for a sequence that AlphaFold predicts to fold into a backbone you supply.
Hallucination generates a sequence and its structure from a length alone. To predict the structure of a sequence you already have, use HighFold, the prediction counterpart that applies a related cyclic encoding to a full AlphaFold2 pipeline.
AfCycDesign is billed by the minute of runtime: 15 credits per minute on an NVIDIA T4 GPU. Completed runs are charged in proportion to elapsed time, rounded up to a whole credit, with a minimum charge of 20 credits, so a run of up to 80 seconds costs 20. A run that fails is not charged, and unused reserved credits are returned. Set a spending limit before submission.
The quote before submission is an estimate from the protocol, the number of residues and the iteration counts. The final charge follows the measured runtime. The table uses the default iterations: 300 soft, 100 temperature and 10 hard for fixed backbone design, and 50 pre-design, 50 soft, 50 temperature and 10 hard for hallucination.
| Residues | Hallucination | Fixed backbone design |
|---|---|---|
| 7 | 27 | 44 |
| 13 | 27 (default) | 44 |
| 20 | 27 | 44 |
| 30 | 27 | 44 |
| 40 | 29 | 47 |
Residues are the Peptide length for hallucination and the residues of the selected chain for fixed backbone design. Peptides are short enough that the iteration counts drive the quote more than the length. Each hard iteration costs five times as much as the others because it evaluates five AlphaFold models. Radius of gyration loss, its weight and Random seed do not change the quote.
| Input | When | Accepted | Description |
|---|---|---|---|
Peptide backbone | Fixed backbone design | .pdb, .ent, or a PDB ID fetched from RCSB, up to 50 MiB | The backbone to design a sequence for. Only the first model of the file is read. |
Hallucination takes no structure.
| Parameter | Type | Default | Description |
|---|---|---|---|
Protocol | enum | Fixed backbone design | Fixed backbone design or Hallucination. Chosen with the Task cards above the inputs. |
Chain | string | blank | Chain of the input structure to design, such as A. Blank uses every chain of the file. The notebook example uses chain A of PDB 7M28. |
Peptide length | integer | 13 | Residues to hallucinate. Required for hallucination. The notebook example designs a 13-residue peptide. |
Radius of gyration loss | boolean | off | Adds the notebook's optional radius of gyration loss during hallucination. |
Radius of gyration weight | number | 0.1 | Weight of that loss. |
Random seed | string | blank | Whole number from 0 to 4294967295. Blank draws a new seed each run. |
Both protocols optimise in stages: a soft stage that turns the sequence logits into a softmax, a temperature stage that sharpens the softmax toward one-hot, and a hard stage with one-hot sequences. Each setting is the number of iterations in that stage.
| Parameter | Type | Default | Description |
|---|---|---|---|
Soft iterations | integer | 300 for fixed backbone, 50 for hallucination | Iterations of the soft stage. |
Temperature iterations | integer | 100 for fixed backbone, 50 for hallucination | Iterations of the temperature stage. |
Hard iterations | integer | 10 | Iterations of the hard stage. The structure and sequence you receive come from the lowest-loss iteration of this stage. |
Pre-design iterations | integer | 50 | Hallucination only. Iterations of the softmax pre-design that starts from a random Gumbel-initialised sequence. |
The defaults are the values the notebook uses: the library defaults for fixed backbone design, and the notebook's own numbers for the 13-residue hallucination example.
| File | Description |
|---|---|
fixbb.pdb or hallucination.pdb | The best structure of the run, with pLDDT in the B-factor column. |
sequences.fasta | The designed sequence. |
scores.json | The model's own log for the structure you received, with the designed sequence. |
trajectory.json | The log of every optimisation step. |
trajectory.png | Fixed backbone design only. RMSD to the input and sequence identity over the run, with the soft, temperature and hard schedule beneath. |
animation.html | The trajectory as a video. |
provenance.json, run.log | Settings, source release, library versions and the run log. |
The scores in scores.json keep the library's units.
plddt runs from 0 to 1. Multiply by 100 for the usual pLDDT scale.pae is the predicted aligned error as a fraction of AlphaFold's 31 angstrom maximum. Multiply by 31 for angstroms, and see PAE for how to read it.ptm is the predicted TM-score. It is normalised by length, so it stays low for peptides of a few residues whatever the quality of the fold (see ipTM and pTM).loss is the weighted sum the optimiser minimised. For hallucination it is 1 - plddt + pae + con / 2, where con is the contact loss, plus a radius of gyration term when that loss is on. Fixed backbone design minimises dgram_cce alone. Compare losses only between runs with the same protocol and settings.rmsd and dgram_cce appear for fixed backbone design. rmsd is the backbone RMSD in angstroms between AlphaFold's output and the backbone you supplied, and dgram_cce is the cross-entropy between the two predicted distance distributions.seqid, also for fixed backbone design, is the fraction of positions where the designed residue matches the residue in your structure.The AfCycDesign paper reports pLDDT on the same 0 to 1 scale. It calls a prediction of a known cyclic peptide accurate when plddt is above 0.7 and the RMSD to the experimental structure is below 1.5 angstroms, and high confidence above 0.85. For designs it treats plddt above 0.9 as very high confidence, and the X-ray structures of eight de novo designs matched their models within 1.0 angstrom. Treat these as a starting point for ranking your own candidates, not a pass mark.
Hallucination of 13 residues with default settings and random seed 0 returns CRYLPEGSVDLSE with plddt 0.92 and pae 0.080, which is 2.5 angstroms. The pLDDT is above the paper's 0.9 mark. The loss of 0.156 is 1 - 0.92 + 0.080 plus a contact term close to zero. The ptm of 0.045 is low because of the length normalisation and does not count against the design.
Fixed backbone design for chain A of PDB 7M28, the notebook's example, with default settings and random seed 0 returns GEPGSPD with rmsd 0.37 angstroms, plddt 0.88 and seqid 0.43. The backbone is reproduced well inside 1.5 angstroms, and the pLDDT is above the 0.85 high confidence mark but under 0.9. The sequence differs from the native one at four of seven positions, which fixed backbone design allows.
plddt and a low pae only say that AlphaFold is confident in the sequence, not that the peptide is cyclic in solution or that it folds as predicted.seqid is not a failure. Many sequences can fold into one backbone, and the optimiser is not asked to recover the native one.ptm and i_ptm columns say little for peptides. i_ptm is 0 for a single chain.The ColabDesign notebooks warn that using AlphaFold as the only loss can find adversarial sequences that AlphaFold likes and that do not fold. Check a design with an independent predictor before ordering it, for example by predicting the designed sequence with HighFold.
Generate docking poses, drug-like molecules, and peptides inside protein binding pockets with PocketXMol.
Protein design by backpropagation through AlphaFold
All-atom SE(3)-equivariant diffusion for unconditional generation, motif scaffolding, and binder design.
Design all-atom protein binders with controlled target sites, lengths, and interaction parameters.
Generate de novo protein sequences from plain-text prompts with sampling controls.
Design proteins from a text description
De novo protein design by relaxed sequence optimisation
Design protein, peptide, and nanobody binders against protein or small-molecule targets.
Peptide binder design through binding interface mimicry with a latent diffusion model
Target sequence-conditioned peptide binder design using masked language modeling