orthonym.assembly.handlers.prefix_claims#

Note

Internal API. Names and behaviour may change between releases.

Atom-claim reconciliation of the prefix fragments _generate_prefixes builds.

Every prefix fragment reports the heavy atoms it spells (NameFragment.atoms). Two producers of the SAME list can spell one atom twice, and the second spelling is a different molecule:

  • Double spelling (S1). A branch prefix (‘2-[(2R)-2-amino-3-sulfanylpropan- amido]’, atoms {2..8}) already spells its thiol; the functional-group loop then cites the same thiol again as a bare, unlocated ‘sulfanyl’ (atoms {7, 8}), so the name carries a sulfur the molecule does not have and the residues it dropped are never missed. The BUG-B filter in _generate_prefixes trusts a branch only for nine simple group types and only up to three carbons; thiols, guanidines and amides are outside it. A fragment whose atoms are a STRICT subset of another fragment’s atoms is spelled by that fragment and is dropped here. A group anchored on the chain contains a chain atom, which no branch does, so it is never a subset of a branch and is untouched.

  • A chain amide spelled ‘carbamoyl’ (S2). (the Blue Book): “The combination of the prefixes ‘amino’ and ‘oxo’ is used for describing the -CO-NH2 at the end of an acyclic chain in preferred IUPAC names” (‘4-amino-4-oxobutanoic acid (PIN)’,:30384; ‘3-carbamoylpropanoic acid’ is not). When the amide carbon is a chain atom the loop cited ‘carbamoyl’ at that locant, one carbon too many (‘5-carbamoylpentanoic acid’ for glutamine). The matches that sit on the chain are respelled ‘amino’ + ‘oxo’; matches inside a branch are claimed by the branch.

Carbonic-acid derivatives are left alone as well. A one-carbon chain parent that holds a C=X bond and two single-bonded N/O/S (urea, carbamate, carbonate) is named on its functional parent, ‘N-(propan-2-ylidene)urea (PIN)’ ,:33308; example:33332), never as ‘1-(propan-2-ylideneamino)formamide’, which is what the reconciled list would ship for the urea that the urea handler declines.

Pseudohalide groups are left alone too. The branch namer spells -S-C#N ‘(cyanosulfanyl)methyl’, where the Blue Book gives “‘cyano’ for -CN and ‘cyanato’ for -O-CN, ‘thiocyanato’ for -S-CN, ‘selenocyanato’ for -Se-CN” as the preferred prefixes “Cyanic acid”, the Blue Book; ‘3-(thiocyanato)propanoic acid (PIN)’ :31013); dropping the group’s own prefix would ship the branch’s spelling as a PIN. A dropped prefix that is a cyanate, thiocyanate, selenocyanate, isocyanate or isothiocyanate group leaves the list unchanged, so the double spelling keeps the name withheld.

Hydrazine branches are left alone. A branch with an N-N bond is spelled ‘[(carbamoylamino)amino]’ by the branch namer where the Blue Book writes ‘2-carbamoylhydrazin-1-yl’,:38644) or ‘…hydrazido’, :34548); reconciling such a list would turn a withheld name into a shipped non-PIN name, so the list is returned unchanged and the double spelling keeps the name withheld.

The function reads structured fragments and perception data only; it never edits a name string.

orthonym.assembly.handlers.prefix_claims.reconcile_prefix_claims(features, prefixes)#

Return prefixes with every atom spelled once (S1) and chain amides spelled ‘amino’ + ‘oxo’ (S2); the input list when nothing applies or a hydrazine branch is involved, a pseudohalide prefix would be dropped, or the parent is a carbonic-acid derivative.