vibesketch.naming.opsin¶
Structures from names through OPSIN, an optional route (#94).
OPSIN, the Open Parser for Systematic IUPAC Nomenclature (D. M. Lowe, P. T. Corbett, P. Murray-Rust and R. C. Glen, “Chemical Name to Structure: OPSIN, an Open Source Solution”, J. Chem. Inf. Model. 51 (2011) 739-753, doi:10.1021/ci100384d), reads systematic, CAS-style and many trivial names.
It is the [opsin] extra: the OPSIN command-line jar as the py2opsin
package ships it, run on a Java runtime the user already has. The jar is run
directly, the names on its standard input and the SMILES read from its
output, one line per name, so no file is written; the wrapper’s own
function, which writes a temporary file into the working directory, is not
used. OPSIN works offline: nothing is looked up on the network.
Module Attributes
|
The longest name passed to OPSIN. |
|
How long one OPSIN run may take, in seconds; the first run starts the Java VM. |
Functions
Whether the OPSIN jar and a Java runtime are both there. |
|
|
OPSIN's structure for |
Classes
|
OPSIN's SMILES for a name, or why it could not read the name. |
Exceptions
OPSIN or a Java runtime to run it on is missing. |
- class vibesketch.naming.opsin.OpsinResult(name, smiles, reason=None)[source]¶
Bases:
objectOPSIN’s SMILES for a name, or why it could not read the name.
Bases:
RuntimeErrorOPSIN or a Java runtime to run it on is missing.
- vibesketch.naming.opsin.opsin_available()[source]¶
Whether the OPSIN jar and a Java runtime are both there.
- Return type:
- vibesketch.naming.opsin.read_name(name)[source]¶
OPSIN’s structure for
name; raisesOpsinUnavailablewithout OPSIN or Java.- Parameters:
name (str)
- Return type: