Protein backbones in rational trigonometry
N. J. Wildberger's rational trigonometry measures geometry with quadrance and spread and parametrises rotations by half-turns, so every quantity is a ratio of integers when the coordinates are. A protein file stores its coordinates as decimals, so a protein's geometry can be computed exactly. We asked structural questions in that language, on 16,507 non-redundant PDB chains and 3,684 AlphaFold models: what a helix is as a rational screw, how many ways three residues can close, what the Ramachandran boundaries are as algebraic curves, and how helices pack.
Abstract
Every coordinate in a PDB or AlphaFold file is a decimal, hence an integer on a fixed grid. We computed protein backbone geometry exactly from those integers in Wildberger's rational trigonometry. (1) Four consecutive Cα atoms define an exact rational screw: signed rotation cross (its square is the cross of the turn), rise quadrance , radius quadrance and an exactly orthogonal rational rotation matrix. On 1,144,539 α-helical residues (of 3.74 million screws) the median is (3.628 residues per turn, close to the twist of about 99° reported before); Pauling's 18/5 helix (a 100° turn per residue) has , a root of , and by Niven's theorem the only ideal helices (n residues in k turns) with a rational signed rotation cross are 2-, 3-, 4- and 6-fold. Composing the exact screws of 3,585 long helices, the rotation comes closest to the identity after 11 residues, not 18. DSSP's patterns on hydrogen bonds decided exactly by quadrance agree with DSSP 4.2.2 on 94.4% of residues (3 states). (2) Tripeptide loop closure, Coutsias and co-workers' degree-16 problem, becomes three biquadratics with integer coefficients. Over all 3,778,427 windows the polynomial always factors as times an irreducible degree-15 polynomial; certified root isolation finds 2 to 12 real closures, never 14 or 16 (O'Donnell, Robert and Cazals also saw at most 12 on 2.5 million PDB tripeptides). Float64 solvers miscount between 12 and 7,672 windows depending on the tolerance. (3) In half-turn coordinates every hard-sphere boundary of the Ramachandran map is a curve of bidegree (2,2); all sixteen two-angle boundaries of our model at normal contact distances are smooth, so each is an elliptic curve. (4) Ridges drawn as chords give rational ridge spreads; with the measured Cβ radius the Triple spread formula puts the parallel peak of the 4-4 packing class at −39.7° against an observed −42.5°, with no fitted parameter (Walther, Eisenhaber and Argos's lattice model gave −37.1° in 1996). (5) AlphaFold helices are more uniform than the experimental ones on the same residues (interquartile range of 0.88 times), while their peptide bonds are less planar (median 4.19° against 2.97°), a difference that refinement restraints on the experimental structures may explain in part.
The problem
Structural biology describes backbones with angles: φ, ψ, ω, helix twist, crossing angles. Each angle is a transcendental function of coordinates, and the questions built on them are often algebraic underneath. Is this residue in a right-handed helix? How many backbones close a loop? Where does a hard-sphere contact begin? Rational trigonometry writes these questions with : the quadrance , the spread between lines , and Wildberger's half-turn parametrisation of rotations. A companion paper treats the DNA double helix. This one asks what the language says about proteins. The geometry itself is classical (see Prior work); what is new here is computing it exactly from the file's integers, at the scale of the non-redundant PDB.
Method
Data
| set | source | size |
|---|---|---|
| PDB, non-redundant | RCSB search of 30 November 2026: one representative per 30% sequence-identity cluster, X-ray ≤ 2.0 Å, 40–1,000 residues; mmCIF; model 1, first altloc | 16,507 chains, 3,848,605 residues |
| DSSP | DSSP 4.2.2 run on every entry (some files fail, some residues are skipped) | 3,496,109 residues with a code |
| AlphaFold DB v6 | proteome archives for human, mouse, E. coli K-12 and yeast (CC BY 4.0) | 3,684 models; 717,476 residues matched to PDB residues by UniProt numbering |
Coordinates are parsed from their decimal strings to integers on each entry's grid (10⁻³ Å for 15,176 chains, 10⁻⁵ Å for 1,330, 10⁻² Å for one). Exact values are integers or ratios of integers; floats appear only in plots and in the float baselines, which read the same coordinates as float32 or float64.
The exact local screw
For four consecutive Cα atoms with bonds , the axis direction is : in a regular helix every bond has the same axial part, so bond differences are perpendicular to the axis. Projecting on the plane perpendicular to (scaled by ) and taking their circumcentre gives vectors from with exactly, and
is an exactly orthogonal rational matrix: the screw that takes one Cα to the next is a rational rigid motion. For a regular helix with signed bond cross and signed torsion cross , SymPy proves , and . The first is Miyazawa's classical written without angles; the four-point construction is the rational form of Sugeta and Miyazawa's helical parameters.


Loop closure with integer polynomials
Fix N₁–Cα₁ and Cα₃–C₃ of three consecutive residues; keep the two peptide units rigid. Three rotations about integer axes close the loop: turns Cα₂ about Cα₁→Cα₃, and turn each peptide unit about its own Cα–Cα line. With the half-turn rotation , the three Cα bond angles are preserved dot products, so each condition is a biquadratic , , whose integer coefficients come straight from the file. Their resultant has degree 16, as in Wedemeyer and Scheraga's and Coutsias and co-workers' half-angle formulations; the setup (fixed end bonds, rotations about the Cα–Cα lines) is theirs. We compute it over , factor it, isolate its real roots with certified balls and rebuild every solution at 256 bits. The deposited backbone is .

Ramachandran contacts in half-turn coordinates
We built an alanine dipeptide on the 10⁻³ Å grid in the fully extended conformation, with the N→Cα and Cα→C bonds chosen as integer vectors of integer length (1,460 and 1,515 milli-Å, each the hypotenuse of an integer Pythagorean triple; N–Cα–C within 0.0065° of 111.2°). Then and are rational coordinates on conformation space, and the quadrance between an atom before φ and one after ψ is with of bidegree at most (2,2).
Helix packing with chords
Each DSSP helix of at least 10 residues gets an exact axis through the centroids of its first and last four Cα atoms; the crossing spread of two axes is . In Chothia, Levitt and Richardson's ridges-into-grooves picture the ridge from residue to , taken as a chord, makes spread with its axis, with the Chebyshev polynomial ; two ridge families combine through the Triple spread formula .
Results
Helices as algebraic numbers
| helix | residues/turns | signed rotation cross | minimal polynomial of the spread | PDB median | right-handed |
|---|---|---|---|---|---|
| α | 18/5 | −0.1736 (irrational; a 100° turn) | −0.1606 (3.628 per turn) | 98.3% | |
| π | 22/5 | +0.1423 (irrational; an 81.8° turn) | quintic | +0.0609 | 96.1% |
| 3₁₀ | 3/1 | −1/2 | −0.3075 | 92.7% | |
| polyproline II | 3/1, left | −1/2 | −0.3800 | 9.1% |




Niven's theorem is the reason: is rational only for , the same list as the crystallographic restriction. Every measured screw has a rational (the α median is ); the statement is about ideal helices. The two 3-fold helices share the exact rational cross −1/2 and differ by one integer sign: polyproline II is 91% left-handed, 3₁₀ 93% right-handed. Real 3₁₀ helices sit well above the ideal (3.34 residues per turn). The construction degenerates for flat strands, where the bond differences become parallel and ; there the Cα torsion and bond spreads are the well-conditioned description.


The screw chain
Multiplying consecutive exact rotation matrices along 3,585 DSSP α-runs of at least 24 residues, the composite rotation is closest to the identity at (median signed cross 0.953, three turns) rather than at Pauling's (0.898). That is what a twist of about 99° per residue implies (11 residues ≈ 3.03 turns); the exact products measure it directly on real, curved helices. Denominators grow by about 136 bits per residue; float64 agrees with the exact products to 1.8e-15 over 40 steps.




Secondary structure from exact tests
DSSP's own patterns (turns, minimal helices, bridges, ladders) on hydrogen bonds decided exactly, Ų and , one chain at a time: 3-state (Q3) agreement 94.4% with DSSP 4.2.2 (helix recall 97.6%, strand 89.6%, coil 94.3%; 8-state agreement on H/G/I/E/B 91.1%). Our version sees one chain, so sheets paired with other chains are invisible to it. Rules on the Cα trace alone (torsion spread turn, bond spread and an exact Cα partner within 5.5 Å) reach 77.2% on held-out chains, well below published Cα-only methods (PCASSO reports about 95% agreement with DSSP, a neural-network classifier above 97%).




Loop closure
| real closures | 2 | 4 | 6 | 8 | 10 | 12 | 14 or 16 |
|---|---|---|---|---|---|---|---|
| windows | 2,139,716 | 1,139,321 | 363,701 | 135,412 | 261 | 16 | 0 |
Every closure polynomial has degree 16, is squarefree and factors over as times an irreducible polynomial of degree 15. Helical windows have the fewest closures (2.11 on average), strands 4.11, polyproline II 5.02. The deposited backbone usually has a near twin: the nearest other closure turns Cα₂ by a median 8.3°, and by less than 5° in 36% of windows. Rebuilt from certified roots, 24,176 sampled solutions close to a bond-angle residual of at most 2.7e-74.






Float solvers fed the same polynomial miscount the real roots. With companion-matrix roots and an imaginary-part tolerance of 1e-4, 7,672 windows get too many real closures; at 1e-6, 92 are wrong (90 too many, 2 too few); at 1e-7, 15 (9 and 6); at 1e-8, 12 (3 and 9). Rounding the exact coefficients once to float64 still leaves 13 wrong at 1e-8, so conditioning alone is enough. A float64 Sturm sequence miscounts 6,692 windows, a float32 pipeline 9,435. The exact count needs no tolerance. That float solvers lose closures is known: O'Donnell, Robert and Cazals showed that a double-precision solver misses solutions and that multiprecision is needed to guarantee them; the rates here are for our float baselines on this data set.


The Ramachandran map as algebraic curves
Of 40 contact pairs whose distance varies, 16 depend on both φ and ψ and give (2,2) boundaries; the rest give vertical or horizontal lines. At normal contact distances all 16 boundaries are smooth in all four charts of (the Gröbner basis of each curve with its partial derivatives is 1), so each is a curve of genus 1; the outer-limit curves were not checked. On an exact 360 × 360 grid of rational no point lies on a boundary, and on the 128,881 finite grid points float64 and float32 agree with every exact decision. Our model allows 2.4% of the torus at normal contact distances and 19.0% at the outer limit; 9.7% and 77.4% of the non-Gly, non-Pro PDB residues fall inside them. Those fractions depend on the model (we include amide hydrogens and every 1-4 pair). Hard-sphere maps go back to Ramachandran, Ramakrishnan and Sasisekharan (1963); writing their boundaries as (2,2) curves is, as far as we found, not in the literature.





Helix packing
23,169 contacting helix pairs peak at crossing angles −42.5° and +132.5° (one ridge class, parallel and antiparallel) and +27.5° and −157.5°. With the measured α screw and the measured Cβ radius quadrance 11.93 Ų, the chord model predicts −39.7° (class 4-4, the spread polynomial ) and +18.3° (class 3-4). The parallel peak of the 4-4 class matches within about 3°, its antiparallel partner (+140.3° predicted, +132.5° observed) within 8°; the tallest single peak is the antiparallel −157.5°. Class 3-4 is under-predicted by 9° (parallel) and 4° (antiparallel), and over the radii of f23 (up to 40 Ų) its prediction stays below about 22°. Walther, Eisenhaber and Argos's lattice-superposition model gave −37.1° and +22.0° for a typical α-helix (twist 99.1°, rise 1.45 Å), so the agreement for the 4-4 class is not new; the chord form makes it rational. Bowie showed that part of the apparent preference in crossing-angle histograms is statistical bias; we did not correct for it.






Predicted against measured
On 186,796 residues in α-helices in both structures (AlphaFold pLDDT ≥ 90), the predicted helices are more uniform: interquartile range ratios AlphaFold/PDB of 0.88 (signed rotation cross), 0.91 (rise), 0.94 (φ) and 0.72 (Cα bond spread); strands are about equal (0.96–1.05). The medians barely move. Peptide planarity goes the other way: median is 4.19° in AlphaFold models and 2.97° in the experimental structures of the same residues (711,167 pairs). Caveat: experimental coordinates come out of refinement against stereochemical restraints (Engh and Huber's target bond lengths and angles, plus restraints that hold the peptide plane flat), and we did not check the restraint weights of these entries. A study of 1,024 high-resolution crystal structures found a standard deviation of 4.1° for ω in helices (Panjikar and Weiss, 2025), which for a normal distribution means a median deviation near 2.8°. So the difference may say as much about refinement as about AlphaFold; we do not claim AlphaFold is wrong. DSSP agrees between the two on 95.1% of matched residues.





Limitations and next steps
The limits of these results, each with its cause and, where one is planned, the next step.
- The four-point screw is ill-conditioned for flat strands; strands need another description. Cause: the construction degenerates as the rotation approaches 180° ().
- Rules on the Cα trace alone reach 77% agreement with DSSP, well below published Cα-only methods (about 95% and above). Cause: under investigation.
- Exact closure took 3.9 ms per window against 2.4 ms for the float64 pipeline (medians, same machine, not a tuned benchmark). Cause: the exact coefficients carry about 636 bits.
- On a one-degree Ramachandran grid exactness changed no decision. Cause: no grid point lies on or near enough to a boundary for rounding to matter.
- The chord model under-predicts the second packing class at any ridge radius we tried. Cause: under investigation.
Prior work
Most of the geometry here is classical; we checked each piece against the literature (Crossref, Europe PMC, arXiv and publisher pages) and credit it below.
- Helical parameters from four atoms. Sugeta and Miyazawa (1967) computed the helix of a polymer from bond lengths, angles and torsions; Miyazawa (1961) gave the angle identity that our restates; Kahn (1989) and HELANAL (Bansal, Kumar and Velavan, 2000) fit helix axes. New here, as far as we found: the exactly orthogonal rational rotation matrix per residue and its use on integer coordinates from the file. That real α-helices twist about 99° per residue (3.63 residues per turn) was known (Walther, Eisenhaber and Argos, 1996), so the return after 11 residues is a measurement, not a discovery.
- Spread polynomials and Niven. Spread polynomials are Wildberger's (Goh and Wildberger, 2009); Niven's theorem (1956) fixes which rational multiples of π have rational cosine. Applying them to backbone helices is a short corollary; we did not find it stated for proteins.
- Secondary structure. DSSP is Kabsch and Sander's (1983), here in version 4.2.2 (Hekkelman et al., 2025); our rational version only decides its hydrogen-bond test exactly. Cα-only assignment is well studied: P-SEA (Labesse et al., 1997), PCASSO (Law, Frank and Brooks, 2014; about 95%), a neural-network classifier (Saqib, Kryś and Gront, 2022; above 97%). Our Cα rules are not competitive with these.
- Loop closure. Gō and Scheraga (1970) posed tripeptide closure; Wedemeyer and Scheraga (1999) and Coutsias, Seok, Jacobson and Dill (2004) reduced it to a degree-16 polynomial (resultants: Coutsias, Seok, Wester and Dill, 2006; kinematic closure in Rosetta: Mandell, Coutsias and Kortemme, 2009). O'Donnell, Robert and Cazals (2022) solved 2,495,095 PDB tripeptides with a multiprecision solver, observed at most 12 solutions and showed that double precision loses some. Not found in the literature, as far as we checked: integer coefficients straight from the file with certified (ball-arithmetic) root counts, the factorisation × irreducible degree 15 in every window, and the full count distribution on a 30%-identity set.
- Ramachandran map. The hard-sphere map is Ramachandran, Ramakrishnan and Sasisekharan's (1963). Half-angle substitutions are standard in loop closure. We found no prior description of the contact boundaries as (2,2) curves on or as elliptic curves.
- Helix packing. Ridges into grooves is Chothia, Levitt and Richardson's (1977, 1981); Walther, Eisenhaber and Argos (1996) predicted −37.1° and +22.0° from a lattice model; Bowie (1997) showed that much of the apparent angle preference is statistical bias. New here: ridges as chords with rational spreads, combined by the Triple spread formula.
- AlphaFold against the PDB. That AlphaFold models have near-ideal stereochemistry is widely noted. We did not find a residue-matched measurement of helix-screw dispersion; we report it as a measurement. The ω result carries the refinement caveat above.
- Rational trigonometry in structural biology. We found no earlier use.
Limits
Exact means exact for the deposited coordinates, whose experimental uncertainty is far larger than any float error here. The hard-sphere fractions depend on the contact table, the hydrogen positions and the backbone angle at Cα. The closure clash test uses a 3.0 Å heavy-atom rule that also counts real N–O hydrogen bonds. The AlphaFold comparison covers four proteomes, and the experimental side carries refinement restraints. The packing histograms are not corrected for the statistical bias Bowie described. The literature check covered abstracts and indexed full texts; an older or less indexed source could still anticipate a result marked new.
Reproduction notes
All staging and computation ran on one AWS EC2 instance (64 vCPU) in under two and a half hours of instance time; the 3-D figures were rendered on a second instance. Data are public (RCSB PDB, AlphaFold DB, DSSP 4.2.2), recorded with queries and sha256.
Date and version
Version 1.2, 30 November 2026. All data downloaded and all results computed on 30 November 2026. Updated 1 December 2026: limitations section retitled.
References
- N. J. Wildberger, Divine Proportions: Rational Trigonometry to Universal Geometry, Wild Egg, 2005.
- S. Goh and N. J. Wildberger, Spread polynomials, rotations and the butterfly effect, arXiv:0911.1025 (2009).
- I. Niven, Irrational Numbers, Carus Mathematical Monographs 11, 1956.
- L. Pauling, R. B. Corey and H. R. Branson, The structure of proteins: two hydrogen-bonded helical configurations of the polypeptide chain, PNAS 37, 205–211 (1951).
- T. Miyazawa, Molecular vibrations and structure of high polymers. II. Helical parameters of infinite polymer chains as functions of bond lengths, bond angles, and internal rotation angles, Journal of Polymer Science 55, 215–231 (1961).
- H. Sugeta and T. Miyazawa, General method for calculating helical parameters of polymer chains from bond lengths, bond angles, and internal-rotation angles, Biopolymers 5, 673–679 (1967).
- P. C. Kahn, Simple methods for computing the least squares line in three dimensions, Computers & Chemistry 13, 191–195 (1989).
- M. Bansal, S. Kumar and R. Velavan, HELANAL: a program to characterize helix geometry in proteins, Journal of Biomolecular Structure and Dynamics 17, 811–819 (2000).
- W. Kabsch and C. Sander, Dictionary of protein secondary structure: pattern recognition of hydrogen-bonded and geometrical features, Biopolymers 22, 2577–2637 (1983).
- M. L. Hekkelman, D. Álvarez Salmoral, A. Perrakis and R. P. Joosten, DSSP 4: FAIR annotation of protein secondary structure, Protein Science 34 (2025).
- G. Labesse, N. Colloc'h, J. Pothier and J.-P. Mornon, P-SEA: a new efficient assignment of secondary structure from Cα trace of proteins, Bioinformatics 13, 291–295 (1997).
- S. M. Law, A. T. Frank and C. L. Brooks, PCASSO: a fast and efficient Cα-based method for accurately assigning protein secondary structure elements, Journal of Computational Chemistry 35, 1757–1761 (2014).
- M. N. Saqib, J. D. Kryś and D. Gront, Automated protein secondary structure assignment from Cα positions using neural networks, Biomolecules 12, 841 (2022).
- N. Gō and H. A. Scheraga, Ring closure and local conformational deformations of chain molecules, Macromolecules 3, 178–187 (1970).
- W. J. Wedemeyer and H. A. Scheraga, Exact analytical loop closure in proteins using polynomial equations, Journal of Computational Chemistry 20, 819–844 (1999).
- E. A. Coutsias, C. Seok, M. P. Jacobson and K. A. Dill, A kinematic view of loop closure, Journal of Computational Chemistry 25, 510–528 (2004).
- E. A. Coutsias, C. Seok, M. J. Wester and K. A. Dill, Resultants and loop closure, International Journal of Quantum Chemistry 106, 176–189 (2006).
- D. J. Mandell, E. A. Coutsias and T. Kortemme, Sub-angstrom accuracy in protein loop reconstruction by robotics-inspired conformational sampling, Nature Methods 6, 551–552 (2009).
- T. O'Donnell, C. H. Robert and F. Cazals, Tripeptide loop closure: a detailed study of reconstructions based on Ramachandran distributions, Proteins 90, 858–868 (2022).
- G. N. Ramachandran, C. Ramakrishnan and V. Sasisekharan, Stereochemistry of polypeptide chain configurations, Journal of Molecular Biology 7, 95–99 (1963).
- C. Chothia, M. Levitt and D. Richardson, Structure of proteins: packing of α-helices and pleated sheets, PNAS 74, 4130–4134 (1977).
- C. Chothia, M. Levitt and D. Richardson, Helix to helix packing in proteins, Journal of Molecular Biology 145, 215–250 (1981).
- D. Walther, F. Eisenhaber and P. Argos, Principles of helix–helix packing in proteins: the helical lattice superposition model, Journal of Molecular Biology 255, 536–553 (1996).
- J. U. Bowie, Helix packing angle preferences, Nature Structural Biology 4, 915–917 (1997).
- R. A. Engh and R. Huber, Accurate bond and angle parameters for X-ray protein structure refinement, Acta Crystallographica A 47, 392–400 (1991).
- S. Panjikar and M. S. Weiss, Peptide bonds revisited, IUCrJ 12, 307–321 (2025).
- J. Jumper et al., Highly accurate protein structure prediction with AlphaFold, Nature 596, 583–589 (2021).
- M. Varadi et al., AlphaFold Protein Structure Database: massively expanding the structural coverage of protein-sequence space with high-accuracy models, Nucleic Acids Research 50, D439–D444 (2022).
- H. M. Berman et al., The Protein Data Bank, Nucleic Acids Research 28, 235–242 (2000).
Working with Riptide
Riptide works with a small number of teams. Each engagement starts with 4 weeks inside your systems, learning how your models, data and infrastructure work. Only then does Riptide apply its software to them. Contact samario@riptidecompute.com or riptidecompute.com/evaluate.