Triangle Inequality Sandbox
AF3 Visualizer · Supporting Visualization

Triangle Inequality Sandbox

AlphaFold 3's pair representation stores one distance estimate for every pair of tokens: the model's internal notion of a distance map (structural biology) built from pairwise attention (machine learning). Fix how far two residues each sit from a shared reference point, and the distance between those two residues is no longer free: geometry boxes it in. That constraint is exactly what AF3's triangle updates exploit.

Two distances don't fix the third, they only bound it, geometry does the rest.

12.0 Å 9.0 Å 3.0-21.0 Å Gly² i Ser⁵ j Mg²⁺ k
Solid edges are set directly by the sliders. The dashed edge shows the full range Gly² to Ser⁵ could occupy: drag the d(i,j) marker in the panel beside this diagram past either end of its highlighted zone to see what happens outside that range.
12.0 Å
9.0 Å

d(i,j) (Gly² to Ser⁵) 12.0 Å
0 Å 40 Å