Invntr
Source

All instruments

kendrick_defect

Kendrick mass analysis of a peak list: rescales masses so a chosen repeat unit (CH2, C2H4O, CF2, any formula or mass) weighs a whole number, gives each peak its Kendrick mass and mass defect, groups peaks into homologous series, and reports series length, gaps, repeat counts, end-group residual and Mn/Mw.

Field
Mass spectrometry
Version
0.1.0
Runs as
Compiled (Rust)
Typical run
0.05 s

Compiled from source: run sh packs/install.sh once before admitting it.

Known answers it must pass

Admission replaykendrick_defect 0.1.0 · files c07b169b18c8…7e2c
  1. r0001Kendrick 1963 scale: CH2 factor = 14/(12 + 2*1.00782503223) = 0.99888338647; olefins CnH2n land on whole Kendrick masses, defect 0 (closed form, 1e-9)passed

    scale_factor0.998883 ± 1e-090.998883lockedunder 0.01 % of the tolerance used
    repeat_exact_mass_Da14.0157 ± 1.4e-0814.0157lockedunder 0.01 % of the tolerance used
    repeat_kendrick_mass1414locked
    peaks.0.kendrick_mass{"value": 14.0, "abs_tol": 1e-09}
    peaks.3.kendrick_mass{"value": 56.0, "abs_tol": 1e-09}
    series_count11locked
    series.0.kmd{"value": 0.0, "abs_tol": 1e-09}
    series.0.nominal_class{"value": 0, "abs_tol": 0}
  2. r0002alkanes CnH(2n+2), n = 1..20, from element masses: one series, defect = 2 - 14*m(H2)/m(CH2) = -0.013399362 for every member (closed form; spread below 1e-9, well inside the 1e-6 asked)passed

    series_count11locked
    longest_series_length2020locked
    unassigned_peak_count00locked
    series.0.kmd{"value": -0.013399362331127929, "abs_tol": 1e-09}
    series.0.kmd_spread{"max": 1e-09}
    kmd_min-0.0133994 ± 1e-09-0.0133994lockedunder 0.01 % of the tolerance used
    kmd_max-0.0133994 ± 1e-09-0.0133994lockedunder 0.01 % of the tolerance used
    series.0.nominal_class{"value": 2, "abs_tol": 0}
    series.0.missing{"value": 0, "abs_tol": 0}
    top_series_repeat_count_min11locked
    top_series_repeat_count_max2020locked
    top_series_residual_mass_Da2.01565 ± 1e-092.01565lockedunder 0.01 % of the tolerance used
  3. r0003PEG HO-(C2H4O)n-H, n = 5..12, unit C2H4O = 44.02621475 Da: oligomers line up on one defect 18 - 44*m(H2O)/m(C2H4O) = +0.000159436; end group H2O gives n = 5..12; equal intensities give Mn = 8.5*m(C2H4O) + m(H2O), Mw = sum m^2 / sum m (closed forms, 1e-9)passed

    repeat_exact_mass_Da44.0262 ± 4.4e-0844.0262lockedunder 0.01 % of the tolerance used
    scale_factor0.999405 ± 1e-090.999405lockedunder 0.01 % of the tolerance used
    series_count11locked
    longest_series_length88locked
    series.0.kmd{"value": 0.00015943627087011691, "abs_tol": 1e-09}
    series.0.kmd_spread{"max": 1e-09}
    series.0.nominal_class{"value": 18, "abs_tol": 0}
    top_series_repeat_count_min55locked
    top_series_repeat_count_max1212locked
    top_series_residual_mass_Da18.0106 ± 1e-0918.0106lockedunder 0.01 % of the tolerance used
    top_series_mn_Da392.233 ± 3.9e-07392.233lockedunder 0.01 % of the tolerance used
    top_series_mw_Da418.177 ± 4.2e-07418.177lockedunder 0.01 % of the tolerance used
    top_series_dispersity1.06614 ± 1.1e-091.06614lockedunder 0.01 % of the tolerance used
  4. r0004two series on the same nominal masses 128..198 are separated: alkanes C9..C14 (defect -0.013399362) and alkylnaphthalenes C10H8..C15H18 (defect +0.080396174), 93.796 mDa apart = 7*(14*m(H2)/m(CH2) - 2) (closed form, 1e-9)passed

    series_count22locked
    unassigned_peak_count00locked
    series.0.length{"value": 6, "abs_tol": 0}
    series.1.length{"value": 6, "abs_tol": 0}
    series.0.kmd{"value": 0.08039617398678445, "abs_tol": 1e-09}
    series.1.kmd{"value": -0.013399362331127929, "abs_tol": 1e-09}
    series.0.nominal_class{"value": 2, "abs_tol": 0}
    series.1.nominal_class{"value": 2, "abs_tol": 0}
    min_kmd_separation0.0937955 ± 1e-090.0937955lockedunder 0.01 % of the tolerance used
    peaks.0.series= S2misseddiffers
    peaks.1.series= S1misseddiffers
  5. r0005wrong repeat unit, known negative: the PEG oligomers on the CH2 scale step 43.977 Kendrick units, so the remainder mod 14 moves 1.977 per member and no series forms (closed form: 44.02621475*14/14.01565006 = 43.97705)passed

    series_count00locked
    has_series= falsefalselockedexact match
    unassigned_peak_count88locked
    peaks.0.kendrick_mass{"value": 237.8757262515296, "rel_tol": 1e-09}
  6. r0006fractional base unit (Fouquet and Sato 2017), C2H4O with divisor 3: factor = 15/(44.02621475/3) = 1.022118305, the repeat unit weighs 45; flipped sign convention gives defect = frac part of 45*m(H2O)/m(C2H4O) = +0.408928 (closed form, 1e-9)passed

    scale_factor1.02212 ± 1e-091.02212lockedunder 0.01 % of the tolerance used
    repeat_kendrick_mass4545locked
    series_count11locked
    series.0.kmd{"value": 0.40892784926843007, "abs_tol": 1e-09}
    series.0.kmd_spread{"max": 1e-09}
  7. r0007series on the rounding edge: masses built as (140.0005, 153.9995, 168.0004, 181.9996)/scale differ by whole CH2 within 1 mDa; they must stay one series of 4 with spread exactly 1.0 mDa and mean defect 0 (by construction; 1e-9)passed

    series_count11locked
    longest_series_length44locked
    series.0.span{"value": 4, "abs_tol": 0}
    series.0.kmd_spread{"value": 0.001, "abs_tol": 1e-09}
    series.0.kmd{"value": 0.0, "abs_tol": 1e-09}
7 of 7 cases passed · sandbox macos-seatbeltrecorded from the kernel in a fresh lab

Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.

Inputs

NameUnitDefaultMeaning
massesPeak masses in Da: neutral monoisotopic masses, or m/z of singly charged ions. At most 20000 peaks, each above zero and at most 1e7 Da.
formulasMolecular formulas (C10H22, C12H26O7); their monoisotopic masses are built from element masses and added to the peak list after 'masses'.
intensitiesOne intensity per peak (masses first, then formulas), zero or above. Needed only for Mn, Mw and dispersity.
repeat_unitCH2Formula of the repeat unit: CH2, C2H4O, C3H6O, CF2, C2H6OSi...
repeat_mass_DaDaExact mass of the repeat unit; replaces repeat_unit when given.
divisor11Fractional base unit X: scale = round(R/X)/(R/X). 1 is the classical Kendrick scale.
conventionnominal_minus_kendrickSign of the mass defect. Nominal Kendrick mass is the Kendrick mass rounded to the nearest whole number.
tolerance_mDamDa2.0Two peaks join one series when their Kendrick remainders are this close (single linkage). Use the mass accuracy of the spectrum.
min_series_length13Fewest members (distinct repeat counts) that make a series.
end_groupFormula of both end groups together (H2O for HO-PEG-H, H2 for alkanes). When given, absolute repeat counts are reported.
adduct_mass_DaDa0.0Mass the ion carries beyond the neutral molecule: 0 for neutral masses, 22.98922 for [M+Na]+, 1.00728 for [M+H]+.

Readings

NameUnitMeaning
repeat_exact_mass_DaDa
repeat_nominal_mass1
repeat_kendrick_mass1
divisor1
scale_factor1
tolerance_mDamDa
end_group_mass_DaDa
peak_count1
series_count1
assigned_peak_count1
unassigned_peak_count1
longest_series_length1
min_kmd_separation1Smallest difference in mass defect between two series (Kendrick mass units).
kmd_min1
kmd_max1
top_series_kmd1
top_series_residual_mass_DaDaWhat is left of the longest series' lightest member after the adduct and whole repeat units are taken out: the end groups, up to whole repeat units.
top_series_repeat_count_min1
top_series_repeat_count_max1
top_series_mn_DaDa
top_series_mw_DaDa
top_series_dispersity1
peaks_listed1
seriesOne row per series, longest first.
peaksThe first 500 peaks; out/peaks.csv holds all.

Try the call

Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.

Terminal
MCP call