code wiki / (root) / nx_peptide_isotope.nx

nx_peptide_isotope.nx

buildroot/runtime/nx_peptide_isotope.nx

5712 B135 linesdepth 5pulls 5 transitivereach 1 importersview sourcekind librarytopic peptide
docsdependenciesstructsconstsfunctions

about

nx_peptide_isotope.nx -- SOTA ANALYTICAL rung: the ISOTOPIC ENVELOPE a high-resolution mass spectrometer actually observes for a peptide, computed from the liar-killed elemental formula (nx_peptide_formula) and NIST natural isotope abundances. WHY THIS IS STATE OF THE ART, NOT A NOMINAL-MASS TOY. A real LC-MS identity confirmation does not match a single mass -- it matches the ISOTOPE PATTERN: the relative heights of the monoisotopic peak (M), M+1, M+2 ... arising from natural 13C/15N/2H/17O/18O/33S/34S. Two compounds can share a nominal mass and be told apart by their envelope. This is the capability that makes the difference between "a peak near 1046" and "yes, that is angiotensin II." THE ENVELOPE IS ANCHORED, NOT ASSERTED. The isotope abundances are NIST measured constants; the pattern is EXACT combinatorics (each element's heavy-isotope contribution, plus the 13C-pair term for M+2). The gate cross-checks the result against an INDEPENDENT empirical law -- "M+1/M is about 1.08% per carbon" -- and against the published ~60% M+1 for a 1 kDa peptide. Computed value == combinatorial value == empirical rule == textbook number is the same triangulation that anchors the mass stack. THE SOTA INSIGHT THIS EXPOSES. For a small molecule the monoisotopic peak is the tallest, so people assume it always is. It is NOT: M+1/M grows ~1.08% per carbon, so past ~90 carbons M+1 exceeds M, and a large peptide's BASE PEAK (the tallest) is M+1 or M+2, not the monoisotopic. iso_base_peak computes which -- a fact a nominal-mass method gets silently wrong. Intensities are relative to the monoisotopic peak = 1000 permil. Grounding (cited; researcher-groundable): nist_atomic_weights_and_isotopic_compositions yergey_1983_polynomial_isotope_distribution published_peptide_isotope_envelopes_1kda genealogy_id: peptide_chemistry + analytical_sota + liar_killer

dependencies 3 imports · 1 importers

nx_syscalls.nx nx_peptide.nx nx_peptide_formula.nx nx_peptide_isotope.nx nx_qc_svc.nx

imports: nx_syscalls.nxnx_peptide.nxnx_peptide_formula.nx

imported by: nx_qc_svc.nx

structs

none

consts

39const ISO_MAGIC_1000000000: i64 = 1000000000
45const ISO_C13_X6: i64 = 10816 // 13C/12C = 1.07 / 98.93
46const ISO_H2_X6: i64 = 115 // 2H/1H = 0.0115 / 99.9885
47const ISO_N15_X6: i64 = 3653 // 15N/14N = 0.364 / 99.636
48const ISO_O17_X6: i64 = 381 // 17O/16O = 0.038 / 99.757
49const ISO_S33_X6: i64 = 7896 // 33S/32S = 0.75 / 94.99
51const ISO_O18_X6: i64 = 2055 // 18O/16O = 0.205 / 99.757 (M+2)
52const ISO_S34_X6: i64 = 44742 // 34S/32S = 4.25 / 94.99 (M+2)

functions

59func iso_m1_permil(seq: *u8) -> i64
77func iso_m2_permil(seq: *u8) -> i64
98func iso_base_peak(seq: *u8) -> i64
112func iso_monoisotopic_is_base_peak(seq: *u8) -> i64
called by 1: qc_envelope calls 1: iso_base_peak
123func iso_carbon_rule_permil(n_carbon: i64) -> i64
129func iso_m1_per_carbon(seq: *u8) -> i64