code wiki / (root) / nx_peptide_ext.nx

nx_peptide_ext.nx

buildroot/runtime/nx_peptide_ext.nx

8496 B217 linesdepth 4pulls 4 transitivereach 3 importersview sourcekind librarytopic peptide
docsdependenciesstructsconstsfunctions

about

nx_peptide_ext.nx -- CHEMISTRY SUITE / PEPTIDE EXTENSION rung. Closes the three gaps nx_peptide and nx_supplement_screen declared in their own headers: non-proteinogenic residues, disulfide bridges, and lactam cyclisation. Together those cover the peptides that actually turn up in supplement and research-peptide channels -- which are overwhelmingly modified, cyclic, or both. WHY A BUILDER AND NOT A LONGER ALPHABET. A one-letter code has 26 slots and 20 are spoken for; overloading B/J/O/U/X/Z with Aib/Nle/Orn would be arbitrary, unreadable, and would silently reinterpret any sequence that legitimately used them as ambiguity codes. So a peptide is COMPOSED: runs of standard sequence, explicit non-standard residues by id, then terminal modifications and bridges. Nothing is guessed from a letter. THE VALIDATION IS THE POINT. Oxytocin and vasopressin each land on their published monoisotopic mass ONLY if the C-terminal amide AND the disulfide are both applied -- miss the amide and you are 0.98 Da out, miss the bridge and you are 2.02 Da out. Both are checked against literature (1006.4367 and 1083.4380), and the gate ALSO runs the no-bridge and no-amide variants as negative controls, so the test cannot pass by accident. D-amino acids need no entry here: a stereoisomer has identical mass. GHRP-6's D-Trp and D-Phe, ipamorelin's D-2-Nal -- all already correct in nx_peptide. Chirality matters to the receptor, not to the balance. All INTEGER, _q4 = x10^4 Da, matching nx_peptide. Grounding (cited; researcher-groundable): iupac_nonproteinogenic_residue_formulas (extended residue masses) disulfide_bond_two_hydrogen_loss (-2.01565 Da per S-S) lactam_cyclisation_water_loss (-18.01056 Da per bridge) published_monoisotopic_masses_oxytocin_vasopressin (validation anchors) genealogy_id: peptide_chemistry + nishi_chem_suite

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_peptide.nx nx_peptide_ext.nx nx_supplement_screen.nx

imports: nx_syscalls.nxnx_peptide.nx

imported by: nx_supplement_screen.nx

structs

98struct NxPepBuild

consts

45const PEX_AMIDE_DELTA_Q4: i64 = 0 - 9840
46const PEX_ACETYL_DELTA_Q4: i64 = 420106
53const PEX_SS_DELTA_Q4: i64 = 0 - 20157 // -2.01565 Da per bridge
54const PEX_LACTAM_DELTA_Q4: i64 = 0 - 180106 // -18.01056 Da per bridge
60const PEX_AIB: i64 = 20 // 2-aminoisobutyric acid (ipamorelin)
61const PEX_NLE: i64 = 21 // norleucine (melanotan II)
62const PEX_NVA: i64 = 22 // norvaline
63const PEX_ORN: i64 = 23 // ornithine
64const PEX_CIT: i64 = 24 // citrulline
65const PEX_HYP: i64 = 25 // 4-hydroxyproline (collagen marker)
66const PEX_SAR: i64 = 26 // sarcosine (N-methylglycine)
67const PEX_2NAL: i64 = 27 // 3-(2-naphthyl)alanine (ipamorelin)
68const PEX_PGLU: i64 = 28 // pyroglutamate
69const PEX_N_EXT: i64 = 29
196const PEX_NEAR_ISOBAR_Q4: i64 = 500 // within 0.05 Da = same nominal peak

functions

77func pex_residue_mono_q4(ext_id: i64) -> i64
called by 1: pex_add_ext
90func pex_is_known(ext_id: i64) -> i64
called by 1: pex_add_ext
108func nx_pep_build_new() -> *NxPepBuild
calls 1: sys_mmap
123func pex_add_seq(b: *NxPepBuild, seq: *u8) -> i64
142func pex_add_ext(b: *NxPepBuild, ext_id: i64) -> i64
151func pex_set_amide(b: *NxPepBuild) -> i64 { b.has_amide = 1; return 0 }
152func pex_set_acetyl(b: *NxPepBuild) -> i64 { b.has_acetyl = 1; return 0 }
153func pex_add_disulfide(b: *NxPepBuild) -> i64 { b.n_ss = b.n_ss + 1; return 0 }
154func pex_add_lactam(b: *NxPepBuild) -> i64 { b.n_lactam = b.n_lactam + 1; return 0 }
160func pex_bridges_possible(b: *NxPepBuild, n_cys: i64) -> i64
168func pex_mass_q4(b: *NxPepBuild) -> i64
called by 1: pex_mz_q4
182func pex_mz_q4(b: *NxPepBuild, z: i64) -> i64
198func pex_near_isobaric(mass_a_q4: i64, mass_b_q4: i64) -> i64
211func pex_resolving_power_needed(mass_a_q4: i64, mass_b_q4: i64) -> i64