At a glance
A new open-source library from Wesleyan University restrains both the distance and the angular motion of proton pairs in simulated protein ensembles, hitting 0.2 angstrom accuracy on ubiquitin benchmarks.
For most of the past three decades, the software that converts nuclear magnetic resonance data into protein structures has treated two nearby hydrogen nuclei as a pair of fixed dots. They are not fixed. Each proton wobbles on its bond, and that wobble changes the strength of the signal it produces.
A new open-source library called KEnRef, published in The Journal of Physical Chemistry B, is the first to restrain both the distance between those protons and the angle of their jiggle inside a molecular dynamics simulation. Written by Amr Alhossary and Colin A. Smith in the chemistry department at Wesleyan University, the tool pushes simulated protein ensembles toward experimental measurements with a rigor that earlier methods skipped.
The timing matters. NMR now accounts for a tiny and shrinking slice of the structures banked in the Protein Data Bank: 1.3 percent of the 20,974 structures deposited in 2025, against 53.1 percent by X-ray crystallography and 45.3 percent by three-dimensional electron microscopy. As AlphaFold-style prediction and cryo-EM soak up attention and funding, the case for NMR rests on something the other methods cannot do, which is watch a protein move in solution at room temperature. KEnRef is an argument that NMR's computational side can still be made sharper.
The signal that builds protein structures
Almost every NMR structure rests on one measurement: the nuclear Overhauser effect, or NOE. Put a protein in a strong magnetic field, excite one proton, and watch how quickly that excitation leaks to a proton nearby. The leak rate falls off steeply with separation, roughly as one over the distance to the sixth power, so a strong signal means a short gap and a weak one means a longer gap.
From those gaps, software builds a structure. The standard shortcut, called the isolated spin pair approximation, assumes the leak depends only on the two protons involved. In reality the excitation can hop from one proton to a third and back, a process called spin diffusion, which warps the inferred distances. A more recent technique, exact NOE, deals with that by either swapping most protons for deuterium or modelling the hopping explicitly, and has produced distance precision below 0.1 angstroms.
What even exact NOE leaves out is motion. A proton pair separated by four angstroms on average can be five angstroms apart half the time and three the rest, and a bond vector that swings through a wide arc weakens its NOE in a way that has nothing to do with distance. NMR spectroscopists have measured this angular freedom for years using the Lipari-Szabo order parameter, usually written S², a number between zero and one where one means a bond is frozen and lower values mean it swings widely.
Here is the analogy that makes the problem concrete. Imagine mapping a room's furniture from sound alone, where you can hear how far apart two objects are but never which way either one is facing. You would get the spacing right and the orientation wrong. Structural biologists have been doing that with proton pairs, and KEnRef is an attempt to hear the orientation too.
Turning a correlation function into a force
KEnRef stands for Kinetic Ensemble Refinement. It is written in C++17, built on the Eigen linear algebra library, and released under a permissive open-source license on the Smith Group's GitHub page. The design is deliberately modular: a standalone core that does the mathematics, and a thin interface that plugs into GROMACS, one of the most widely used molecular dynamics packages.
During a simulation, the code works in a loop. It fits each simulated model onto a reference structure using backbone carbon atoms, computes the forces the restraints should apply to the target protons, then rotates those forces back into the simulation's own frame so they can be added to everything else pulling on the atoms. A ceiling on the maximum force per atom, set at 800 and 999 kilojoules per mole per nanometre in the tests, prevents the system from blowing apart when restraints are stiff.
One piece of the design deserves separate attention: the loss function. A loss function is the score a fitting routine tries to minimise, and its shape decides which errors the fit cares about most. The obvious choice, used in many restraint schemes, concentrates sensitivity at short distances, so a simulation can satisfy the score while drifting badly at longer ranges. Alhossary and Smith replaced the usual exponent with a fractional power of 0.25. Shorter-range interactions, they observed, produce much steeper curves than longer-range ones, so flattening the response evens out the sensitivity across the three-to-five angstrom band they target.
The 0.25 exponent also cut the number of simulation crashes and improved distance accuracy overall. Because the loss function tolerates negative values, the authors note it should also work on NOE peak heights or even raw spectral data, which the current version does not yet touch.
Photo by Fasyah Halim on Unsplash
Ubiquitin as a test case
To check whether any of this works, the pair used ubiquitin, a 76-residue protein that has served as the field's calibration standard for two decades. Rather than start from experimental spectra, they generated synthetic target data: they ran unrestrained simulations to produce two conformations of the protein, one labelled A and one labelled B, and calculated what the NOE-related parameters would be for proton pairs sitting three to five angstroms apart.
That gave them 1,977 proton pairs for single-structure runs and 1,814 pairs for two-structure ensembles. They then split the data 80/20, restrained the simulation with the larger portion and held the smaller portion back as a blind test, repeating the split four ways so the result would not hinge on one lucky division.
The numbers that came out:
- Single-structure runs reached a root-mean-square deviation of about 0.2 angstroms between simulated and target proton distances at the highest force constants, with convergence in 2 to 10 nanoseconds of simulated time.
- Starting from a deliberately mismatched structure made little difference, with simulations recovering to nearly the same energy and deviation.
- Two-structure ensembles drove restraint energies down roughly 100-fold, reproducing both rigid and flexible target behaviours.
- Correlations with the reference data reached about 0.85 for distance fluctuations and 0.92 for angular order parameters, against roughly 0.3 and 0.5 for simulations run without restraints.
That last comparison is the headline. An unrestrained simulation captures only a third of the true variation in interatomic distances and half the true angular motion, at least by the correlation measure used here. Adding KEnRef restraints recovers most of both. Average order parameters landed within 0.03 of the target for rigid restraints and matched the target exactly for dynamic ones.
The full study is available through the published article, which is open access under a Creative Commons license.
What the benchmark does not prove
The word to hold onto here is synthetic. Every target in this paper was calculated from a simulation, not measured on a spectrometer. The restraint scheme is built on back-calculated plateau values of the dipole-dipole correlation function, which the authors describe as a way of assessing the maximum structural information available in NOE data rather than a direct fit to it.
As they put it in the paper: "Future iterations of the library will incorporate cross-relaxation rate and NOE peak volume restraints for applications to experimental data." Until that happens, KEnRef is a demonstration of what is theoretically recoverable, not a validated pipeline for real spectra.
There are practical gaps too. Methyl protons and the delta and epsilon protons of phenylalanine and tyrosine were excluded, because their fast rotation needs a time-scale-dependent treatment the current code does not implement. Protons on hydroxyl groups and charged side chains that exchange rapidly with solvent were also left out. Those are precisely the atoms that populate binding pockets and protein cores, so the excluded set is not trivial.
Sampling is another soft spot. Simulations started from matching and mismatching structures ended up about 0.02 angstroms apart, a small number that the authors read as a sign of mild trapping in local energy minima. Good restraints cannot fix a simulation that never visits the right region of conformational space.
And a curious result sits in the discussion: three separate properties per proton pair, the average distance, the angular order parameter and the distance standard deviation, were recovered from just two synthetic input parameters. The authors attribute this to the constraint that each proton's position must satisfy many restraints at once while staying consistent with the force field. Whether a single experimental cross-relaxation rate per proton pair carries enough information to pin down all three is the question they say future work will take on.
Where this fits in a crowded structural biology field
Predictors like AlphaFold have made it routine to obtain a plausible static model of almost any protein sequence. Cryo-electron microscopy has absorbed the largest share of new depositions. Neither method tells you much about how a protein flexes in solution on the picosecond to nanosecond timescale, which is where enzymes rearrange their active sites and where allosteric signals travel.
NMR does. It also struggles with proteins above roughly 30 to 50 kilodaltons, needs isotope labelling that is expensive and slow, and produces ensembles whose atomic positions often carry large uncertainties, because the underlying distance restraints were semi-quantitative at best.
That is the gap KEnRef aims at. A method that extracts both distance and angular information from data already collected would not require new experiments, only better analysis of old ones. Adrian Whitty and others have argued for years that structural biology's next frontier is dynamics rather than static coordinates, and this is a tools paper in service of that argument.
The modular architecture invites the same move for other software stacks. GROMACS is supported now; the core library exposes an application programming interface that other modelling packages could call directly, and the authors describe extension to other force fields as a goal.
Photo by Abiyu Bayuaji on Unsplash
What comes next
The immediate test is experimental data. Smith's lab has been building toward this for years, pairing restraint code with FitNMR, a package that extracts overlapped peak volumes from raw spectra. If KEnRef's loss function works as well on measured cross-relaxation rates as it does on the calculated plateau values, the pipeline becomes fully quantitative from spectrum to ensemble.
Beyond that, methyl groups and aromatic side chains, the excluded classes here, are the next obvious target, since they carry much of the information about how a protein's interior packs and repacks. Force constants in the range tested, 10⁷ to 10¹⁰, should tell users how hard to push, and the finding that convergence takes as little as two nanoseconds means the method is not prohibitively expensive on modern hardware.
The work was funded by the National Institutes of Health under award 1R15GM141974-01, and the authors declare no competing financial interest. Alhossary, who has also held a postdoctoral post at Nanyang Technological University in Singapore, has spent his career on computational methods, including the QuickVina docking software. KEnRef is a longer bet: that a measurement most of the field treats as a rough distance gauge contains, with the right mathematics, a record of how proteins actually move.
- structural-biology
- nmr-spectroscopy
- computational-chemistry
- protein-structure
- molecular-dynamics

