py2opsin
Simple Python interface to OPSIN: Open Parser for Systematic IUPAC nomenclature
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 py2opsinuv
uv add py2opsinpoetry
poetry add py2opsinInstalling 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
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
PubChemPyPubChemPy is a Python wrapper around the…
permissive · top 5,000 on PyPI
str2boolConverts string representations like 'yes',…
permissive · top 15,000 on PyPI
selfiesConverts between SELFIES (Self-Referencing…
permissive · top 15,000 on PyPI
padelpyPaDELPy wraps the PaDEL-Descriptor Java engine…
permissive · top 15,000 on PyPI
epam-indigoIndigo is a universal cheminformatics library…
permissive · top 15,000 on PyPI
aimsim-coreProvides core molecular featurization and…
permissive · top 15,000 on PyPI
chempropChemprop trains and deploys message passing…
permissive · top 15,000 on PyPI
pdbeccdutilsParse and process small molecule definitions…
permissive · top 15,000 on PyPI
domain2idnaConverts domain names and URLs to Punycode/IDNA…
permissive · top 15,000 on PyPI
rdkitRDKit is a chemoinformatics toolkit providing…
permissive · top 5,000 on PyPI