orthonym.data.trivial_acids#

Note

Internal API. Names and behaviour may change between releases.

Acid name to acylate (-ate/-oate) conversion for ester naming.

Maps acid names (both trivial and systematic) to their ester suffix forms. For systematic names, the conversion is straightforward: - -oic acid -> -oate (propanoic acid -> propanoate) - -ic acid -> -ate (acetic acid -> acetate)

For trivial names, we need explicit mappings.

orthonym.data.trivial_acids.retained_pin_carboxylic_acid(canonical_smiles)#

The retained PIN for an EXACT unsubstituted acid, else None.

orthonym.data.trivial_acids.get_acylate_name(acid_name)#

Convert an acid name to its acylate (ester suffix) form.

Parameters:

acid_name (str) – The acid name (e.g., “acetic”, “propanoic”, “benzoic”)

Returns:

The acylate form (e.g., “acetate”, “propanoate”, “benzoate”)

Return type:

str

Examples

>>> get_acylate_name("acetic")
'acetate'
>>> get_acylate_name("propanoic")
'propanoate'
>>> get_acylate_name("benzoic")
'benzoate'
orthonym.data.trivial_acids.get_systematic_acylate(chain_length, unsaturation=None)#

Get the systematic IUPAC acylate name for a chain length.

Parameters:
  • chain_length (int) – Number of carbons in the acid chain (including C=O)

  • unsaturation – Optional list of (double_bond_locant, 'E'|'Z'|'') tuples (locants from the carbonyl carbon = 1). None → saturated form, byte-identical to the prior bare-int behavior.

Returns:

Systematic acylate name

Return type:

str

Examples

>>> get_systematic_acylate(2)
'ethanoate'
>>> get_systematic_acylate(3)
'propanoate'
>>> get_systematic_acylate(18, unsaturation=[(9, 'Z')])
'(9Z)-octadec-9-enoate'