nx_chem_mass.nx
buildroot/runtime/nx_chem_mass.nx
about
nx_chem_mass.nx -- C2.8a milestone: monoisotopic mass + ion m/z
prediction for LC-MS work.
Standard atomic weight (Element.mass_q3 in milli-AMU, C1) is used
for nominal molecular weight via nx_chem_mol_weight_q3 (C2.3a).
For MS work, the EXACT MASS of the most-abundant isotope is needed
instead -- e.g., glucose monoisotopic = 180.0634 Da (not 180.156
average) because LC-MS resolves a single isotope peak.
This file composes on C1 AtomicData.iso_mass_q4 (Q4 micro-AMU) +
C2.3a implicit-H to produce exact-mass + protonated-ion m/z.
Units:
iso_mass_q4 : exact isotope mass * 10000 (Q4 micro-AMU)
monoiso_q4 : whole-molecule monoisotopic mass in Q4
proton_mass_q4 : 10073 (= 1.00728 Da, the proton mass; used for
[M+H]+ ion m/z which differs from monoisotopic
by adding a proton, not a neutral H atom; the
difference is the electron mass = 0.00055 Da
which is below Q4 precision)
Honest gaps (DEFERRED):
- Multi-charge ions [M+2H]2+, [M+nH]n+: trivially obtainable
by dividing m/z by n; left for caller in MVP.
- Isotopologue pattern prediction (M+1, M+2 peaks from natural
abundance distribution): C2.8b composes on AtomicData
iso_abund_ppm field; requires combinatorial expansion over
all C/H/N/O isotopes.
- Adduct ions [M+Na]+, [M+K]+, [M+NH4]+ common in ESI+:
just substitute proton with respective ion mass.
dependencies 3 imports · 12 importers
diagram shows first 10 each side; +0 more imports, +2 more importers in the complete lists below.
imports: nx_chem.nxnx_chem_molecule.nxnx_chem_periodic.nx
imported by: nx_chem_adulterant_db.nxnx_chem_adulterant_db_test.nxnx_chem_mass_test.nxnx_chem_peak_list_test.nxnx_chem_report_csv_test.nxnx_chem_report_json_test.nxnx_chem_sildenafil_probe_test.nxnx_chem_tadalafil_probe_test.nxnx_supplement.nxnx_supplement_batch.nxnx_supplement_check.nxnx_supplement_csv.nx
structs
| none |
consts
| 37 | const NX_PROTON_MASS_Q4: nx_int = 10073 |
| 40 | const NX_SODIUM_MASS_Q4: nx_int = 229898 |
| 41 | const NX_SODIUM_ION_DELTA_Q4: nx_int = 219825 |
| 44 | const NX_AMMONIUM_ION_Q4: nx_int = 180344 |
functions
| 59 | func nx_chem_mol_monoisotopic_mass_q4(m: *MolGraph, ad_table: *AtomicData) -> nx_int |
| 84 | func nx_chem_mol_mh_plus_q4(m: *MolGraph, ad_table: *AtomicData) -> nx_int |
| 91 | func nx_chem_mol_mh_minus_q4(m: *MolGraph, ad_table: *AtomicData) -> nx_int |
| 100 | func nx_chem_mol_mna_plus_q4(m: *MolGraph, ad_table: *AtomicData) -> nx_int |
| 108 | func nx_chem_mol_mnh4_plus_q4(m: *MolGraph, ad_table: *AtomicData) -> nx_int calls 1: nx_chem_mol_monoisotopic_mass_q4 |
| 120 | func nx_chem_mol_multi_charge_mh_q4(m: *MolGraph, ad_table: *AtomicData, n_charge: nx_int) -> nx_int |