nx_peptide_chain.nx
buildroot/runtime/nx_peptide_chain.nx
about
nx_peptide_chain.nx -- CHEMISTRY SUITE / MULTI-CHAIN PEPTIDE rung. Closes
the last gap the peptide lane declared: an assembly of SEVERAL chains held
together by disulfide bridges. Insulin is the case that matters -- two
chains, three bridges, and one of the most counterfeited biologics there
is -- and nothing before this could weigh it.
WHY IT IS NOT JUST "ADD THE CHAINS UP". Two things break that:
1. Every chain carries its OWN terminal water, so an N-chain assembly
has N waters, not one. Treating insulin as a single 51-residue
sequence is short by a whole water (18.011 Da).
2. Bridges are owned by the ASSEMBLY, not by any chain. An inter-chain
disulfide belongs to neither A nor B. So pca_add_chain REFUSES a
builder that already carries its own bridges -- otherwise the same
-2.016 Da gets subtracted twice and the answer looks plausible.
INTRA AND INTER ARE TRACKED SEPARATELY, because they mean different
things. Both cost the same mass, but only INTER-chain bridges hold the
assembly together: linking N chains needs at least N-1 of them.
pca_is_covalently_linked enforces exactly that, so a "two-chain" molecule
with only intra-chain bridges is correctly reported as two separate
peptides that happen to be in the same tube.
THE CYSTEINE BUDGET IS A REAL CONSTRAINT, NOT A FORMALITY. Each bridge
consumes two cysteines, and a claim of more bridges than the sequences
can supply produces a mass that looks entirely reasonable. Insulin is
the perfect witness: 6 cysteines, 3 bridges, ZERO left over.
Grounding (cited; researcher-groundable):
published_monoisotopic_mass_human_insulin_5803_6375 (the anchor)
human_insulin_a_b_chain_sequences_and_disulfide_map
disulfide_bond_two_hydrogen_loss (via nx_peptide_ext)
genealogy_id: peptide_chemistry + nishi_chem_suite
dependencies 3 imports · 1 importers
imports: nx_syscalls.nxnx_peptide.nxnx_peptide_ext.nx
imported by: nx_peptide_chain_test.nx
structs
| 41 | struct NxPepAssembly |
consts
| none |
functions
| 50 | func nx_pep_assembly_new() -> *NxPepAssembly |
| 62 | func pca_count_cys(seq: *u8) -> i64 |
| 69 | func pca_add_chain(a: *NxPepAssembly, b: *NxPepBuild, n_cys: i64) -> i64 |
| 81 | func pca_add_chain_seq(a: *NxPepAssembly, seq: *u8) -> i64 |
| 88 | func pca_add_intra_disulfide(a: *NxPepAssembly) -> i64 { a.n_ss_intra = a.n_ss_intra + 1; return 0 } |
| 89 | func pca_add_inter_disulfide(a: *NxPepAssembly) -> i64 { a.n_ss_inter = a.n_ss_inter + 1; return 0 } |
| 91 | func pca_total_ss(a: *NxPepAssembly) -> i64 |
| 99 | func pca_free_cys(a: *NxPepAssembly) -> i64 |
| 104 | func pca_bridges_possible(a: *NxPepAssembly) -> i64 |
| 111 | func pca_is_covalently_linked(a: *NxPepAssembly) -> i64 called by 1: main |
| 125 | func pca_mass_q4(a: *NxPepAssembly) -> i64 |
| 137 | func pca_mass_reduced_q4(a: *NxPepAssembly) -> i64 called by 1: main |
| 143 | func pca_mz_q4(a: *NxPepAssembly, z: i64) -> i64 |