Skip to contents

Algorithms 30 and 32 of the Supplementary Information to Jumper et al. (2021), pp. 42-43. Recycling feeds the previous iteration's outputs back into the inputs: pairwise distances between predicted beta-carbon positions are discretised, projected and added to the layer-normalised pair representation, and the first MSA row is layer-normalised. This is the only channel through which a previous prediction reaches the network; everything else is recomputed each cycle.

Usage

Alfrecyc(m1, z, x, wd, bins = NULL, ncycle = 1)

Arguments

m1

First row of the MSA representation, an n x cm matrix.

z

Pair representation, an n x n x cz array.

x

Predicted beta-carbon positions, an n x 3 matrix.

wd

Projection of the one-hot distance encoding.

bins

Distance bins; see above for the default.

ncycle

Number of recycling iterations.

Value

A list with z, m1, the distance matrix d, estimate, n, ncycle and method.

Details

The iteration count is fixed and there is no tolerance-based early exit.

The supplement describes the bins twice and the two descriptions disagree: "15 bins of equal width 1.25 A" implies an upper bin at 20.875, while "precise bin values range from 3 3/8 A to 21 3/8 A" implies a width of 18/14 = 1.2857. The default follows the stated endpoints; pass bins explicitly for the other reading.

References

Jumper et al (2021) Nature 596:583-589, Suppl. Algorithms 30, 32

Examples

set.seed(18)
m1 <- matrix(rnorm(6), 3, 2); z <- array(rnorm(18), c(3, 3, 2))
x <- rbind(c(0, 0, 0), c(3.8, 0, 0), c(7.6, 0, 0))
r <- Alfrecyc(m1, z, x, wd = matrix(rnorm(2 * 15), 2, 15))
round(r$d, 2)
#>      [,1] [,2] [,3]
#> [1,]  0.0  3.8  7.6
#> [2,]  3.8  0.0  3.8
#> [3,]  7.6  3.8  0.0