skillfed

py2opsin

Simple Python interface to OPSIN: Open Parser for Systematic IUPAC nomenclature

py2opsin v1.2.0 221.2K downloads/30d#9,283 on PyPI81
Permissive license MIT Active released

What it is and what it does

py2opsin is a lightweight Python wrapper around OPSIN, an open-source chemical nomenclature parser. It translates IUPAC chemical names into standardized molecular representations like SMILES, InChI, and CML. The package bundles OPSIN v2.9.0, so installation requires only Python and a runtime Java 8+ environment; it has minimal Python dependencies (only typing_extensions).

The primary use case is batch conversion of chemical names to structures, which is dramatically faster than making individual network requests to external services. The package accepts single names or lists of names and supports multiple output formats and parsing options (acid interpretation, radical handling, stereochemistry strictness). It is designed for cheminformatics workflows where you need to resolve chemical nomenclature locally without external API calls.

Use it for:

  • Convert a list of IUPAC names from a research paper into SMILES strings for molecular property analysis or machine learning.
  • Batch-process chemical datasets where names are the primary identifier, converting them to canonical structures for downstream analysis.
  • Resolve chemical nomenclature in automated workflows without relying on network calls or rate-limited external APIs.
  • Explore chemical space by translating historical chemical names or nomenclature variants into modern structure formats.
  • Support cheminformatics pipelines that require local, deterministic name-to-structure resolution with configurable parsing rules.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

py2opsin converts IUPAC chemical names to molecular structure representations (SMILES, InChI, CML, and other formats) by wrapping the OPSIN parser, with OPSIN v2.9.0 bundled in the package.

Yes. py2opsin is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It solves a real problem (batch IUPAC-to-structure conversion) faster and more reliably than network-based alternatives. Install it if you work with chemical nomenclature and need local, offline name resolution; the only prerequisite is Java 8+.

Install

py2opsin on PyPI

pip

pip install py2opsin

uv

uv add py2opsin

poetry

poetry add py2opsin

Installing py2opsin

Before you install

Low friction: pure Python wheel with a single runtime dependency (typing_extensions). OPSIN v2.9.0 is bundled, so no external Java installation is needed at install time, though Java 8+ is required at runtime. Repository is active with recent commits.

License in practice

MIT license permits unrestricted use, modification, and distribution in commercial and private projects, with only attribution and license notice required.

Quickstart

from py2opsin import py2opsin

smiles = py2opsin("ethane", output_format="SMILES")
# Returns: "CC"

# Batch processing (recommended for multiple names):
smiles_list = py2opsin(["pyridine", "aniline"], output_format="SMILES")

Java 8 or later must be installed and available on the system PATH to execute OPSIN at runtime.

Verify before relying

  • Whether the bundled OPSIN v2.9.0 is the latest available version and how frequently it is updated.
  • Performance characteristics for very large batch operations (thousands+ of molecules).
  • Behavior and error handling when Java is not available or OPSIN fails unexpectedly.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 1 — typing_extensions
Maintenance actively maintained — 151 days since the last release
Last repo commit
First released
Downloads 221,234/month — #9,283 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: py2opsin-1.2.0-py3-none-any.whl

Programming Language :: Python :: 3

Tags

IUPAC name to SMILESchemical name parserOPSIN Python wrappermolecular structure from chemical namebatch IUPAC translationchemical nomenclature resolvername to structure conversion
cheminformaticschemistry-dataiupac-nomenclature

More Scientific/Engineering packages