orthonym.rules.inorganic_acids#

Note

Internal API. Names and behaviour may change between releases.

Inorganic oxoacids + functional-class derivatives / — PINs.

Orthonym has no functional-parent subsystem for the mononuclear and simple polynuclear inorganic oxoacids: free phosphoric/sulfuric/… either return unknown or mis-name (OP(=O)(O)O → trihydrophosphate; OC(=O)O → methane). The Blue Book gives these retained / preselected names directly

phosphoric acid, sulfuric acid; carbonic acid; silicic

acid; boric/boronic/borinic acid; di-acids), so there is no constitutional algorithm to run — the correct PIN is a table lookup.

This module is an EXACT canonical-SMILES recognizer: it returns the PIN only for the precise structures tabled here and None for everything else (fail-closed). Because the match is on the full-molecule RDKit canonical SMILES, there are zero false positives — a charged conjugate base, an ester, or any substituted derivative simply will not match and cascades onward.

Three tables, all consulted by:func:name_inorganic_acid:
  • _INORGANIC_OXOACIDS — the FREE acids / /.

  • _INORGANIC_ACID_DERIVATIVES — a phase: acid-halide acyl-word forms (phosphoryl trichloride, sulfuryl dichloride, and the amide functional-class names (phosphoric triamide, sulfuric diamide, sulfamic acid,. The acyl-halide names are spelled by the shared FRN engine (rules.functional_replacement).

  • _CARBONIC_FRN — a phase: the carbonic/carbamic functional-replacement acids /.3) — carbonoperoxoic / carbonodithioic / carbonotrithioic / carbonimidic / carbamimidic / dicarbonic / tricarbonic — names built by the SAME FRN engine.

DEFERRED (a phase, name-exact gold — OPSIN rejects the word-form so they cannot be round-trip-validated): the italic O/S/Se tautomer-locant acid words (carbonothioic S-acid, carbamothioic O-acid, phosphorothioic O,O-acid). Also out of scope: end-to-end di-/triphosphate-ester numbering.

orthonym.rules.inorganic_acids.lookup_exact_acid_name(canonical_smiles)#

Return the retained / functional-replacement inorganic-acid PIN for an EXACT canonical-SMILES key (carbamimidic acid, carbonimidic acid,…), or None. Consumed by the ester path so a tabled acid analog keeps its retained ‘-ic acid’ stem instead of the systematic-but-non-PIN chain name : ‘carbamimidic acid’, not ‘1-aminomethanimidic acid’).

orthonym.rules.inorganic_acids.name_silicate_ester(mol)#

Tetraalkyl silicate ester PIN / BB 35978): a NEUTRAL silicon bearing exactly four -O-R groups (a fully-esterified silicic acid) -> {multiplier}{R} silicate (tetramethyl silicate, tetrakis(propan-2-yl) silicate), or space-separated alphabetical citation for mixed R (ethyl methyl... silicate). The functional-class ester word is the PIN, NOT the substitutive tetra(R)oxysilane.

Fail-closed (returns None) for ANY Si that is not exactly Si(OR)4: a free Si-OH (partial ester / silicic acid -> stays the free-acid table row or the substitutive silanetriol path), an Si-C bond (genuine organosilicon ->

/ mononuclear-hydride), a charge, or a non-carbon-rooted O substituent.

orthonym.rules.inorganic_acids.name_p_oxoacid_frn(mol)#

mononuclear P/As/Sb oxoacid functional-replacement PIN (Engine A).

A NEUTRAL, single-fragment molecule with exactly one central atom E in {P, As, Sb} that bears one E=O, at least one remaining -OH (so the class is ‘acid’,, and at least one -OH REPLACED by a class group — amido (-N(R)(R')), halido (-Cl/-F/-Br/-I) or cyanatido (-O-C#N). The skeletal (C + H) substituent count on E selects the parent: 0 -> the -oric stem (phosphor / arsor / stibor); 1 -> the -onic stem (phosphon / arson / stibon).: a C-E bond forces the ‘-ono’ stem, never ‘-ini’; a halogen/N/replaced-O is a CLASS infix, never skeletal, so Cl-E(O)(OH)2 is E-orochloridic acid, never chloro-E-onic acid.

(CH3)2N-P(O)(OH)2 -> N,N-dimethylphosphoramidic acid CH3-P(O)(OCN)(OH) -> methylphosphonocyanatidic acid C6H5-P(O)(Cl)(OH) -> phenylphosphonochloridic acid Cl-As(O)(OH)2 -> arsorochloridic acid (guard, CH3-As(O)(Cl)(OH) -> methylarsonochloridic acid

Fail-closed (returns None) off this exact shape: a plain -onic / -oric acid (no class group -> the existing suffix/table paths own it), a fully-replaced acid with no -OH (an amide / acid-halide functional class), any ester -OR or chalcogenol -SH/-SeH/-TeH neighbour (chalcogen-infix FRN is a separate path), an E=N/E#N/E=S multiple bond, >=2 organyl groups (-inic FRN — out of scope), a molecule carrying more than one P/As/Sb, or the organyl+N-substituent combination that needs E-/N- locant disambiguation. Pure: no mol mutation.

orthonym.rules.inorganic_acids.name_p_oxoacid_chalcogen_frn(mol)#

mononuclear P/As/Sb oxoacid CHALCOGEN-infix FRN (locant-free subset only). E(=O) with two or more acidic -OH replaced by the SAME chalcogen -SH / -SeH / -TeH, giving the position-undetermined, locant-free name:

As(O)(OH)(SH)2 -> arsorodithioic acid (BB L35636)
P(O)(SH)3 -> phosphorotrithioic acid
C6H5-P(O)(SH)2 -> phenylphosphonodithioic acid

SAFELY NARROW by design (0-wrong + the tautomer-locant spelling-blind spot): it fires ONLY when the =O is present and >=2 replacements are the SAME chalcogen, so a locant is provably omitted. It FAILS CLOSED on every case that needs an italic tautomer locant — a MONO replacement (arsorothioic S-acid / O,O,O-acid), a =S/=Se double bond, a mixed chalcogen set, or a peroxo / class-infix mix. Those belong to a phase Group A’s derivation; here they degrade to the existing paths / abstain, never to a wrong spelling. Every emission is OPSIN-round-trip gated downstream. Pure: no mol mutation.

orthonym.rules.inorganic_acids.name_p_oxoacid_halide_amide(mol)#

/ mononuclear P/As/Sb oxoacid HALIDE / AMIDE PIN.

The oh_count == 0 sibling of:func:name_p_oxoacid_frn: every acidic -OH is replaced, so the compound is not class ‘acid’ — its class word is a halide / pseudohalide or, when no halide is present and every -OH became -NH2, an amide. The acid STEM WORD is the same one name_p_oxoacid_frn() builds (phenylphosphonous, phenylphosphonic, N,N-dimethylphosphoramidic); the halide/amide builders append the class word(s) in / (b) seniority order:

C6H5-PBrCl -> phenylphosphonous bromide chloride (BB L35718)
(C6H5)2P-Cl -> diphenylphosphinous chloride (BB L35712)
C6H5-PCl2 -> phenylphosphonous dichloride (BB L35716)
(CH3)2N-P(O)Cl2 -> N,N-dimethylphosphoramidic dichloride

Fail-closed (None) off this exact shape. In particular it declines the bare skeletal-0 no-infix case (POCl3 = phosphoryl trichloride, the

acyl-word exception — owned by the existing acyl path), any -OH

left (that is class ‘acid’ -> the acid paths own it), an E=N/E=S multiple bond, an ester -OR neighbour, and the organyl+N-substituent combination that needs E-/N- locant disambiguation. Pure: no mol mutation.

orthonym.rules.inorganic_acids.amido_n_has_substituent(mol, n_idxs, ctr_idx)#

True if any candidate amide nitrogen carries a non-H substituent (an N-substituted amide needs N-/P- locant assembly — out of this simple scope).

orthonym.rules.inorganic_acids.name_p_frn_ester(mol)#

FRN-modified phosphorus-acid ESTER PIN.

An ester of a functional-replacement-modified phosphorus acid: the central P carries one or more -O-R ester owners AND at least one class infix (amido -N< / halido -Cl/-F/-Br/-I / cyanatido -OCN). The ester suffix is -ate for the pentavalent (P=O) acid and -ite for the trivalent one, replacing the acid’s -ic ending on the SAME stem word that build_p_frn_acid_stem_word() builds:

CH3-O-P(Cl)-N(CH3)2 -> methyl N,N-dimethylphosphoramidochloridite
CH3-O-P(=O)(Cl)-NH2 -> methyl phosphoramidochloridate

Requires >=1 ester owner AND >=1 class infix, so a plain phosphate/phosphite ester (owned by:func:~orthonym.rules.phosphorus.name_phosphate_ester) and a free FRN acid (owned by:func:name_p_oxoacid_frn) never reach here — this is a non-overlapping ADDITION, not a change to the hot ester path. Fail-closed off the shape (an ester -OR to non-C/S, an E=N/E=S bond, the organyl+N-substituent combination needing E-/N- locants, or an atom left unaccounted). Pure: no mol mutation.

orthonym.rules.inorganic_acids.name_silicic_acid_frn(mol)#

chalcogen-prefix functional replacement on silicic acid.

Silicic acid Si(OH)4 with one or more -OH replaced by -SH / -SeH / -TeH -> {thio|seleno|telluro}silicic acid (prefixes, cited alphabetically, no ‘o’ elision, no italic locant; BB L35670 Si(OH)3(SH) thiosilicic acid).

Fail-closed (returns None) off this exact shape: any Si-C bond (genuine organosilicon), any non-OH/non-chalcogenol neighbour, no chalcogen replacement at all (-> the tabled silicic acid row owns it), no -OH left (not class ‘acid’), a charge, or more than one Si. Pure: no mol mutation.

orthonym.rules.inorganic_acids.name_borane_amine(mol)#

: amides of the boron acids are named SUBSTITUTIVELY on the parent hydride borane (BH3), not as boric triamide.

B(NH2)3 -> boranetriamine (BB L35838; ‘not boric triamide’) HB(NH2)2 -> boranediamine H2B-NH2 -> boranamine

Fail-closed (returns None) off this exact shape: any B-C or B-O bond (a carbon-bearing boron -> boronic path; an oxygen-bearing boron -> the boric-acid table), an N that is not a terminal -NH2, a charge, more than one B, or any heavy atom other than B/N. Pure: no mol mutation.

orthonym.rules.inorganic_acids.name_polyacid_derivative(mol)#

/.2.3/.2.4/.2.5.3: PIN for a di-nuclear noncarbon-oxoacid derivative (Engine B). Handles, off a tightly-detected backbone:

  • uniform full replacement -> functional class /.2.4): diphosphoric tetrachloride / diphosphoric tetraamide

  • bridge chalcogen replacement -> prefix at the bridge locant: 2-thiodisulfuric acid

  • partial replacement -> class prefix on the acid with centre locants : 1,3-diamidodiphosphoric acid

  • full acyl esterification -> anhydride: tetraacetic hypodiphosphoric tetraanhydride

Fail-closed (returns None) off the tabled backbone set or for any mixed / unrecognised acid-position group. Pure: no mol mutation. The free parent acids (diphosphoric / disulfuric) are the tabled table rows and never reach here.

orthonym.rules.inorganic_acids.name_polyacid_anion(frag_mol)#

: anion word for a (partially or fully) deprotonated di-/polynuclear noncarbon-oxoacid whose NEUTRAL parent is a tabled polyacid. Re-protonates every terminal -O(-) to -OH, and iff the result is a recognised di-nuclear polyacid backbone with a tabled ...ic acid parent, returns the anion word ('ic acid' -> 'ate'): diphosphate / disulfate / hypodiphosphate.

Fail-closed (returns None) for a non-anion, a mononuclear phosphate/sulfate (owned by the INORGANIC_ANIONS retained table), or any backbone outside the tabled polyacid set. Pure: operates on a COPY, no input mutation.

orthonym.rules.inorganic_acids.name_carbonic_frn_family(mol)#

/.1.3 + -.4: PIN for a mononuclear carbonic/carbamic functional-replacement acid or a di-/tri-/tetra-carbonic FRN acid, else None.

Fail-closed by total heavy-atom accounting; pure (no mutation). The plain parents (carbonic/dicarbonic acid) and the already-tabled FRN rows are matched by the exact table BEFORE this producer, so it only fires on genuine gaps.

orthonym.rules.inorganic_acids.name_carbonic_class_derivative(mol)#

The Task 13 functional classes of carbonic and cyanic acid (see the block comment above), else None.

orthonym.rules.inorganic_acids.name_hydrazinecarboxamide(mol)#

PIN for a substituted / multiplicative hydrazinecarboxamide, or None.

orthonym.rules.inorganic_acids.name_inorganic_acid(mol)#

Return the PIN for a free inorganic oxoacid or its tabled functional-class derivative (acid halide / amide / carbonic-FRN acid), the tetraalkyl silicate ester, else None.

Pure: no mol mutation, no global state. Recomputes the RDKit canonical SMILES so the key matches regardless of how the input was written.

orthonym.rules.inorganic_acids.name_azinic_derivative(mol)#

ylidene derivatives of azinic acid H2N(O)OH (Wave-2 completion C): CH3-CH=N(O)-OH -> ethylideneazinic acid (BB verbatim; aci-nitroethane). Fail-closed: exactly one N+ with a -O(-), an -OH and a DOUBLE bond to an unbranched all-carbon chain; net charge 0; nitro tautomers (=O on N) and nitronate anions never match. Pure.