orthonym.rules.amino_acids#

Note

Internal API. Names and behaviour may change between releases.

Amino acid detection and naming.

Alpha-amino acids have the general structure: H2N-CHR-COOH SMARTS pattern: [NX3;H2,H1][CX4][CX3](=O)[OX2H1]

For standard amino acids, trivial names are used. For non-standard, systematic naming applies: - Carboxylic acid is principal group - Amine becomes “amino” prefix

Peptide guard: molecules with peptide bonds (-C(=O)-NH-) are NOT simple amino acids and must NOT be flattened to “2-aminoXXXanoic acid”.

orthonym.rules.amino_acids.count_peptide_bonds(mol)#

Count the number of peptide bonds (-C(=O)-NH-CH-) in a molecule.

Peptide bonds link amino acid residues. A molecule with >= 1 peptide bond is a peptide, not a simple amino acid.

Parameters:

mol – RDKit Mol object

Returns:

Number of peptide bond matches found

Return type:

int

orthonym.rules.amino_acids.is_peptide(mol)#

Check if molecule contains peptide bonds (is a di/tri/polypeptide).

A molecule with one or more -C(=O)-NH-CH- linkages is a peptide, not a simple amino acid. Must also have the amino acid pattern (terminal NH2 + COOH) to distinguish from random amides.

Parameters:

mol – RDKit Mol object

Returns:

True if molecule is a peptide (has amino acid pattern AND peptide bonds)

Return type:

bool

orthonym.rules.amino_acids.detect_amino_acid(mol)#

Check if molecule is an amino acid.

Detects alpha-amino acid pattern: NH2-CH(R)-COOH

Parameters:

mol – RDKit Mol object

Returns:

True if molecule contains alpha-amino acid pattern

Return type:

bool

orthonym.rules.amino_acids.get_amino_acid_atoms(mol)#

Get atom indices of alpha-amino acid core.

The SMARTS pattern [NX3;H2,H1][CX4][CX3](=O)[OX2H1] matches: - N (amino nitrogen) - alpha_C (alpha carbon attached to N) - carbonyl_C (carboxylic acid carbon) - carbonyl_O (=O oxygen) - acid_O (OH oxygen)

Returns:

Tuple of (N, alpha_C, carbonyl_C, carbonyl_O, acid_O) atom indices, or None

Return type:

Tuple[int, int, int, int, int] | None

orthonym.rules.amino_acids.retained_amino_acid_names_off()#

Whether the running naming leaves the retained amino-acid names out (systematic_amino_acid_name()).

orthonym.rules.amino_acids.retained_amino_acid_names_left_out()#

Within the block the retained amino-acid names are not offered (retained_amino_acid_names_off() holds).

For a producer that names the NEUTRAL molecule of an amino-acid ion to build the ion’s name from it: the zwitterion of is ‘azaniumylacetate’, built from the systematic ‘aminoacetic acid’, the Blue Book, Table 10.4:54186), not from ‘glycine’, a Chapter name with no PIN,:50943) that has no ‘amino’ to change.

orthonym.rules.amino_acids.systematic_amino_acid_name(mol)#

The systematic substitutive name of the molecule being named, offered before its retained amino-acid name.

INTRODUCTION (the Blue Book): “Preferred IUPAC names (PINs) are not identified for the compounds in

this Chapter”, so ‘L-alanine’, ‘glycinate’ and ‘methyl L-alaninate’ are no PINs. “Systematic substitutive names” (:54247): “When not denoted by a retained name, amino acids receive systematic substitutive names constructed by applying the principles, rules and conventions of substitutive nomenclature”; Table 10.4 (:54186) prints that name under each retained one (‘2-aminopropanoic acid’), and outside Chapter the book gives such names as PINs (‘3-aminopropanoic acid (PIN)’,:26304).

Only for the caller’s whole molecule (outermost_name_input): a peptide residue or a salt component keeps the retained name its producer asks for. The molecule is named once more by a default-tier engine with the retained amino-acid names left out (retained_amino_acid_names_off()) and taken only as a PIN (rules/systematic_offer.py). Else None, and the caller keeps its retained name, labelled below the PIN by the

spelling check (validation/spelling/checks_natural_products.py).

orthonym.rules.amino_acids.systematic_or_retained(mol, retained, neutral_name=None)#

retained, a name built on a retained amino-acid word (‘glycinate’, from the neutral name ‘glycine’), or the systematic name:func:systematic_amino_acid_name offers in its place (‘aminoacetate’): INTRODUCTION (the Blue Book) identifies no PIN for the retained word, (:54247). With neutral_name, the offer is made only when that name is a retained amino-acid name.

orthonym.rules.amino_acids.name_amino_acid(mol, canonical_smiles)#

Generate name for an amino acid.

For standard amino acids, returns trivial name. For non-standard, returns systematic name.

a phase-02: SMILES lookup is checked BEFORE the alpha-amino acid SMARTS gate. This allows non-alpha amino acids (taurine, creatine, etc.) that are in the OPSIN vocabulary to be named correctly via direct SMILES lookup.

Peptide guard: if the molecule contains peptide bonds (-C(=O)-NH-), it is NOT a simple amino acid. Returns None so the molecule falls through to the general naming pipeline (or returns None for complex peptides beyond current scope).

Parameters:
  • mol – RDKit Mol object

  • canonical_smiles (str) – Canonical SMILES of the molecule

Returns:

Amino acid name, or None if not an amino acid or is a peptide

Return type:

str | None