Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,36 @@

OPSIN - Open Parser for Systematic IUPAC Nomenclature
=====================================================
__Version 2.8.0 (see [ReleaseNotes.txt](https://raw.githubusercontent.com/dan2097/opsin/master/ReleaseNotes.txt) for what's new in this version)__
__Version 2.9.0 (see [ReleaseNotes.txt](https://raw.githubusercontent.com/dan2097/opsin/master/ReleaseNotes.txt) for what's new in this version)__
__Source code: <https://github.com/dan2097/opsin>__
__Web interface and informational site: <https://opsin.ch.cam.ac.uk/>__
__License: [MIT License](https://opensource.org/licenses/MIT)__

OPSIN is a Java library for IUPAC name-to-structure conversion offering high recall and precision on organic chemical nomenclature.

Java 8 (or higher) is required for OPSIN 2.8.0
Java 8 (or higher) is required for OPSIN 2.9.0

Supported outputs are SMILES, CML (Chemical Markup Language) and InChI (IUPAC International Chemical Identifier)

### Simple Usage Examples
#### Convert a chemical name to SMILES
`java -jar opsin-cli-2.8.0-jar-with-dependencies.jar -osmi input.txt output.txt`
`java -jar opsin-cli-2.9.0-jar-with-dependencies.jar -osmi input.txt output.txt`
where input.txt contains chemical name/s, one per line

NameToStructure nts = NameToStructure.getInstance();
String smiles = nts.parseToSmiles("acetamide");

#### Convert a chemical name to CML
`java -jar opsin-cli-2.8.0-jar-with-dependencies.jar -ocml input.txt output.txt`
`java -jar opsin-cli-2.9.0-jar-with-dependencies.jar -ocml input.txt output.txt`
where input.txt contains chemical name/s, one per line

NameToStructure nts = NameToStructure.getInstance();
String cml = nts.parseToCML("acetamide");

#### Convert a chemical name to StdInChI/StdInChIKey/InChI with FixedH
`java -jar opsin-cli-2.8.0-jar-with-dependencies.jar -ostdinchi input.txt output.txt`
`java -jar opsin-cli-2.8.0-jar-with-dependencies.jar -ostdinchikey input.txt output.txt`
`java -jar opsin-cli-2.8.0-jar-with-dependencies.jar -oinchi input.txt output.txt`
`java -jar opsin-cli-2.9.0-jar-with-dependencies.jar -ostdinchi input.txt output.txt`
`java -jar opsin-cli-2.9.0-jar-with-dependencies.jar -ostdinchikey input.txt output.txt`
`java -jar opsin-cli-2.9.0-jar-with-dependencies.jar -oinchi input.txt output.txt`
where input.txt contains chemical name/s, one per line

NameToInchi nti = new NameToInchi()
Expand All @@ -44,7 +44,7 @@ where input.txt contains chemical name/s, one per line

NOTE: OPSIN's non-standard InChI includes an additional layer (FixedH) that indicates which tautomer the chemical name described. StdInChI aims to be tautomer independent.
### Advanced Usage
OPSIN 2.8.0 allows enabling of the following options:
OPSIN 2.9.0 allows enabling of the following options:

* allowRadicals: Allows substituents to be interpretable e.g. allows interpretation of "ethyl"
* wildcardRadicals: If allowRadicals is enabled, this option uses atoms in the output to represent radicals: 'R' in CML and '*' in SMILES e.g. changes the output of ethyl from C[CH2] to CC\*
Expand All @@ -54,7 +54,7 @@ OPSIN 2.8.0 allows enabling of the following options:
* verbose: Enables debugging output (command-line only). This option has the effect of lowering the logging threshold on the uk.ac.cam.ch.wwmm.opsin package to DEBUG.

The usage of these options on the command line is described in the command line's help dialog accessible via:
`java -jar opsin-cli-2.8.0-jar-with-dependencies.jar -h`
`java -jar opsin-cli-2.9.0-jar-with-dependencies.jar -h`

These options may be controlled using the following code:

Expand All @@ -77,24 +77,24 @@ NOTE: (Std)InChI cannot be generated for polymers or radicals generated in combi

### Availability
OPSIN is available as a standalone JAR from GitHub, <https://github.com/dan2097/opsin/releases>
* `opsin-cli-2.8.0-jar-with-dependencies.jar` can be executed as a command-line application. It includes SMILES/CML/InChI support and bundles a logging implementation.
* `opsin-core-2.8.0-jar-with-dependencies.jar` includes just SMILES/CML support.
* `opsin-cli-2.9.0-jar-with-dependencies.jar` can be executed as a command-line application. It includes SMILES/CML/InChI support and bundles a logging implementation.
* `opsin-core-2.9.0-jar-with-dependencies.jar` includes just SMILES/CML support.

OPSIN is also available from the Maven Central Repository.
For SMILES/CML output support you would include:

<dependency>
<groupId>uk.ac.cam.ch.opsin</groupId>
<artifactId>opsin-core</artifactId>
<version>2.8.0</version>
<version>2.9.0</version>
</dependency>

or if you also need InChI output support:

<dependency>
<groupId>uk.ac.cam.ch.opsin</groupId>
<artifactId>opsin-inchi</artifactId>
<version>2.8.0</version>
<version>2.9.0</version>
</dependency>

#### Building from source
Expand Down
36 changes: 36 additions & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
Version 2.9.0 (2025-11-29)
fcb28737 Updated commons-io to 2.21.0
2844311e Updated commons-cli to 1.11.0
e87a50ee Updated woodstox to 7.1.1
6ab67de9 Updated jna-inchi to 1.3.1
76387224 Updated Log4j to 2.25.2
0635fa98 triazine is now interpreted as 1,3,5-triazine when not in a fused ring system
e47047b7 bis-ethylhexyloxyphenol methoxyphenyl triazine is a trivial name
9e282844 Ensure visited is null for atoms encountered that are not in the current fragment
f4fe7511 Stylistic changes
6757e9ea Improvements to the SMILESWriter
5c95b8c6 Added numbering to nicotine
6ebbb689 Corrected method name
45c3eec2 Include warnings on stderr when calling OPSIN from command-line
cfdac8d1 Added unit test
212e03b7 Changed SMILES writer bond iteration order to process adjacent double bonds first
d0b5c410 Added convenience method to flip value of SMILES_BOND_DIRECTION enum
801d20c6 Tidy/simplify code
32c2bb09 Dep updates (#266)
93163ada Generalized recognition of terms that are typically implicitly bracketted to all groups accepting additive bonds
953a6d4e Corrected locants on tolyl to be consistent with Blue book 1979 A-13.1
f1583848 Fix out of bounds exception
feaf19e9 Correctly support locanted perhalo terms and perhaloalkylalkanes
79a8aa25 Dep updates (#262)
91ae24fa Fixed bug in spiro superscript inferring when a bridge is length 0
94eec729 Disambiguation [yliden][ethenyl] vs [ylidene][thenyl] in favour of [yliden][ethenyl]
e5d206f8 Implicitly remove functional atoms when performing substitutions
f252ea7b Added support for reading IUPAC recommended primed number-letter locants e.g. 2''a
22fb586b Reject invalid Hantzsch-Widman systems with duplicate locants
0c0d96f4 Assign charge to sulfur on dithiazolium
42f826e1 Use assertTrue/assertFalse
a876bfaf Prefer isEmpty
7cc825bf Code simplification
5fe8a542 Corrected typo
12c6f24b [maven-release-plugin] prepare for next development iteration

Version 2.8.0 (2023-10-29)
Support for undecahectane/undecadictane (previously only hendeca was supported)
Support for dicarboximido
Expand Down
2 changes: 1 addition & 1 deletion opsin-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>opsin</artifactId>
<groupId>uk.ac.cam.ch.opsin</groupId>
<version>3.0-SNAPSHOT</version>
<version>2.9.0</version>
</parent>
<artifactId>opsin-cli</artifactId>
<name>OPSIN Command Line interface</name>
Expand Down
2 changes: 1 addition & 1 deletion opsin-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>opsin</artifactId>
<groupId>uk.ac.cam.ch.opsin</groupId>
<version>3.0-SNAPSHOT</version>
<version>2.9.0</version>
</parent>
<artifactId>opsin-core</artifactId>
<name>OPSIN Core</name>
Expand Down
2 changes: 1 addition & 1 deletion opsin-inchi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>opsin</artifactId>
<groupId>uk.ac.cam.ch.opsin</groupId>
<version>3.0-SNAPSHOT</version>
<version>2.9.0</version>
</parent>
<artifactId>opsin-inchi</artifactId>
<name>OPSIN InChI Support</name>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>uk.ac.cam.ch.opsin</groupId>
<artifactId>opsin</artifactId>
<version>3.0-SNAPSHOT</version>
<version>2.9.0</version>
<packaging>pom</packaging>
<name>OPSIN</name>
<description>Open Parser for Systematic IUPAC Nomenclature</description>
Expand All @@ -21,7 +21,7 @@
<developerConnection>
scm:git:https://github.com/dan2097/opsin
</developerConnection>
<tag>HEAD</tag>
<tag>2.9.0</tag>
</scm>
<developers>
<developer>
Expand Down