Orthonym — Third-Party Components
=================================

Orthonym's own source is released under the MIT License.

Orthonym uses two third-party Java programs. They are NOT part of this
repository and are NOT included in any Orthonym package. They are downloaded
from their official releases into the user's cache: `pip install` tries to
fetch them when it builds the package, a jar that is still missing is
downloaded the first time Orthonym needs it (unless ORTHONYM_NO_DOWNLOAD=1),
and `orthonym --fetch-jars` fetches them, or re-checks the ones in the jar
directory, at any time. Each download, and each jar found in the jar
directory, is checked against the SHA-256 below before it is used; a jar given
by ORTHONYM_OPSIN_JAR or ORTHONYM_CENTRES_JAR is used as given, without the
checksum check. Each jar keeps its own licence terms, listed here.

Orthonym runs them unmodified, as separate programs on the Java virtual
machine (by default in one in-process JVM via JPype, or as a `java -jar`
subprocess). If a jar cannot be found or downloaded, Orthonym stops with an
error rather than naming with less validation; setting ORTHONYM_ALLOW_REDUCED=1
opts in to naming without them. Without a working Java runtime it declines
every molecule rather than naming it unchecked.


OPSIN — opsin-cli-2.9.0-jar-with-dependencies.jar
-------------------------------------------------
- Component:  OPSIN (Open Parser for Systematic IUPAC Nomenclature), name -> structure
- Version:    2.9.0
- Download:   https://github.com/dan2097/opsin/releases/download/2.9.0/opsin-cli-2.9.0-jar-with-dependencies.jar
- SHA-256:    c2e29326c281f87b59a05d934d8589adac6e9d17b95b984931b3e739111b360f
- License:    MIT (OPSIN itself; Copyright (c) Daniel Lowe and contributors).
              The jar also bundles further third-party libraries under their own
              licences; see the OPSIN release and the notices inside the jar.
- Used for:   round-trip validation of names: OPSIN reads a name back to a
              structure, which must match the input. The few names the default
              tier ships that OPSIN cannot read in full (names from exact-match
              lists, a few name forms its grammar lacks or misreads, and names
              whose stereodescriptors it cannot parse) are marked by
              `orthonym --provenance`.
- Source:     https://github.com/dan2097/opsin


centres — centres-cli-1.2.1.jar
-------------------------------
- Component:  centres, a Cahn-Ingold-Prelog stereo descriptor labeller (reference
              implementation of Hanson et al. 2018), with a CDK backend
- Version:    1.2.1 (tagged release; saved under the name centres-cli-1.2.1.jar)
- Download:   https://github.com/SiMolecule/centres/releases/download/1.2.1/centres.jar
- SHA-256:    6c5d5cafa9393ed7b667a2340222348cd15a9bbdd0d1b92518229f26cc5e87fb
- Size:       2,291,742 bytes; Main-Class com.simolecule.centres.LabelCip
- License:    BSD-2-Clause (centres itself; Copyright (c) 2020, John Mayfield;
              its LICENSE file, source headers and README; the Maven pom names
              LGPL-3.0, which the LICENSE file does not).
              As a shaded jar it also bundles, in binary form:
                * CDK 2.9 (Chemistry Development Kit) — LGPL-2.1-or-later
                  (source: https://github.com/cdk/cdk)
                * javax.vecmath 1.5.2 — GPL-2.0-only with the Classpath exception
                  (source: https://github.com/hharrison/vecmath)
                * Beam 1.3.5 (uk.ac.ebi.beam) — BSD-2-Clause (the FreeBSD text
                  with the "views" paragraph; source: https://github.com/johnmay/beam)
- Used for:   R/S and E/Z stereo descriptors. On the Hanson 2018 CIP Validation
              Suite it labels 281/290 correctly (RDKit's rdCIPLabeler: 235/290);
              tests/integration/test_cip_validation.py asserts the score.
- Source:     https://github.com/SiMolecule/centres


Files derived from OPSIN
------------------------
OPSIN is MIT licensed (Copyright (c) Daniel Lowe and contributors; source:
https://github.com/dan2097/opsin). These files of this repository hold data
taken from OPSIN's resource files (uk/ac/cam/ch/wwmm/opsin/resources/ in the
OPSIN jar and source tree); each .py file carries the notice in its header.

- src/orthonym/data/opsin_imports/regex_tokens_xml.json holds OPSIN 2.9.0's
  resource regexTokens.xml, byte-identical to the entry in the jar above
  (SHA-256 recorded in the file). It lets the name-grammar check load without
  the jar.
- src/orthonym/data/opsin_imports/*.py, generated by
  scripts/import_opsin_xml.py from OPSIN's XML resources:
    amino_acids_opsin.py          aminoAcids.xml
    aryl_groups.py                arylGroups.xml
    carbohydrates_opsin.py        carbohydrates.xml, carbohydrateSuffixes.xml
    carboxylic_acids_opsin.py     carboxylicAcids.xml
    cyclic_groups.py              simpleCyclicGroups.xml,
                                  cyclicUnsaturableHydrocarbon.xml
    functional_terms.py           functionalTerms.xml
    fusion_components_opsin.py    fusionComponents.xml
    natural_products_opsin.py     naturalProducts.xml
    simple_groups.py              simpleGroups.xml
    substituent_names_opsin.py    simpleSubstituents.xml, substituents.xml
    suffix_rules.py               suffixRules.xml, suffixApplicability.xml
    word_rules.py                 wordRules.xml
    __init__.py                   merges the modules above
- src/orthonym/data/hw_stems.py (from hwSuffixes.xml) and the OPSIN amino-acid
  entries of src/orthonym/data/amino_acids.py (from aminoAcids.xml).


Fonts in the README pictures
----------------------------
The README pictures that carry text (assets/readme-*.svg) embed two fonts as
WOFF2 data (an SVG loaded as an image cannot fetch a font). The WOFF2 files they are built from, by
docs/readme/build.py, are in docs/readme/src/fonts/.

- Public Sans 2.001 (regular, semibold and italic faces): SIL Open Font License,
  Version 1.1; Copyright 2015 The Public Sans Project Authors.
  Source: https://github.com/uswds/public-sans
- JetBrains Mono 2.211: SIL Open Font License, Version 1.1; Copyright 2020 The
  JetBrains Mono Project Authors. Source: https://github.com/JetBrains/JetBrainsMono
- docs/readme/src/fonts/ also holds Saira Condensed 0.072 (not embedded in any
  picture): SIL Open Font License, Version 1.1; Copyright 2016 The Saira
  Project Authors, reserved font name "Saira".
  Source: https://github.com/Omnibus-Type/Saira

The licence text, as the font files cite it: https://scripts.sil.org/OFL.

RDKit and the other Python dependencies are installed by pip under their own
licences and are not redistributed by this repository.
