RSO
v1.1.3De novo protein design by relaxed sequence optimisation
Hallucinating a protein with AlphaFold usually means pushing a hard, one-hot sequence through the network and following the gradient of a loss. Relaxed sequence optimisation (RSO) optimises the sequence in a relaxed space instead.
It keeps a continuous distribution over amino acids, lets the gradient move it freely, and adds losses that steer the backbone toward compact, well-packed folds. The method comes from Frank and colleagues in the Dietz and Ovchinnikov groups (Science, 2024), and the notebook ships in the ColabDesign project (release v1.1.3).
This page covers two parts of that notebook. Unconditional generation hallucinates a backbone of a given length, with optional identical copies for a homo-oligomer. The designability test takes a backbone, samples eight sequences for it with ProteinMPNN, predicts each with AlphaFold from a single sequence, and returns how closely the prediction matches the backbone.
A backbone that many sampled sequences fold back into is called designable. To run the sequence design step on its own, see ProteinMPNN and SolubleMPNN; for hallucination with the AfDesign loss and optimiser, see AfDesign.
RSO 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 length, the copies and the iterations, and the final charge follows the measured runtime. Cost grows faster than the length. The table is for unconditional generation, where Iterations is one of 30, 50 or 100.
| Residues | 30 iterations | 50 iterations | 100 iterations |
|---|---|---|---|
| 50 | 20 | 20 | 26 |
| 100 | 28 | 37 (default) | 59 |
| 150 | 49 | 70 | 125 |
| 200 | 80 | 122 | 226 |
| 300 | 179 | 284 | 548 |
Copies multiplies the residue count, so two copies of 100 residues at 50 iterations quote 122 credits, the same as one chain of 200. The loss settings and Random seed do not change the quote.
The designability test is quoted from the number of residues of the backbone, because it predicts eight sequences once each. A backbone of 76 or 150 residues quotes the minimum, 250 residues quote 26 credits and 400 residues quote 38.
| Input | Task | Accepted | Description |
|---|---|---|---|
Backbone | Designability test | .pdb, .ent, or a PDB ID fetched from RCSB, up to 50 MiB | The backbone to test. Only the first model of the file is read. |
Unconditional generation takes no structure.
| Parameter | Type | Default | Description |
|---|---|---|---|
Task | enum | Unconditional generation | Unconditional generation or Designability test. Chosen with the Task cards above the inputs. |
Length | integer | 100 | Unconditional generation. Residues per chain. |
Copies | integer | 1 | Unconditional generation. Identical chains, 1 to 8. 1 gives a monomer. |
Iterations | integer | 50 | Unconditional generation. One of 100, 50 or 30 hallucination iterations. The manuscript standard is 100. |
Random seed | string | blank | Unconditional generation. Whole number from 0 to 4294967295. Blank draws a new seed each run. |
All-atom initialisation | boolean | off | Designability test. Initialises the AlphaFold predictions with the backbone's atom positions. |
Initial guess | boolean | off | Designability test. Uses the backbone as AlphaFold's initial guess. The notebook recommends both for larger proteins. |
| Parameter | Type | Default | Description |
|---|---|---|---|
Radius of gyration loss | boolean | on | Penalises backbones that are less compact than expected for their length. |
Radius of gyration weight | number | 0.1 | Use 0.1 below 600 residues, 0.01 for larger proteins and 0.001 near 1000 residues. Too strong a weight can cause clashes. |
Helix loss | boolean | on | Sets the helix loss weight to -0.2. |
Contact loss | boolean | on | Sets the contact loss weight to 1.0. |
Confidence loss | boolean | on | Sets the pLDDT and PAE loss weights to 0.5. |
ProteinMPNN loss | boolean | off | Experimental loss that also backpropagates through ProteinMPNN. The manuscript did not use it. |
Soluble ProteinMPNN weights | boolean | on | Uses the soluble ProteinMPNN weights for that loss. Shown when the ProteinMPNN loss is on. |
For unconditional generation the manuscript uses all the losses. The notebook suggests removing the confidence losses or raising the helix weight to increase the diversity of designs.
| File | Task | Description |
|---|---|---|
hallucination.pdb | Unconditional generation | The best backbone, with pLDDT in the B-factor column. |
sequences.fasta, scores.json | Unconditional generation | The sequence that came with the backbone and the model's log for it. |
trajectory.json, animation.html | Unconditional generation | The log of every step and the trajectory as a video. |
designability.csv | Designability test | One row per sampled sequence: mpnn (the ProteinMPNN score), plddt, ptm, pae, rmsd, dgram_cce and seq. |
final.pdb | Designability test | The AlphaFold prediction with the lowest RMSD to the backbone. |
provenance.json, run.log | Both | Settings, source release, library versions and the run log. |
The sequence of an unconditional run is a by-product. The sequence the optimiser ends on is not what the method hands to the lab; the manuscript redesigns the backbone with ProteinMPNN and tests the result, which is what the designability test does. Treat the backbone in hallucination.pdb as the product and run it through the designability test, or through ProteinMPNN and a structure predictor such as ESMFold.
The log in scores.json keeps the library's units.
plddt runs from 0 to 1. Multiply by 100 for the usual pLDDT scale, where above 90 is very high confidence and 70 to 90 is confident.pae is the predicted aligned error as a fraction of AlphaFold's 31 angstrom maximum. Multiply by 31 for angstroms, and see PAE.ptm is the predicted TM-score for the whole chain.rg is the radius of gyration of the backbone in angstroms. Lower means more compact.seq_ent is the entropy of the sequence distribution. RSO never makes the sequence one-hot, so it stays close to its maximum, which is why the sequence in sequences.fasta is only the most likely residue at each position. Do not compare it with the value from AfDesign.loss is the weighted sum the run minimised. It changes with the losses you switch on, so compare it only between runs with the same settings.Unconditional generation of 100 residues with the default settings and random seed 0 returns a backbone with plddt 0.94, pae 0.106, which is 3.3 angstroms, ptm 0.82 and rg 13.9 angstroms. The pLDDT is in the very high band and the pTM is high for a chain of this length, so AlphaFold finds the backbone plausible. That says the optimiser found a compact fold that AlphaFold likes, and does not yet say that a real sequence folds into it. The next step is to upload hallucination.pdb as the Backbone of a designability test.
In designability.csv, rmsd is the backbone RMSD between each AlphaFold prediction and the backbone you supplied, in angstroms (see RMSD). A backbone is designable when several of the eight rows combine a low rmsd with a high plddt. The method's paper judges a backbone by the best of the eight sequences, and final.pdb is that best row. There is no built-in cutoff, so set one from how much backbone error your application tolerates.
plddt runs from 0 to 1 and pae is the predicted aligned error as a fraction of AlphaFold's 31 angstrom maximum, which is multiplied by 31 in this file so it reads in angstroms (see PAE). Cysteines and methionines are removed from the sampled sequences, as in the notebook.
plddt on a hallucinated backbone is not a designability result. The optimiser was tuned to raise it.plddt as a failure on its own.RSO.ipynb. Code under the Beer-Ware licence.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.
Family-conditioned protein sequence generation from FASTA, A2M, or A3M input
Generate de novo protein sequences from plain-text prompts with sampling controls.
Design proteins from a text description
Design antibody CDRs with Proteo-R1 reasoning, diffusion, and optional framework inpainting.
Optimize protein binder, cyclic peptide and ligand binder designs with RF3, Boltz-2 and MPNN
Cyclic peptide design with AlphaFold
Learn from measured fitness and prioritize protein variants.