Skip to main content

A simple python wrapper for OPSIN: Open Parser for Systematic IUPAC nomenclature.

Project description

PyOPSIN

This is a Python wrapper for the OPSIN (Open Parser for Systematic IUPAC Nomenclature) package, which allows you to generate SMILES and CML form the standardized IUPAC names for organic molecules. The original OPSIN package was written in Java, but this wrapper allows you to use OPSIN functionality directly from Python.

Installation

To install PyOPSIN, run

pip install pyopsin

Usage

Here's an example of how to use the PyOPSIN to generate an IUPAC name for a molecule:

from pyopsin.pyopsin import PyOpsin

# create an PyOpsin object
opsin = PyOpsin()

# generate the SMILES string from an IUPAC name for a molecule
name = "2,4,6-trinitrotoluene"
smiles = pyopsin.to_smiles(name)

# print the IUPAC name
print(smiles)

This should output the following IUPAC name:

[N+](=O)([O-])C1=C(C)C(=CC(=C1)[N+](=O)[O-])[N+](=O)[O-]

Acknowledgments

The OPSIN Python wrapper is built on top of the OPSIN package, which was developed by the Centre for Molecular Informatics at the University of Cambridge. We would like to thank the developers of OPSIN for creating such a powerful and useful tool.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyopsin-0.1.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

pyopsin-0.1.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file pyopsin-0.1.1.tar.gz.

File metadata

  • Download URL: pyopsin-0.1.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.16

File hashes

Hashes for pyopsin-0.1.1.tar.gz
Algorithm Hash digest
SHA256 af97c5a274922294e01ea7dd682d9c630f985858ddb75b938c8f783d644f00f6
MD5 b9bc4e09859e345a01eb265a78dd80d3
BLAKE2b-256 4461a52fe7a6b78ce35be8f002dc8ba948f353b09ceca3cedf152ae4bc825a50

See more details on using hashes here.

File details

Details for the file pyopsin-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyopsin-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.16

File hashes

Hashes for pyopsin-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a4f9dd10ab8a486c8de3ac78aca73f1d87ebb87d2beebe9a0be4008f4b18f058
MD5 c6d80241a1eab8d50dad3975041be1e2
BLAKE2b-256 c6c9ad125df16542c7a9816261c17577eeef60c40c8d9495f29a1a57150324e0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page