Generating proteins with computationally predicted functions and multiple states via multimodal diffusion
In particular, we define a corruption schedule α t , t ∈ [0, 1] such that α 0 = 1, α 1 = 0 monotonically decreasing and a noising process p t∣s (x t ∣x s ) = Cat(x t ; (α t /α s )x s + (1 − α t /α s )π) for t > s. This generates noisy marginals \({p}_{t}({{\bf{x}}}_{t})={{\rm\sum }}_{{{\bf{x}}}_{0}}\mathrm{Cat}({{\bf{x}}}_{t};{\alpha }_{t}{{\bf{x}}}_{0}+(1-{\alpha }_{t}){\pmb{\uppi }})p({{\bf{x}}}_{0})\). ProDiT then outputs via two linear heads a structural output for continuous structural diffusion and classifier logits for discrete sequence diffusion. In all modalities, we sample generations of length L using L model forward passes. Multistate designThe objective of our multistate design protocol is to sample a single sequence x that folds into two distinct structures, x 1 , x 2 , supporting functional motifs m 1 , m 2 , respectively. The starting structures in the simulations were the Chai-1 predicted structures of the design in its unbound and calcium-bound states.
Multimodal diffusion
ProDiT models protein sequence as strings in the discrete amino acid vocabulary s ∈ [1, 20]L, where L denotes protein sequence length, and Cα protein structure as an element of Euclidean space \({\bf{x}}\in {{{{\mathbb{R}}}}}^{3L}\). The model learns to generate the data distribution by reversing noising processes defined directly on these spaces (that is, without tokenization or embedding); as such, its training and inference formulations invoke both continuous and discrete diffusion, described below. Our training loss is a weighted combination of the structure and sequence losses, \({\mathscr{ \mathcal L }}={{\mathscr{ \mathcal L }}}_{\mathrm{struct}}+3{{\mathscr{ \mathcal L }}}_{\mathrm{seq}}\).
Continuous diffusion
In diffusion modelling of continuous data \({\bf{x}}\in {{\mathbb{R}}}^{d}\), where d is the dimensionality of the data, the data distribution p data is corrupted under a forward diffusion process dx = f(x, t) dt + g(t) dw where t ∈ [0, T] is the diffusion time with T representing the final time (pure noise), f(x, t) is the drift coefficient, g(t) is the diffusion coefficient and w is Brownian motion. This generates a time-evolving density p t (x) with initial conditions p 0 = p data and p T close to Gaussian. The diffusion process can be simulated in reverse via \(d{\bf{x}}=[-f({\bf{x}},t)+{g}^{2}(t)
abla \log {p}_{t}({\bf{x}})]\,dt+g(t)\,d\bar{{\bf{w}}}\) with use of the so-called score \({\rm
abla }\mathrm{log}{p}_{t}({{\bf{x}}}_{t})\) (refs. 40,41). We approximate \({\rm
abla }\mathrm{log}{p}_{t}({{\bf{x}}}_{t})\) with a neural network s θ (x), where θ denotes the learnable parameters of the network, by minimizing the MSE denoising score matching objective \({{\mathbb{E}}}_{{{\bf{x}}}_{0},{{\bf{x}}}_{t}}[| | {s}_{\theta }({\bf{x}},t)-{{\rm
abla }}_{{{\bf{x}}}_{t}}\mathrm{log}{p}_{t| 0}({{\bf{x}}}_{t}| {{\bf{x}}}_{0})| | ]\) for all t. To apply diffusion modelling to protein structure, we take n = 3L and x to be the zero-mean coordinates of the Cα atoms. We adapt, with minor notational modifications, the parameterization of ref. 42: \(f({\bf{x}},t)=\)\(0,g(t)=\sqrt{2t}\) such that \({p}_{t| 0}({{\bf{x}}}_{t}| {{\bf{x}}}_{0})={{ \mathcal N }}({{\bf{x}}}_{t};\mu ={{\bf{x}}}_{0},\varSigma ={t}^{2}{{\bf{I}}}_{n})\), where µ denotes the mean, Σ the covariance and Ι the identity matrix. We then define time rescaling
$${t}^{{\prime} }=\frac{{t}^{1/p}-{t}_{\min }^{1/p}}{{t}_{\max }^{1/p}-{t}_{\min }^{1/p}}$$ (1)
with t min = 0.05 Å, t max = 160 Å, p = 7 and train for times \({t}^{{\prime} }\in [0,1]\). That is, the neural network is trained to remove Gaussian noise ranging from σ = 0.05 Å to σ = 160 Å. The neural network score model is parameterized with post-conditioning, that is
$${{\bf{s}}}_{\theta }({\bf{x}},t)=\frac{1}{{t}^{2}}\left[\frac{t\times {t}_{\mathrm{data}}}{\sqrt{{t}_{\mathrm{data}}^{2}+{t}^{2}}}\,{f}_{\theta }({\bf{x}},t)-\frac{{t}^{2}}{{t}_{\,\mathrm{data}}^{2}+{t}^{2}}\,{\bf{x}}\right]$$ (2)
where t data = 15 Å and f θ (x, t) is the neural network. We observe that in the limit of t → 0 we have s θ (x, t) ≈ f θ (x, t)/t and in the limit of t → ∞ we have s θ (x, t) ≈ (t data f θ (x, t) − x)/t2. Hence, the network interpolates between predicting the score and predicting the clean data.
Our final structure training loss is then
$${\mathcal{L}}_{\mathrm{struct}}={{\mathbb{E}}}_{{t}^{{\prime}}\sim{U}[0,1],{{\bf{x}}}_{0},{{\bf{x}}}_{t}}\left[\frac{{t}^{2}({t}^{2}+{t}_{\,\mathrm{data}}^{2})}{{t}_{\mathrm{data}}^{2}}| | {s}_{\theta }({{\bf{x}}}_{t},t)-{{
abla }}_{{{\bf{X}}}_{t}}\mathrm{log}{p}_{t| 0}({{\bf{x}}}_{t}| {{\bf{x}}}_{0})| {| }^{2}\right]$$ (3)
At inference time, we sample \({{\bf{x}}}_{{t}_{\max }}\sim{\mathscr{ \mathcal N }}(0,{t}_{\max }^{2}{\bf{I}})\) and integrate from t′ = 1 to t′ = 0 with the Euler–Maruyama scheme with uniform steps in t′. We apply low temperature annealing and modify the reverse diffusion as
$${\rm{d}}{\bf{x}}=\left[\frac{{g}^{2}(t)}{2}(1+\beta (t)){s}_{\theta }({\bf{x}},t)\right]\,{\rm{d}}t+g(t)\beta (t)\gamma (t)\,{\rm{d}}{\overline{{\bf{w}}}}$$ (4)
where γ(t) = 0.5 and β(t) = 1(1 + t/t data )ν. Here β(t) controls the stochasticity via mixing level of Langevin dynamics and γ(t) controls the temperature of the dynamics. We use ν = 0.5 for unconditional generation and ν = 1 for conditional generation. As in previous work, we find these low temperature dynamics essential for generating high-quality structures4,43.
Discrete diffusion
In diffusion modelling of discrete data44, we represent an element of the vocabulary with its one-hot vector and transport the data distribution p 0 = p data towards a prior with probability vector π ∈ ΔK, where ΔK is the K-simplex. In particular, we define a corruption schedule α t , t ∈ [0, 1] such that α 0 = 1, α 1 = 0 monotonically decreasing and a noising process p t∣s (x t ∣x s ) = Cat(x t ; (α t /α s )x s + (1 − α t /α s )π) for t > s. This generates noisy marginals \({p}_{t}({{\bf{x}}}_{t})={{\rm\sum }}_{{{\bf{x}}}_{0}}\mathrm{Cat}({{\bf{x}}}_{t};{\alpha }_{t}{{\bf{x}}}_{0}+(1-{\alpha }_{t}){\pmb{\uppi }})p({{\bf{x}}}_{0})\). The noising process can be reversed by iteratively sampling
$${p}_{s| t}({{\bf{x}}}_{s}| {{\bf{x}}}_{t})=\sum _{{{\bf{x}}}_{0}}p({{\bf{x}}}_{s}| {{\bf{x}}}_{t},{{\bf{x}}}_{0})p({{\bf{x}}}_{0}| {{\bf{x}}}_{t})$$ (5)
where p(x s ∣x t , x 0 ) is analytically computed from Bayes’ rule and we approximate \(p({{\bf{x}}}_{0}| {{\bf{x}}}_{t})\approx \mathrm{Cat}({{\bf{x}}}_{0};{\hat{{\bf{x}}}}_{0}({{\bf{x}}}_{t};\theta ))\) via a neural network \({\hat{{\bf{x}}}}_{0}({{\bf{x}}}_{t};\theta )\in {\Delta }^{K}\). The network is trained by minimizing the cross entropy \({{\mathbb{E}}}_{{{\bf{x}}}_{0},{{\bf{x}}}_{t}}[-\mathrm{log}\langle {\hat{{\bf{x}}}}_{0}({{\bf{x}}}_{t};\theta ),{{\bf{x}}}_{0}\rangle ]\) for all t. To apply discrete diffusion to protein sequences, we noise all positions independently and adopt the parameterization of masked diffusion language modelling45 and diffusion protein language modelling (DPLM)46. In particular, we let K = 21 and define the Kth state to represent a mask state m. We then assign π = m. With this parameterization, the reverse process becomes
$${p}_{s| t}({{\bf{x}}}_{s}| {{\bf{x}}}_{t})=\mathrm{Cat}\left({{\bf{x}}}_{s};(1-{\delta }_{{{\bf{x}}}_{t},{\bf{m}}}){{\bf{x}}}_{t}+{\delta }_{{{\bf{x}}}_{t},{\bf{m}}}\left[\frac{1-{\alpha }_{s}}{1-{\alpha }_{t}}{\bf{m}}+\frac{{\alpha }_{s}-{\alpha }_{t}}{1-{\alpha }_{t}}{\hat{{\bf{x}}}}_{0}({{\bf{x}}}_{t};\theta )\right]\right)$$ (6)
Note that the sampling is independent across positions but the neural network \({\hat{{\bf{x}}}}_{0}({{\bf{x}}}_{t};\theta )\) takes the entire sequence as input (for brevity we omit this distinction in notation).
Our final sequence training loss is then
$${{\mathscr{ \mathcal L }}}_{\mathrm{seq}}={{\mathbb{E}}}_{t\sim{U}[0,1],{{\bf{x}}}_{0},{{\bf{x}}}_{t}}[-\lambda (t){\delta }_{{{\bf{x}}}_{t},{\bf{m}}}\mathrm{log}\langle {\hat{{\bf{x}}}}_{0}({{\bf{x}}}_{t};\theta ),{{\bf{x}}}_{0})\rangle ]$$ (7)
where λ(t) = 1 − t as in DPLM. Notably, only the logits of positions where x t = m are supervised.
For inference, we initially set x 1 = m and iteratively sample x t with steps uniform in t. The sampling strategy depends on the task. For unconditional sequence generation, our sampling deviates from ancestral sampling of the reverse process p s∣t and instead follows the approach introduced in DPLM46, which can be cast as self-planning under a Path Planning framework47. Specifically, a single step from t to s with t > s and L being the sequence length proceeds as follows:
$${z}_{\ell ,i} \sim {\rm{Gumbel}}(1,1),{\rm{shape}}(z)=[L,20]$$ (8)
$${\phi }_{\ell ,i}\leftarrow \mathrm{log}{\mathrm{softmax}}_{i}((\mathrm{logits}{({\hat{{\bf{x}}}}_{0}({{\bf{X}}}_{t};\theta ))}_{\ell ,i}+{z}_{\ell ,i})/\gamma (t))$$ (9)
$${y}_{\ell },{u}_{\ell }\leftarrow \arg \mathop{\max }\limits_{i}{\phi }_{\ell ,i},\mathop{\max }\limits_{i}{\phi }_{\ell ,i}$$ (10)
$${S}_{\mathrm{top}k}\leftarrow \mathrm{top}{k}_{\ell }({u}_{\ell },k=L-\mathrm{round}(sL)),{S}_{\mathrm{top}k}\subseteq [1\ldots L]$$ (11)
$${({{\bf{x}}}_{s})}_{\ell }=\left\{\begin{array}{cc}{y}_{\ell } & \ell \in {S}_{\mathrm{top}k}\wedge {({{\bf{x}}}_{t})}_{\ell }={\bf{m}}\\ {({{\bf{x}}}_{t})}_{\ell } & \ell \in {S}_{\mathrm{top}k}\wedge {({{\bf{x}}}_{t})}_{\ell }
e {\bf{m}}\\ {\bf{m}} & \ell
otin {S}_{\mathrm{top}k}\end{array}\right.$$ (12)
Here, l ∈ {1, ..., L} indexes sequence positions and i ∈ {1, ..., 20} indexes specific amino acids, z l,i is Gumbel noise sampled independently for each position and amino acid type, φ l,i is the noise-perturbed, temperature-scaled log probability of amino acid i and position l, y l is the token sampled at position l and u l is its log probability, which serves as a confidence score, and S topk is the set of the k positions with the highest u l , which are unmasked at time s, whereas all other positions are set to the mask state m. γ(t) is a temperature and we set γ(t) = 0.5 for sequence generation. In co-generation, we follow a similar procedure except γ(t) = 0.1 + 0.4t and instead set
$${y}_{\ell },{u}_{\ell }\leftarrow {({{\bf{X}}}_{t})}_{\ell },{\phi }_{\ell ,{({{\bf{X}}}_{t})}_{\ell }}$$ (13)
for ℓ such that \({({{\bf{x}}}_{t})}_{\ell }
e {\bf{m}}\); that is, the sampled token and log probability are replaced with the current token and its log probability under the model prediction. Finally, in inverse folding, we choose a random unmasking order and sample each position with temperature 0.1, as done in ProteinMPNN48.
Model architecture and training
ProDiT is a transformer architecture49 based closely on the design of diffusion transformers for images50. In particular, it consists of 30 transformer blocks, each with a self-attention block and feed-forward layer. We adopt adaLN-Zero50 to inject conditioning information, in particular a sinusoidal embedding of the structural diffusion time. We follow modern transformer best practices, including pre-normalization (pre-norm), query-key normalization (QK-norm) and Gaussian error linear unit (GeLU) activations. Unconventionally, we adopt a dropout rate of 20%, which we found essential for sequence-generation performance.
The model accepts four types of input: structure, sequence, motifs and GO terms. The structure is directly embedded with a linear layer without any geometric or equivariant transformations, following emerging best practice43,51. The sequence is embedded with a learned embedding. The motifs are centred and also embedded with a linear layer, with motif positions additionally marked with a learned embedding in both the model input and adaLN-Zero conditioning. Finally, the GO terms are input via a learned embedding vector for each term. ProDiT then outputs via two linear heads a structural output for continuous structural diffusion and classifier logits for discrete sequence diffusion.
We train two models: one with model dimensionality 768 (without function conditioning) and one with model dimensionality 1,024 (with function conditioning). These models have 321 million and 576 million parameters, respectively. Both models are trained with crop size 512 and batch size 250,000–500,000 tokens across 16–32 NVIDIA H200 graphics processing units for approximately 500,000 steps. Model parameters are tracked with an exponential moving average with decay coefficient 0.999. Fifty per cent of the time, we sample motif conditioning following the motif sampling algorithm in Genie 252. When GO terms are available, 85% of the time we sample a term at random in proportion to its inverse frequency in UniProtKB, whereas 15% of the time we drop the GO term. In addition, we completely drop the sequence or structure each 5% of the time.
Data
Our training set is drawn from 214 million proteins in UniProtKB that have associated structures in AlphaFoldDB. Unlike pevious work on protein language models, we cluster proteins for training by structural similarity rather than sequence similarity; we found this to improve generation diversity. Specifically, we use the FoldSeek clusterings of AlphaFoldDB computed by ref. 53 as hierarchical clusters; we first sample a random FoldSeek cluster, then a random MMseqs cluster within the FoldSeek cluster, and finally a random protein within the MMseqs cluster. At training time, we filter to sample proteins with pLDDT > 80; this results in 1.24 million FoldSeek clusters, 18.9 million MMseqs clusters and 128 million sequences.
To obtain function training data, we compile metadata from all UniProtKB entries and associate each entry with the set of all molecular-function GO terms listed in the entry and any implied parent molecular-function terms not already present (via ‘is_a’ relationship types listed in http://purl.obolibrary.org/obo/go/go.obo). Sixty-five per cent of entries contain at least one non-root term, with those entries having 9.6 terms on average. We then compute frequencies of each term in our training dataset in order to sample them according to inverse frequency at training time. The resulting set of 8,220 terms comprises the input vocabulary of ProDiT.
Design and evaluation
We use the 321-million-parameter model for unconditional generation protocols, as it obtains slightly better diversity, and use the 576-million-parameter model for conditional generation.
Unconditional generation
For sequence generation, we sample a noisy structure at the highest noise level and fix it while iteratively unmasking the sequence. For structure generation, we initialize and fix the sequence to be the all-mask state while denoising the structure. We then design eight sequences using ProteinMPNN, refold each of them with ESMFold and keep the sequence with the lowest self-consistency RMSD. For co-generation, we denoise both modalities with a linear schedule and report self-consistency metrics (scRMSD, scTM) using the sequence designed by ProDiT. In all modalities, we sample generations of length L using L model forward passes. To compute the number of successful clusters, we pool all successful generations from different lengths and run FoldSeek clustering via:
foldseek easy-cluster <dir> <out> <tmp> --alignment-type 1 --cov-mode 0 --min-seq-id 0 --tmscore-threshold 0.5
We use the ESMFold structures for sequence generation and the raw ProDiT outputs for structure generation and co-generation.
To benchmark against previous work, we download the code and weights for ESM3 1.4B, RFdiffusion, EvoDiff 640M and ProteinGenerator from their public websites. For ESM3, because default sampling settings are not provided, we experimented with sampling hyperparameters and found the following settings to yield the best results: sequence is sampled with linear schedule, L steps, random order and temperature 1; and structure is sampled with linear schedule, L steps, random order and temperature 0.8. For RFdiffusion and ProteinGenerator, we use the default sampling scripts but set the number of diffusion steps to be 50 for ProteinGenerator (default 25). We use the Genie 2 evaluation pipeline52 to run ProteinMPNN on generated structures and assess all structure-generation methods.
Function conditioning
The DeepFRI function prediction network outputs predictions for 942 distinct molecular-function GO terms; 915 of these are in the input vocabulary of ProDiT (most of the excluded terms have been marked obsolete). We acknowledge that DeepFRI may have variable performance on natural versus synthetic proteins and thus may have limitations. However, DeepFRI is extensively computationally validated, compared with more recent methods, and was utilized as a consistent metric across our functional predictions.
For each of these terms, we generate 100 proteins of length 300 by first generating a structure in 300 steps, then a corresponding sequence (using inverse-folding sampling) in 300 additional steps. All sequences are refolded with ESMFold. Because some GO terms may correspond to proteins with disordered regions or flexible interdomain orientations, we do not filter based on scTM or scRMSD. The generation is marked as successful if DeepFRI predicts a probability ≥50% for the desired GO term from the refolded structure. We run DeepFRI with the command:
python predict.py --pdb_dir <dir> --ont mf --output_fn_prefix <out>
To compute the diversity, we gather all successful generations with the same GO term and compute the TM-score between generations i, j via TMalign. The diversity of generation i is then the mean of TM i,j , i ≠ j. Note that TM i,j = TM j,i as all generations have the same length. We display histograms of diversity TM-scores of successful generations pooled across all terms (Fig. 2c), that is, terms with more successes have higher weight.
To compute the novelty of the generations, we first compile a FoldSeek database for selected GO terms by gathering all AlphaFoldDB structures with the target GO term and running:
foldseek createdb <pdb_dir> <out_db>
We query this database via
foldseek easy-search <query_pdbs> <go_db> <out> <tmp> --alignment-type 1 --format-output query,target,alntmscore,qtmscore
We then take the match with the highest qtmscore found by foldseek, that is, the TM-score normalized by the length of the query (300) and assign this as the novelty TM-score of the generated protein. This ensures that high TM-scores correspond to a match for the entire generated protein rather than a short AlphaFoldDB protein matching part of the generated structure. Because of the relatively high runtime of this protocol, we only compute novelty results for 169 GO terms randomly selected from those with 10 or more successes and 2 million or fewer occurrences. We display histograms of novelty TM-scores of successful generations pooled across all terms (Fig. 2c), that is, terms with more successes have higher weight.
To implement CFG for function conditioning, we follow previous literature26,54 and run denoising sampling with linear combinations of logits (in discrete spaces) or scores (in continuous spaces). Let \(\phi ({\bf{s}},{\bf{x}},{t}_{\mathrm{seq}},{t}_{\mathrm{struct}}| \varnothing )\) and ϕ(s, x, t seq , t struct ∣c) represent the output of ProDiT when denoising sequence s and structure x unconditionally and conditioned on functional class c, respectively. Then for guidance strength λ, we denoise with
$$(1-\lambda )\phi ({\bf{s}},{\bf{x}},{t}_{{\rm{seq}}},{t}_{{\rm{struct}}}| \varnothing )+\lambda \phi ({\bf{s}},{\bf{x}},{t}_{{\rm{seq}}},{t}_{{\rm{struct}}}| c)$$ (14)
Structural alignment pipeline
To further assess that function-conditioned generations are biologically meaningful, we design a pipeline that compares the active sites of generated structures with experimental structures from AlphaFoldDB of the same GO term.
For each GO term, we filter UniProtKB for entries with AlphaFoldDB structures and at least two labelled active-site residues in the entry’s UniProtKB feature table (sufficiently annotated). Each generated structure is then structurally aligned to all sufficiently annotated AlphaFoldDB structures with the same GO term using gemmi.calculate_superposition with selection on protein backbone atoms via gemmi.SupSelect.MainChain. For each labelled active-site residue in the AlphaFoldDB structure’s UniProtKB feature table, we identify the nearest residue in the generated structure with (1) the same amino acid type and (2) minimized Euclidean distance between any atom in the generated and AlphaFoldDB residues. If a one-to-one correspondence was found for all annotated active-site residues, we computed the all-atom RMSD of the active sites. To compute the RMSD, atom positions were directly paired based on name correspondence, and the final RMSD was reported as the root mean square of the interatomic distances across the full set of matched residue pairs. Alignments with this RMSD below 1.0 Å were considered successful recoveries of active-site geometry. Owing to long runtimes, this process was applied to 337 GO terms.
For each successful generated structure with confirmed active-site matches, we further analysed the structure by comparing them with their five closest AlphaFoldDB structures (ranked by lowest active-site RMSD). For each of these structure pairs, we computed several metrics, including the global backbone RMSD, the RMSD of the active site and the RMSDs of expanded regions around the active site using spherical expansions from 1 Å to 18 Å. All RMSD values were computed in PyMOL after realigning the structures on the selected active site or expanded region. For each level of expansion, we also match the residues in the generated structure to the closest reference residue (post-alignment) and compute the fraction of matched residue identities.
Multistate design
The objective of our multistate design protocol is to sample a single sequence x that folds into two distinct structures, x 1 , x 2 , supporting functional motifs m 1 , m 2 , respectively. Using the conditional independencies implied by the directed graphical model, we can rewrite this target conditional distribution as:
$$p({\bf{s}},{{\bf{x}}}_{1},{{\bf{x}}}_{2}| {{\bf{m}}}_{1},{{\bf{m}}}_{2})\propto p({\bf{s}},{{\bf{x}}}_{1},{{\bf{x}}}_{2},{{\bf{m}}}_{1},{{\bf{m}}}_{2})$$ (15)
$$=p({\bf{s}})p({{\bf{x}}}_{1}| {\bf{s}})p({{\bf{x}}}_{2}| {\bf{s}})p({{\bf{m}}}_{1}| {\bf{s}},{{\bf{x}}}_{1})p({{\bf{m}}}_{2}| {\bf{s}},{{\bf{x}}}_{2})$$ (16)
$$=p({\bf{s}})\frac{p({\bf{s}},{{\bf{x}}}_{1})}{p({\bf{s}})}\frac{p({\bf{s}},{{\bf{x}}}_{2})}{p({\bf{s}})}\frac{p({\bf{s}},{{\bf{x}}}_{1}| {{\bf{m}}}_{1})p({{\bf{m}}}_{1})}{p({\bf{s}},{{\bf{x}}}_{1})}\frac{p({\bf{s}},{{\bf{x}}}_{2}| {{\bf{m}}}_{2})p({{\bf{m}}}_{2})}{p({\bf{s}},{{\bf{x}}}_{2})}$$ (17)
$$\propto \frac{p({\bf{s}},{{\bf{x}}}_{1},| {{\bf{m}}}_{1})p({\bf{s}},{{\bf{x}}}_{2},| {{\bf{m}}}_{2})}{p({\bf{s}})}$$ (18)
Each of these terms corresponds to our learned generative model under some form of conditioning: p(s, x i ∣m i ) is the distribution sampled by motif scaffolding m i , and p(s) is the distribution sampled by unconditional sequence generation. The product (and ratio) of these densities cannot be directly sampled by diffusion models; however, heuristic procedures for sampling similar densities involving the linear combinations of logits (in discrete spaces) and scores (in continuous spaces) are widely used in the generative modelling literature55, using the property that logarithms of products (and ratios) of densities are sums (and differences) of log densities.
Hence, we suggest a heuristic sampling algorithm for sampling the target density as follows: let ϕ(s, x i , t seq , t struct ∣m i ) and ψ(s, x i , t seq , t struct , ∣m i ) represent the logits and score predictions, respectively, of neural networks provided noisy sequence s, and noisy structure x i , diffusion times t seq , t struct , and motif m i . Then we denoise the sequence s with logits
$$\phi ({\bf{s}},{{\bf{x}}}_{1},{t}_{\mathrm{seq}},{t}_{\mathrm{struct}}| {{\bf{m}}}_{1})+\phi ({\bf{s}},{{\bf{x}}}_{2},{t}_{\mathrm{seq}},{t}_{\mathrm{struct}},| {{\bf{m}}}_{2})-\phi ({\bf{s}},{t}_{\mathrm{seq}})$$ (19)
and denoise each noisy structure x i with scores ψ(s, x i , t seq , t struct ∣m i ). We use these expressions as logits and scores of a black-box model output and proceed with the same discrete and continuous sampling algorithms as described previously.
To explore the application of this pipeline to allosteric regulation of enzymes, we posit that a multistate enzyme could be designed via two explicit structural states: one to scaffold the desired active-site motif, and another to scaffold the binding motif of a desired effector. (Although there is a risk that the model would produce a degenerate design of a single or very similar structures scaffolding both motifs, we find that this does not occur in a typical sample.) We select calcium as the effector and the EF-hand motif in positions 20–31 in PDB 1PRW as the effector binding motif.
For the carbonic anhydrase active-site motif, we select all the residues from PDB 6LUX with Cα coordinate within 7 Å of the position of the zinc cofactor. For the lysozyme active-site motif, we first compute the midpoint of a line connecting the Cα atoms of catalytic residues Glu35 and Asp52 in PDB 1DPX, and include all residues with Cα coordinate within 8 Å of this midpoint. We sample 320 designs for each active-site motif, using 200 (carbonic anhydrase) or 500 (lysozyme) steps of sequence–structure co-generation and motif residue indices and sequence lengths from the parent PDB. For carbonic anhydrase, we place the EF-hand motif at positions 125–136 (monotonic indexing), whereas for lysozyme we randomly place the EF hand at a random non-overlapping position in each design.
To filter the designs in silico, we sought to identify changes that could plausibly be sufficient to disable or reduce the activity of the enzyme based on the current understanding of its catalytic mechanism. Thus, we filtered the carbonic anhydrase scaffolds based on the displacement of core catalytic residues identified in previous work. For lysozyme, we screened using the RMSD for all motif residues owing to the putative importance of non-catalytic residues in substrate recognition.
Metadynamics simulations
To assess whether calcium binding destabilizes the active conformation of the selected multistate lysozyme design, we performed well-tempered metadynamics56 in OpenMM 8.257. The starting structures in the simulations were the Chai-1 predicted structures of the design in its unbound and calcium-bound states. The calcium ion was taken from the Chai-1 co-folded bound-state prediction. Each structure was protonated at pH 7 with PDBFixer and solvated in a periodic box extending at least 1.0 nm beyond the solute, with 0.15 M NaCl and neutralizing counterions. The Amber ff14SB force field was used for the protein and the Amber14 TIP3P-FB model was used for water. Non-bonded interactions were treated with particle mesh Ewald and a 1.0-nm real-space cut-off, bonds to hydrogen were constrained, and hydrogen mass repartitioning (hydrogen mass 4 AMU) enabled a 4-fs timestep with a Langevin middle integrator at 300 K and 1 ps−1 friction. Systems were energy-minimized, equilibrated for 50 ps in the canonical (NVT; constant number of particles, volume and temperature) ensemble and 50 ps in the isothermal–isobaric (NPT; constant number of particles, pressure and temperature) ensemble (Monte Carlo barostat, 1 bar, 300 K), and propagated under NPT during production.
The biased collective variable was the distance between the centroid of the Trp108 side chain and the centroid of the Cα atoms of the catalytic core. Gaussians of height 1 kJ mol−1 and width 0.05 nm were deposited every 500 steps (2 ps) with a bias factor of 8 on a grid spanning 0.5–2.6 nm. For each condition, we ran 4 walkers sharing a common bias for 25 ns each (100-ns aggregate per condition), seeding 2 walkers from the compact (active) structure and 2 from the displaced (inactive) structure to test convergence from both directions. Free-energy surfaces were reconstructed from the deposited bias and referenced to the global minimum. Convergence was judged from the agreement of per-walker estimates and the collective-variable sampling density. Basin free energies, the inter-basin free-energy difference, Boltzmann state populations and the Trp108 displacement at each basin minimum were computed from the resulting surfaces.
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.
© All Rights Reserved.