orthonym.rules.pseudoketones#

Note

Internal API. Names and behaviour may change between releases.

Pseudoketone routing for acyl-on-ring-nitrogen “hidden amides” (DD1 Fix 3, Blue Book / /.

An acyl group on a ring-system nitrogen (or any skeletal heteroatom that is not an acyclic amine N) is NOT named as an amide: the ring N is a skeletal atom of a ring parent hydride, so the C=O carbon becomes the principal group as a KETONE (pseudoketone) and the ring fragment is cited as an N-yl substituent on the carbonyl carbon:

CC(=O)N1CCCCC1 -> 1-(piperidin-1-yl)ethan-1-one
CCC(=O)N1CCCCC1 -> 1-(piperidin-1-yl)propan-1-one
CC(=S)N1CCCC1 -> 1-(pyrrolidin-1-yl)ethane-1-thione

Detection is on the original graph: the amide N must be a RING member and the carbonyl carbon must be EXOCYCLIC to that ring (so a lactam, whose C=O is itself in the ring, is excluded and stays a cyclic amide/one). An ordinary acyclic amide (acetamide, N,N-dimethylacetamide, benzamide) has a non-ring amide N and is never a pseudoketone.

Scope (returns None to fall through otherwise — never a wrong name): a single amide group whose acyl side is a clean carbon chain (no further substituents / heteroatoms / unsaturation on the acyl carbons). The ring fragment is named via the existing ring-substituent namer, so substituents ON the ring are handled.

orthonym.rules.pseudoketones.is_hidden_amide(mol, amide_match)#

Return (carbonyl_C_idx, ring_N_idx, chalcogen_symbol) if amide_match is an acyl-on-ring-N hidden amide, else None.

Criteria: the amide N is a ring member; the carbonyl carbon is bonded to that N and double-bonded to a chalcogen (O/S/Se/Te) and is itself NOT in a ring (exocyclic acyl — excludes lactams).

orthonym.rules.pseudoketones.name_pseudoketone(features, style='pin')#

Name an acyl-on-ring-N hidden amide as a pseudoketone, or None to fall through when the structure is outside the clean-acyl-chain class.