orthonym.rules.peptides#

Note

Internal API. Names and behaviour may change between releases.

Peptide naming using the acylamino convention.

IUPAC: Linear peptides are named using amino acid nomenclature: 1. Detecting peptide bonds (-C(=O)-NH-) 2. Walking the chain to extract residue SMILES 3. Identifying each residue by trivial name 4. Adding L-/D- stereo prefixes based on CIP labels 5. Assembling: acyl forms for N-terminal residues, full name for C-terminal

IUPAC: peptide naming convention uses N->C direction, with acyl (glycyl, alanyl…) forms for all residues except C-terminal.

Examples omits the L descriptor for Table-10.4 amino acids):

Gly-Gly -> glycylglycine L-Ala-Gly -> alanylglycine Gly-L-Ala-L-Leu -> glycylalanylleucine D-Ala-Gly -> D-alanylglycine (D IS cited)

a phase (breadth, phase2e a trace – internal notes):

two ADDITIVE fallbacks, tried only when the flat acylamino convention above declines, and gated behind an explicit OPSIN round-trip (_rt_verified) so a table/topology miss degrades to abstention, never a wrong or atom-dropping name (0-wrong ABSOLUTE):

  • Lever A (_try_n_acyl_cap): an N-terminus ACYLATED by a plain (nitrogen- free) acyl group – a fatty/simple acyl cap – in front of an otherwise fully standard >=2-residue alpha chain. The cap is named via the general/ systematic namer and prepended in ACYL form, e.g. 3-hydroxy-11-methyltridecanoylglycylglycine.

  • Lever B (_try_gamma_link_whole): a single non-alpha (‘gamma’/’beta’) bond formed from a standard amino acid’s OWN side-chain carboxyl (only glutamic acid’s gamma- and aspartic acid’s beta-carboxyl have this shape among the standard 20) – glutathione’s linkage type. Builds the fully SYSTEMATIC substitutive acyl/amido construction instead of the flat chain shorthand, because OPSIN’s flat-chain grammar mis-parses a non-retained continuing acyl word (a trace-verified) and a bare ‘glutamyl’ shorthand imposes an L-configuration OPSIN does not know is undefined.

a phase L3-2e (stereo honesty): “The stereodescriptors ‘D’

and ‘L’” (the Blue Book) – “The stereodescriptor ‘xi’ (Greek letter xi) indicates unknown configuration” – and itself (:54715) – “A residue of unknown configuration is indicated by the prefix xi”. A bare retained residue name is therefore NOT a safe default for an undefined alpha-carbon: the flat acylamino path (_identify_residues with strict_stereo=True, via _alpha_stereo_undefined) now DECLINES the whole chain rather than silently applying the L-omission convention

to a residue whose configuration the input never defined. Lever

B’s donor-residue recovery is deliberately exempt: it builds its own locant-based descriptor and already treats an unresolved centre as “omit the descriptor” with no implied configuration.

a phase: Task 2.0 (dispatch SMARTS fix) + Task 2.1 (Lever C, capped

termini – _try_capped_termini) closed the two largest decline buckets. Task 2.2 adds _try_backbone_substitutive, the general BACKBONE- SUBSTITUTIVE producer for the residual (giant / non-standard-residue chains): the C-terminal residue’s own free acid is the parent, and every other residue is folded in one at a time (PREPEND for a standard/closed acyl word, SPLICE via _swap_amino_for_amido when a non-standard residue’s own systematic acid name leaves a leading ‘amino’ locant open). Tried LAST, after every path above declines; gated by _rt_verified like every other lever here, so an out-of-scope shape (a capped/dual-acid C-terminus, or a genuine side-chain acid on a non-parent residue – the “side-chain-acid trap”) ABSTAINS rather than misplace an amidation.

orthonym.rules.peptides.name_peptide(mol)#

Name a peptide molecule using the acylamino convention.

Returns None if the molecule is not a valid peptide or residues cannot be identified as standard amino acids.

Parameters:

mol – RDKit Mol object

Returns:

Peptide name (e.g., “glycyl-L-alanine”) or None

Return type:

str | None