nx_peptide_ext.nx
buildroot/runtime/nx_peptide_ext.nx
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
imports: nx_syscalls.nxnx_peptide.nx
imported by: nx_supplement_screen.nx
structs
| 98 | struct NxPepBuild |
consts
| 45 | const PEX_AMIDE_DELTA_Q4: i64 = 0 - 9840 |
| 46 | const PEX_ACETYL_DELTA_Q4: i64 = 420106 |
| 53 | const PEX_SS_DELTA_Q4: i64 = 0 - 20157 // -2.01565 Da per bridge |
| 54 | const PEX_LACTAM_DELTA_Q4: i64 = 0 - 180106 // -18.01056 Da per bridge |
| 60 | const PEX_AIB: i64 = 20 // 2-aminoisobutyric acid (ipamorelin) |
| 61 | const PEX_NLE: i64 = 21 // norleucine (melanotan II) |
| 62 | const PEX_NVA: i64 = 22 // norvaline |
| 63 | const PEX_ORN: i64 = 23 // ornithine |
| 64 | const PEX_CIT: i64 = 24 // citrulline |
| 65 | const PEX_HYP: i64 = 25 // 4-hydroxyproline (collagen marker) |
| 66 | const PEX_SAR: i64 = 26 // sarcosine (N-methylglycine) |
| 67 | const PEX_2NAL: i64 = 27 // 3-(2-naphthyl)alanine (ipamorelin) |
| 68 | const PEX_PGLU: i64 = 28 // pyroglutamate |
| 69 | const PEX_N_EXT: i64 = 29 |
| 196 | const PEX_NEAR_ISOBAR_Q4: i64 = 500 // within 0.05 Da = same nominal peak |
functions
| 77 | func pex_residue_mono_q4(ext_id: i64) -> i64 called by 1: pex_add_ext |
| 90 | func pex_is_known(ext_id: i64) -> i64 called by 1: pex_add_ext |
| 108 | func nx_pep_build_new() -> *NxPepBuild calls 1: sys_mmap |
| 123 | func pex_add_seq(b: *NxPepBuild, seq: *u8) -> i64 |
| 142 | func pex_add_ext(b: *NxPepBuild, ext_id: i64) -> i64 |
| 151 | func pex_set_amide(b: *NxPepBuild) -> i64 { b.has_amide = 1; return 0 } |
| 152 | func pex_set_acetyl(b: *NxPepBuild) -> i64 { b.has_acetyl = 1; return 0 } |
| 153 | func pex_add_disulfide(b: *NxPepBuild) -> i64 { b.n_ss = b.n_ss + 1; return 0 } |
| 154 | func pex_add_lactam(b: *NxPepBuild) -> i64 { b.n_lactam = b.n_lactam + 1; return 0 } |
| 160 | func pex_bridges_possible(b: *NxPepBuild, n_cys: i64) -> i64 |
| 168 | func pex_mass_q4(b: *NxPepBuild) -> i64 called by 1: pex_mz_q4 |
| 182 | func pex_mz_q4(b: *NxPepBuild, z: i64) -> i64 |
| 198 | func pex_near_isobaric(mass_a_q4: i64, mass_b_q4: i64) -> i64 |
| 211 | func pex_resolving_power_needed(mass_a_q4: i64, mass_b_q4: i64) -> i64 |