Command line#
orthonym names one SMILES, or a file of them. python -m orthonym is the same program. Every option is listed below in plain words, grouped by what it is for; the option reference prints the program’s own help text.
$ orthonym "c1ccccc1"
benzene
Naming#
orthonym "SMILES"Print the name of one structure.
--style {pin,general,cas}pin(the default) aims at the Preferred IUPAC Name.generalallows a few general IUPAC forms where the recommendations offer one.casis accepted and at present gives the same names aspin.--enable-triviality-controllerWhere the IUPAC 2013 recommendations prefer a retained parent name (benzene, phenol, aniline, benzoic acid and others) to the systematic one, use it (P-15.1.8). Every change is checked by an OPSIN round trip.
ORTHONYM_ENABLE_TRIVIALITY_CONTROLLER=1turns it on too.--trivialWhen no preferred name can be built, also allow a retained trivial name that is not a preferred name. A preferred name that can be built is never replaced: glycerol stays
propane-1,2,3-triol. Without this option a small table of retained trivial names is still used as a last resort at the wider tiers (the default tier declines those names); the provenance row labels themsystematic_verifiedwith sourcetrivial_retained.
Tiers#
--emit-tier {pin,valid,complete,best-effort,full-coverage}Which names to return. The default,
pin, returns a name only when the pipeline can build the preferred IUPAC name (PIN), that is when the strict PIN path built the name and verified it (pin_verified). The only exceptions are names from the natural-product and metal-complex lists, the name formats absent from OPSIN’s grammar (for example inositols, phanes and thioperoxols), and PINs whose stereodescriptors OPSIN cannot read, for which the default tier compares the constitution. Otherwise it declines, with the reason codeNO_VERIFIED_PINwhen it built a name that is not a verified PIN.validadds names from the general engine,completeadds general names for aromatic and heterocyclic ring systems,best-effortadds the last-resort producers, von Baeyer and spiro names for ring systems of up to 100 skeletal atoms and 11 rings (the other tiers build these names for ring systems of up to 40 skeletal atoms and 8 rings), and adducts with a one-atom ion such as chloride, andfull-coverageadds the coordination-name builder for metal tetrapyrrole and corrin complexes. The wider tiers also return the names the default tier declines, each labelled with its tier. See Output tiers.
Output#
--provenancePrint a JSON row instead of the bare name: the name, its tier, and how it was checked. One SMILES at a time. See The provenance row.
--confidencePrint the name with a coverage score, the part of the engine that built it, and the parts of the score. When no measurement was taken it says so:
Confidence: unverified (no coverage measurement was taken).--verbose,-vAlso print the SMILES and the style. With
--batchand--output, also say how many lines were named and how many failed.--dump-tree,--format {text,json}Print the parts of the name as a tree instead of the name.
$ orthonym --dump-tree "OC1CCCCC1"
NameTree: cyclohexanol (class_id=general_acyclic, cite=P-14+P-23+P-44)
+- parent_stem: 'cyclohex'
|- suffix: 'ol'
Batch#
--batch FILE,-b FILEName every SMILES in the file, one per line. See Batch files.
--output FILE,-o FILEWith
--batch, write the lines to this file instead of the screen.
Diagnostics#
These are for looking inside the engine. None of them changes a name, except --binding-proof enforce, which can decline one.
--fetch-jarsDownload the OPSIN and centres jars if they are missing, check them, print where they are, and stop. See Install.
--validation-statsAfter the name, print on the error stream how often the OPSIN grammar pre-check passed or repaired a candidate name.
--dispatch-statsAfter the name, print on the error stream which compound-class routes the engine took.
--engine-onlySkip the strict path and print, as JSON, the general engine’s own name, checked for atom coverage but not by OPSIN. Never a preferred name; do not use it as a name.
--binding-proof {off,audit,enforce}An extra check that every part of a general-engine name still maps onto its atoms in the final name.
auditrecords the result and never changes the name;enforcealso declines when the check fails.--version,-VPrint the installed version, in the form
orthonym 1.0.2.
Exit status#
0 when the name (or the label for a decline) was printed; 1 for a SMILES that RDKit cannot read, or a batch with at least one such line; 2 when a jar can be neither found nor downloaded.