Skip to content

qNMR Quantification

qNMR Quantification documents how MolTrace turns integrated NMR evidence into quantitative outputs that can be reviewed, approved, and exported.

  • Select internal or external reference strategy.
  • Review integration regions and excluded peaks.
  • Confirm concentration, purity, and uncertainty outputs.
  • Attach the quantitative result to a report.
  • Preserve the source FID archive and review decisions in the audit trail.

The moltrace.spectroscopy.integration module exposes three production integration methods behind a single dispatcher and a typed endpoint. All three operate on a processed spectrum and a set of classified peaks plus one or more user-defined regions; each method returns, per region, the integral value, its normalised ratio, a confidence, and provenance indices back into the peak list.

MethodWhat it computesWhen to use
SumTrapezoidal area over the window.Clean, well-separated regions with no solvent or impurity overlap.
Edited Sum (default)Trapezoidal area with a proportional-by-height subtraction of overlapping solvent and impurity peaks.The default for reviewer workflows — robust to typical residual solvent and impurity contamination.
PeaksThe sum of the fitted compound peak areas inside the region.Crowded regions where peak fitting from the GSD pipeline is more trustworthy than baseline-bounded trapezoidal area.

On synthetic spectra with known impurity area fractions of 5 % / 10 % / 25 %, Edited Sum recovers the true compound integral within 1 %. This is the headline accuracy claim qNMR reviewers can rely on for routine impurity-aware integration.

POST /spectrum/analyze/integration carries the spectrum arrays, classified peaks, one or more regions, and a method selector. The response carries one entry per region with value, ratio, confidence, and the source-peak indices that contributed. Each call emits a spectrum.analyze_integration audit event so quantitative reviews remain reconstructible end-to-end. (v0.7.7, 2026-05-31)

qNMR purity — internal standard & PULCON

Section titled “qNMR purity — internal standard & PULCON”

Beyond region integration, moltrace.spectroscopy.qnmr turns a resonance integral into a mass-fraction purity by the two standard, non-proprietary qNMR methods, with full provenance and GUM-propagated uncertainties.

  • Internal-standard purity — calculate_purity_internal_standard(...) applies P_x = (I_x/I_std)·(N_std/N_x)·(M_x/M_std)·(m_std/m_x)·P_std against a weighed internal standard.
  • PULCON (external standard) — calculate_purity_pulcon(...) uses the reciprocity principle (signal per spin proportional to 1 / 90°-pulse-width) with documented temperature, receiver-gain, and scan corrections that default to matched conditions.
  • Integration-fitness ranking — rank_multiplets_for_qnmr(...) scores each candidate analyte multiplet on a transparent additive scale (max 13): no solvent / impurity in the window (+5), clean baseline (+3), narrow lines FWHM ≤ 5 Hz (+2), determinate multiplicity (+2), not exchange-broadened (+1) — so reviewers integrate the most trustworthy resonance.
  • Auditable result — both methods return a frozen PurityResult (purity %, uncertainty %, method, and every intermediate ratio) with the combined standard uncertainty by GUM quadrature, so a purity number is reconstructible end-to-end. Closed-loop synthetic recovery is < 0.5 % absolute (the SDBS acceptance target). (v0.8.3, 2026-06-05)

POST /raw-fid/{archive_id}/process used to require a structure, which put the most valuable part of the product — turning a vendor FID into a phased, baseline-corrected, peak-picked spectrum — behind knowing the answer in advance. It is now optional: with a structure, unchanged; without, identical processing, with the structure-dependent analysis absent rather than filled with a placeholder verdict.

The defect that change uncovered is larger than the change. With no structure, integrals are anchored to the smallest resolved signal rather than to a molecule. Measured on a real 500 MHz validation fixture, the same five leading peaks:

with a 6 H budget: 0.008 0.098 0.094 1.0 0.5 H
with no budget: 1.0 14.0 13.5 123.5 84.5 H

The ratios are identical; the absolute values are not proton counts. Eleven warnings were emitted on that spectrum and not one of them said so, so 123.5H in an NMR string was indistinguishable from a measurement.

It was never confined to the one route being changed. The preview route already accepted a missing structure and said nothing; the orchestration store dumps a preview verbatim into a downloadable artifact; and the quality-control store feeds one into a QC assessment — neither passes a proton budget at all. So the disclosure is one shared module applied at every producer call site, rather than a note added per route, and a test walks the AST of every module and fails when a new caller neither supplies a budget nor routes through it. That test found two sites that had been missed while the fix was being written, which is the argument for it existing.

Known limitation, stated rather than closed. The disclosure explains the scale without changing the rendering — the inferred-NMR text string still prints 123.5H. The AST guard is scaffolding for that follow-up, not a permanent invariant. (v0.68.9, 2026-08-08)

The same distinction, computed differently, in the offline desktop installation. There a signal’s share is the integral of the trace beneath it rather than a sum of fitted peak areas, over windows that tile the spectrum — see NMR Interpretation → Offline analysis. Region integration on this page consumes the multiplet range and is untouched by that change.