Skip to contents

Algorithm 29 of the Supplementary Information to Jumper et al. (2021), p. 37. A small MLP on the single representation produces a distribution over lDDT bins; the reported confidence is that distribution's mean.

Usage

Alfplddt(s, w1, w2, w3, bins = NULL, rtrue = NULL)

Arguments

s

Single representation, an n x cs matrix.

w1, w2

The two projections of line 1, each followed by a relu.

w3

Projection to the bin logits (line 2).

bins

Bin centres; defaults to the spec's 1, 3, ..., 99.

rtrue

Optional ground-truth lDDT per residue, giving the loss.

Value

A list with plddt, the bin distributions p, the loss, estimate, n and method.

Details

Line 4 of the published pseudocode writes the confidence loss without a leading minus sign, which would make it something to maximise while equation (7) adds it to a total that is minimised. The reference implementation uses the negative log likelihood, so that is what is computed here; the sign in the supplement is a typo.

References

Jumper et al (2021) Nature 596:583-589, Suppl. Algorithm 29

Examples

set.seed(14)
s <- matrix(rnorm(6), 3, 2)
r <- Alfplddt(s, w1 = matrix(rnorm(4), 2, 2), w2 = matrix(rnorm(4), 2, 2), w3 = matrix(rnorm(100), 50, 2))
round(r$plddt, 1)
#> [1] 50 50 50