What you are looking at
Every dot is one residue of a repeat protein. A protein language model reads the amino-acid sequence and holds a list of 1,152 numbers for each residue, its hidden state. A linear projection carries that list onto a plane, where the residue becomes a point with an angle and a distance from the centre. I use two such projections, the same two for every protein, and take the angle from each:
- The repeat clock, θ1: where the residue sits inside its repeat unit. It turns once per repeat.
- The helix face, θ2: which side of its α-helix the residue is on, measured from the direction of the rest of the protein. It turns once per helical turn, about 3.6 residues.
Two angles make a torus. The chain travels once around the ring for every repeat and once around the tube for every turn of a helix. Inside helices the second angle is loud and the path rides the tube. In loops and strands it goes quiet and the path falls toward the core circle.
Colour follows the repeat clock: one pass through the colours is one repeat, so a given colour marks the same place in every repeat, on the torus and in the structure.
The small window shows the same residues in the folded structure, drawn in step with the torus.
The math
Each residue becomes a point on the 3-sphere S3 inside ℂ2:
p = ( cos η · eiθ₁ , sin η · eiθ₂ )
Here η = η0 (0.1 + 0.9 a), where a runs from 0 to 1 with the strength of the helix-face signal and η0 is the “tube size” control. For a fixed η these points form a Clifford torus.
Writing p = (x1, x2, x3, x4), the picture is the stereographic projection
(X, Y, Z) = s · (x₁, x₂, x₃) / (1 − λ x₄)
with lens λ. It carries the Clifford torus to an ordinary torus of revolution: the repeat clock runs around the ring and the helix face runs around the tube.
“Slide along the ring” adds an angle to θ1 and “slide around the tube” adds one to θ2. Both move the chain along the torus and leave the torus where it is.
“Tumble in 4-D” multiplies p, read as a quaternion, on the left by a unit quaternion:
p ↦ ejγ p
This turns the x1x3-plane by γ and the x2x4-plane by −γ at the same rate, an isoclinic rotation. It mixes the plane of the clock with the plane of the helix face, so the torus rolls through itself. It starts switched off; raise it in the controls to watch.
How the angles are read
Each angle comes from a linear projection of the hidden state h (1,152 numbers, taken at block 30 of the model’s 36) onto a plane:
z = W · (h − μ) / σ
W is a fixed complex vector. Its real and imaginary parts are the two directions that span the plane, and μ and σ are the mean and spread of each coordinate of h. The angle is the argument of z, and the length of z says how strong the signal is. The two steps that are not linear are taking that angle and rebuilding a point on the sphere from the angles for the drawing.
The two projections were fitted by ridge regression on repeat proteins with curated repeat units and known structures. Every protein shown here comes from a family left out of the fit that reads it. The model itself was trained on sequences alone.
The model is ESM C 600M, run through the ESM++ implementation.
Controls
- Drag either view to turn it; scroll or pinch to zoom.
- “Trace the chain” redraws the protein residue by residue, from its first repeat to its last.
- “Colour” switches between position in the repeat and the strength of the helix-face signal (gold where it is strong, bronze where it is weak).
The proteins
Repeat units from RepeatsDB. Experimental structures from the Protein Data Bank. Predicted structures from the AlphaFold Protein Structure Database (CC BY 4.0). Drawn with three.js.
A picture from work in progress, November 2026.