Skip to main content

Light adapter classes around Open Babel, RDKit, and ChemAxon for the functionality needed in eQulibrator.

Project description

Current PyPI Version Supported Python Versions Apache Software License Version 2.0 Code Style Black

Light adapter classes around Open Babel, RDKit, and ChemAxon for the functionality needed in eQulibrator.

Install

Please note that while equilibrator-cheminfo as a pure Python package is operating system independent, the same is not true for the cheminformatics backends Open Babel, RDkit, or ChemAxon. While both Open Babel and RDKit nowadays provide Python wheels, we do not test them on all platforms.

RDKit

pip install equilibrator-cheminfo[rdkit]

or

Open Babel

pip install equilibrator-cheminfo[openbabel]

ChemAxon

If you wish to use ChemAxon, you need to install the software, acquire a license, and set the environment variable CHEMAXON_HOME.

pip install equilibrator-cheminfo[chemaxon]

Usage

The main feature in this package is a uniform class interface to molecules from Open Babel, RDKit, or ChemAxon. The interface is defined by the equilibrator_cheminfo.AbstractMolecule abstract class that the three concrete classes adhere to.

from equilibrator_cheminfo.chemaxon import ChemAxonMolecule
from equilibrator_cheminfo.rdkit import RDKitMolecule
from equilibrator_cheminfo.openbabel import OpenBabelMolecule

Some of the supported methods are:

mol = OpenBabelMolecule.from_smiles("CC=O")
mol.get_charge()  # 0
mol.get_molecular_formula()  # 'C2H4O'
mol.get_molecular_mass()  # 44.05
mol.get_inchi_key()  # 'IKHGUXGNUITLKF-UHFFFAOYSA-N'

You can also always access the cheminformatics backend object directly and pass it as an argument to functions directly imported from there.

mol.native  # <openbabel.pybel.Molecule at 0x7f2a14b36c70>
mol.native.calcfp().bits  # [330, 624, 671]

If there are general methods that you think are missing from the abstract interface, please say so in an issue.

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

equilibrator-cheminfo-0.9.0.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

equilibrator_cheminfo-0.9.0-py3-none-any.whl (78.9 kB view details)

Uploaded Python 3

File details

Details for the file equilibrator-cheminfo-0.9.0.tar.gz.

File metadata

  • Download URL: equilibrator-cheminfo-0.9.0.tar.gz
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for equilibrator-cheminfo-0.9.0.tar.gz
Algorithm Hash digest
SHA256 c5c9734cd0e73e29b25d04619efb46de65bf90abe391b269cd0b397bdf97f688
MD5 2471024be25d2076b8b21078ca356927
BLAKE2b-256 0b3877958e06a5d9e77234cebf364c7d6fb211856902df93e9e82a335e0fdc34

See more details on using hashes here.

File details

Details for the file equilibrator_cheminfo-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: equilibrator_cheminfo-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 78.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for equilibrator_cheminfo-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58f51e778aaf7dd5ce566afd25b7a231b1c1b1e7eb2a11b60ca8d57931ece5ed
MD5 bd48e0857818a0eaa482ed2d5aa7f309
BLAKE2b-256 3bf0a6d498a4e926671a0b8d89d0fb7b79bdf8f37e44440f7f3c0636abceb9fa

See more details on using hashes here.

Supported by

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