Skip to contents

Algorithm 28 of the Supplementary Information to Jumper et al. (2021), p. 34. Every predicted atom is expressed in the local frame of every predicted residue, the same is done for the ground truth, and the two clouds are compared pointwise. Scoring each atom under every frame makes the loss sensitive to global arrangement as well as local geometry, and needs no superposition; it also distinguishes mirror images (supplement eq. 16-17).

Usage

Alffape(frames_pred, x, frames_true, x_true, Z = 10, dclamp = 10, eps = 1e-04)

Arguments

frames_pred, frames_true

Lists of frames, each list(R, t).

x, x_true

Matrices of atom positions, natoms x 3.

Z

Length scale, 10 angstrom in the spec.

dclamp

Distance clamp, 10 angstrom in the spec.

eps

Added under the square root of line 3. It makes a perfect prediction score sqrt(eps) / Z rather than exactly zero; pass eps = 0 for the unregularised form.

Value

A list with the loss estimate, the distance matrix d, nframes, natoms and method.

References

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

Examples

R0 <- diag(3)
fr <- list(list(R = R0, t = c(0, 0, 0)), list(R = R0, t = c(3.8, 0, 0)))
x <- rbind(c(0, 0, 0), c(3.8, 0, 0), c(5, 1, 0))
Alffape(fr, x, fr, x)$estimate                      # perfect prediction: sqrt(eps) / Z
#> [1] 0.001
Alffape(fr, x + 0.5, fr, x)$estimate
#> [1] 0.08660831