The provenance row#
orthonym "SMILES" --provenance prints one row of JSON instead of the bare name, and Orthonym.name_tiered returns the same row as a dictionary. It says what the name is, how it was built, which code built it and how it was checked.
$ orthonym "Cn1cnc2c1c(=O)n(C)c(=O)n2C" --provenance
{"name": "1,3,7-trimethyl-3,7-dihydro-1H-purine-2,6-dione", "tier": "pin_verified", "is_pin": true, "source": "pin_path", "opsin": "verified", "gates_passed": ["self_consistency"], "gate_outcome": "self_consistency_verified", "formula": null, "limit_code": null, "stereo_unexpressed": false, "suffix_free_prefix_name": false, "prefix_order_fallback": false, "verified": "opsin", "spelling_failures": [], "producer": "inner:tier_a_ring"}
Every field#
nameThe name, or the label for a decline (the row is the record of the decline, so
--on-failuredoes not change it). With--emit-tierother thanpin, a decline givesnullhere.tierHow the name was built:
pin_verified,pin_unverified,systematic_verified,best_effortorabstain. See Output tiers.is_pintrueonly for a certified Preferred IUPAC Name.sourceWhich part of the engine produced the name:
pin_path(the strict path; atbest-effortit also labels thecisortransname of a monocycle’s pair of stereocentres, which is made from a name with lowercaserandsthat the engine built for the whole molecule and OPSIN cannot read, with the tiersystematic_verified, and the name the default tier ships although OPSIN cannot read its stereodescriptors, for a molecule that has no other name, with the tierpin_unverified),general_engine,trivial_retained(a retained trivial name: from the last-resort table, or a trivial natural-product name such asdiamorphine),t4_floor(a last-resort producer) orabstain. It is coarse;produceris the finer field.opsinWhat the OPSIN check found:
verified,verified_constitution_only(the constitution matched; the stereodescriptors were not compared),verified_twin(OPSIN has no grammar for the name and read a twin spelling of it back to your structure),unverified, orn/awhen there is no name.gates_passedThe checks this name passed, for example
self_consistency(OPSIN read the name back to your structure),atom_coverage(every atom is named),full_key_round_triportwin_round_trip(OPSIN read a twin spelling of the name back to your structure).gate_outcomeWhat the final OPSIN check did for this name:
self_consistency_verified,full_key_round_trip_verified,self_consistency_constitution_only,suppressed(a candidate failed and was withdrawn),not_run,unavailable(no OPSIN check ran: the opt-in reduced mode without the jars),carveout:<class>for a name class that OPSIN cannot read, ortwin_verified:<rules>for a name read back through its twin spelling (the ids of the rewrites that made the twin, joined by+).formulaThe molecular formula, given when there is no name, so a decline still tells you what came in.
limit_codeThe reason code of a decline, for example
UNSUPPORTED_ELEMENTor, at the default tier,NO_VERIFIED_PIN(the engine built a checked name that is not a verified PIN). See Declines.stereo_unexpressedtruewhen your structure configures a stereo element (a stereocentre, or a double bond drawn with/and\) that the name does not state. The check counts the stereo elements that OPSIN’s read-back of the name configures (the read-back the final check keeps, so a name it has read is not read again): fewer than your structure configures sets the flag. It is for a name of any producer, and it changes nothing else: not the name, not the tier, notis_pin. A Preferred IUPAC Name can carry it.C[N+](C)=C/C=C/C=C/N1CCCC1gives1-[5-(dimethylamino)penta-2,4-dien-1-ylidene]pyrrolidin-1-ium,pin_verified, with the flagtrue: the two double bonds you configured are single bonds in this form of the cation, so the name cannot state them, and the standard InChIKey does not see them, so the read-back still matches. The flag isfalsewhen the read-back states every element, and when there is no read-back, because OPSIN cannot read the name (a name with lowercaserands, a name from an exact-match list): the flag does not guess from the text of the name.suffix_free_prefix_nametruewhen the name states the principal characteristic group as a prefix with no suffix, a form the recommendations do not allow.prefix_order_fallbacktruewhen abest_effortname cites its substituent prefixes in an order other than the alphanumerical one, because the name in the standard order did not pass its round trip for its stereodescriptors alone. Such a name is never a Preferred IUPAC Name; the default tier does not use it.verifiedWhether the name was read back, in one word:
opsin(OPSIN read the name back to the same molecule),opsin_constitution(OPSIN read it back with the same constitution; the stereodescriptors were not confirmed by OPSIN),identity(a name from an exact-match list: a metal-complex name found by your structure’s exact InChIKey, or a natural-product parent name found by its exact structure; OPSIN cannot read these names),opsin_split(OPSIN read the name back to your structure drawn without its dative bonds, because RDKit gives a drawing with dative bonds no standard InChIKey to read a name back against; a count of atoms and charges ties the two drawings),opsin_twin(a PIN spelling OPSIN has no grammar for: OPSIN read a twin spelling of the same structure back to your structure; How every name is checked), orunverified(no read-back recorded).spelling_failuresThe spelling rules of the Preferred IUPAC Name that a name in preferred-name form breaks, as a list of
{"rule": ..., "detail": ...}entries, and the rule of a part of the name that the engine records as not the preferred form. A name reached through another drawing of the same compound is listed here too, and thedetailsays so. OPSIN cannot see these: a name can read back to your structure and still break one. Such a name issystematic_verifiedat most; the default tier declines it withNO_VERIFIED_PINand keeps the entries as the reason. The list is empty otherwise.producerThe code that built the name that ships, for example
inner:tier_a_ringorengine:general;nullwhen no name ships, a default-tierNO_VERIFIED_PINdecline included. See Which code built the name.
Which code built the name#
source has five values and records the last producer that wrote it. producer is the finer field: the id of the code that built the name that ships. Use it to find the code to look at before you change a rule (Architecture), or to count which producers name a set of molecules.
The deepest builder.
producernames the code that built the string, not the class that passed the molecule on. A peptide whose name an inner handler composed shows that handler, notouter:peptide. When two codes return the same name, the first one to return it is reported, which is the innermost.Another drawing of a metal compound. A metal compound that is named through another drawing of it (Metal compounds) shows the code that built the name of that drawing:
Cl[Zn]Clis named through its ionic drawing and givesouter:salt, a bare zinc atom givesouter:metal_atom.The
cisortransname of a ring pair. Atbest-effort, a name withcisortransis made from the name with lowercaserandsthat a code built for the whole molecule (Tiers). The row names that code:trans-cyclohexane-1,4-diolgivesinner:general_acyclic, the code that built(1r,4r)-cyclohexane-1,4-diolat the default tier.nullwhen no name ships. The default tier can build a name and withhold it (NO_VERIFIED_PIN, see Declines). Nothing ships then, so no code is named; a wider tier returns the name, and its row names the code.A diagnostic, not a contract. The ids follow the code’s class and handler ids and can change in any release: count with them, do not parse them.
Only the row has it.
Orthonym.name_tieredand--provenancereturn the key;name_compoundreturns the bare name.
|
The code that built the name |
|---|---|
|
A class of the outer table, with the class id in lower case: |
|
An inner handler: |
|
The composer assembled the name itself; no inner handler built it. |
|
The general engine. |
|
The last-resort namer of the |
|
The fragment-based namer, which names a large structure from its parts. |
|
The recovery for an input of several components: each component is named and the names are joined. |
|
A retained fused-ring name for a molecule that holds a purine without being a fused ring itself, such as an acyl coenzyme A or ADP-ribose. |
|
The isotope step, which names an isotopically labelled molecule by adding the isotope descriptors to the name of its skeleton. |
|
The list of metal-complex names, matched by the exact structure ( |
|
The last-resort table of retained trivial names. |
|
The list of natural-product parent names, matched by the exact structure, used as a fallback. |
|
A retained or fused-ring name for a molecule that is exactly such a structure, which the late recovery prefers to the engine’s own name when it reads back. |
Read tier and verified together#
The tier says how a name was built. The verified field says whether OPSIN read it back. The two can differ: at the default tier, cis-decalin gets a name in preferred-name form that OPSIN read back with the right constitution only.
$ orthonym "C1CC[C@H]2CCCC[C@H]2C1" --provenance
{"name": "(4as,8as)-decahydronaphthalene", "tier": "pin_unverified", "is_pin": false, "source": "pin_path", "opsin": "verified_constitution_only", "gates_passed": ["self_consistency_constitution_only"], "gate_outcome": "self_consistency_constitution_only", "formula": null, "limit_code": null, "stereo_unexpressed": false, "suffix_free_prefix_name": false, "prefix_order_fallback": false, "verified": "opsin_constitution", "spelling_failures": [], "producer": "inner:tier_a_ring"}
--provenance works for one SMILES at a time; --batch ignores it. For many molecules, loop over Orthonym.name_tiered as shown on Batch files.