orthonym.rules.acyl_halide_from_acid#
Note
Internal API. Names and behaviour may change between releases.
Acyl halides on a ring named from the acid they come from: ‘4-methylbenzoyl chloride’.
‘Acid halides’ (the Blue Book): “Acyl halides are named by citing the name of the corresponding acyl
group followed by the class name(s) of the halide(s)”; (:30624) gives the acyl group of an acid named
with the suffix ‘carboxylic acid’ (‘-carbonyl’) and the ‘-ic acid’ -> ‘-yl’ acyl groups (‘benzoyl’).
‘2-carbonocyanidoyl-5-methylbenzoyl chloride (PIN)’ (:31543) is a substituted one. The ring acid halide producer
wrote only ‘benzoyl chloride’ or ‘cyclohexanecarbonyl chloride’ and so named no substituted ring: the substituents
fell to the general engine (‘1-[chloro(oxo)methyl]-4-methylbenzene’, no PIN). Here the acid with every acyl halide
group drawn as a carboxy group is named by the engine, and its suffix is changed to the acyl form
(lipids._acid_to_acyl, which keeps a non-PIN record of the acid name on the acyl). Acid halides rank below acids,
anhydrides and esters, so the input has no carboxy group of its own and every carboxy group of the acid is one
of its acyl halide groups; the multiplied suffix must count all of them, or the name is not built.
- orthonym.rules.acyl_halide_from_acid.acyl_halide_from_acid(mol, combined)#
‘4-methylbenzoyl chloride’ for
molwhose acyl halide groupscombined(((C, O, X), symbol)each) carry halogen each; the groups of the senior halogen on ring carbons are the suffix, any others are prefixes (‘3-chloro-3-oxopropyl’, ‘4-carbonobromidoylbenzoyl chloride’) when no branch holds more of them than the ring. None for any other case (a carboxy group of the input’s own, an acid name whose suffix does not count every ring group).