orthonym.rules.charged_fallback#
Note
Internal API. Names and behaviour may change between releases.
The ion classes that no producer names, offered last.
route_charged is a cascade of emitters, each for one class of ion, and the producers after it (the universal namer, the
general engine, the rescues of Orthonym.name) name what it declines, each in its own way. The emitters here are for
classes none of those names; each is in a module of its own and reads its name back through OPSIN to the input itself before
it ships.
They are the last rescue of Orthonym.name: asked only for a molecule that every producer and every earlier rescue left
without a name, so no name that ships can change (offer-not-return, a project rule), and each declines at once (a pattern test on
the ion, no naming) for a molecule that is not its class. The router is not the place to ask them: the producers after it
name some of these shapes by another route (‘methane(SO-thioperoxolate)’ for CS[O-], ‘[methyl(oxido)amino]methane’ for
CN(C)[O-], a name for COP(=O)([S-])OC), and an emitter asked inside the router would replace those names.
- orthonym.rules.charged_fallback.late_charged_name(smiles, style='pin')#
The name of the charged molecule
smilesthat the first emitter of this module has for it, or None. The emitters are asked in this order, the specific class first: the ester anion of a thio acid (‘O,O-diethyl phosphorothioate’, not the oxidanide of its group), the chalcogen anion of a heteroatom group, the azanide of a carbon group, the centre of several charges. The producer id of each is a literal (tests/unit/metrics/test_producer_trail_static.py).