orthonym.assembly.acyl_amido_polyacid#

Note

Internal API. Names and behaviour may change between releases.

The amido prefix of an acyl branch that carries a second carboxylic acid (Asp, Glu).

method (1) (the Blue Book-32998) writes -NH-CO-R as the amide name with

its final ‘e’ changed to ‘o’. acyl_amido_prefix_from_branch gets there by naming the ACID HO-CO-R and turning ‘…oic acid’ into ‘…amido’; for an acyl whose R holds another COOH that acid is a diacid (‘2-aminobutanedioic acid’), one amido prefix cannot be read off it (acid_name_to_amido_prefix declines on purpose), and the whole peptide was declined at the default tier. The Blue Book spells such an acyl with the second acid as ‘carboxy’ on the chain that ends at the amide carbon: “Substituent groups with the free valence on a nitrogen atom” (:54456), -HN-CO-[CH2]2-CH(NH2)-COOH is ‘4-amino-4-carboxybutanamido’ (:54470).

The acyl namer already writes that form when the acyl hangs on a carbon: -CO-CH(NH2)-CH2-COOH on a carbon is ‘(2S)-2-amino-3-carboxypropanoyl’. So the amide nitrogen is replaced by a carbon in a COPY of the molecule (atom indices are kept), the acyl atoms are named there, and the ‘…oyl’ word becomes ‘…amido’. Three checks keep the stand-in honest:

  • the copy changes one atom, so the CIP labels of every stereocentre of the acyl are computed on both molecules by the project’s CIP path (assign_stereochemistry) and must agree, otherwise the descriptors in the name would not be the original’s;

  • the name must end in ‘oyl’ and cite ‘carboxy’ (the shape this module exists for);

  • the acyl name’s non-PIN status carries to the prefix (record_derived_non_pin_fragment), as record_prefix_from_acid_status does on the ordinary route;

  • when the caller asked for a verified prefix, the amide R-CO-NH2 the prefix stands for (’…amide’) must read back from OPSIN as that amide on the full InChIKey, as fragment_acid_name_verified demands of the acid name on the ordinary route.

orthonym.assembly.acyl_amido_polyacid.ordinary_amido_is_the_acyl(mol, n_idx, carbonyl_c, sub_atoms, amido)#

False when the ordinary route’s amido prefix (the acid name of the acyl with ‘…oic acid’ turned into ‘…amido’, substituent_naming.acid_name_to_amido_prefix) is not the amide of THIS acyl.

An acyl that holds a second free COOH has an acid name whose ‘…oic acid’ may be that other group: ‘3-amino-4-{…}-4-oxobutanoic acid’ names the Asp side-chain acid of an Asp-Leu-Met acyl whose own carboxyl is cited as ‘1-hydroxy-…-1-oxobutan-2-yl’, and ‘…-4-oxobutanamido’ is a prefix of another molecule. The amide the prefix stands for (’…amide’, method (1), the Blue Book) must read back from OPSIN as the amide of the acyl on the full InChIKey, as polyacid_acyl_amido_prefix demands of its own prefix when it is asked for a verified one. An acyl with no second acid is the ordinary route’s, unchecked here.

orthonym.assembly.acyl_amido_polyacid.acyl_name_is_the_acyl(mol, n_idx, carbonyl_c, sub_atoms, acid_name, acyl_name)#

False when acyl_name, the acyl prefix of acid_name (’…oic acid’ turned into ‘…oyl’, “changing the ending ‘oic acid’ to ‘oyl’”, the Blue Book), is the acyl of another group than the one at carbonyl_c of the N-attached acyl sub_atoms.

An acyl that holds a second free COOH has an acid name whose ‘…oic acid’ may be that other group: the acid ‘2-({[…]amino}oxy)-2-methylpropanoic acid’ of ‘C(=O)C(=NOC(C)(C)C(=O)O)Ar’ cites the carboxyl of the acyl as ‘carboxy’, and ‘…-2-methylpropanoyl’ is the acyl of the other. The acyl chloride the name stands for (’…oyl chloride’, must read back from OPSIN as the acyl chloride of the acyl on the full InChIKey. Unchecked (True): an acyl with no second acid (the ordinary route’s), and an acid name that is a poly-acid or a functional replacement acid (acid_name_to_amido_prefix has no spelling for it: its ‘…oyl’ is a divalent group, which this single-acyl read-back does not describe; the validity gate rejects such a name when it is wrong).

orthonym.assembly.acyl_amido_polyacid.polyacid_acyl_amido_prefix(mol, n_idx, carbonyl_c, sub_atoms, verify=False)#

The bare amido prefix of the N-attached acyl branch sub_atoms when its acyl holds a second free COOH (‘2-amino-3-carboxypropanamido’), else None (fail closed).

sub_atoms is the ENTIRE substituent (the amide N plus the acyl); verify asks for the OPSIN full-InChIKey read-back of the amide the prefix stands for.