orthonym.assembly.fused_het_inner_subs#
Note
Internal API. Names and behaviour may change between releases.
The substituents of a fused heterocyclic core cited as a substituent prefix
(composer._generate_ring_substituent_prefixes): the prefix string of the groups this module names, or None when
a neighbour of the core is a group it does not name, so that the core is never cited bare while it carries one.
Kept out of composer.py so that file stays within its size budget.
- orthonym.assembly.fused_het_inner_subs.detect_fused_het_inner_subs(mol, core_atom_set, atom_mapping, ring_atom_set, chain_set, attach_ring_idx)#
Detect substituents on a fused heterocycle core and return formatted prefix string.
Finds atoms bonded to core atoms that are NOT part of the core and NOT in the chain. Maps their positions to IUPAC locants via atom_mapping.
- Returns:
Formatted inner substituent prefix string (e.g., “5-methyl-”) or “” if no inner substituents found; None when a neighbour of the core is a substituent this detector does not name (a phenyl, a branched alkyl, a sulfanyl group, an atom of a ring joined to the core): the caller then leaves the core to the general ring namer instead of citing it bare (‘1-benzofuran-5-yl’ for a 2-phenylbenzofuran-5-yl lost the phenyl).
- Return type:
str