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.


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.


pip install equilibrator-cheminfo[rdkit]


Open Babel

pip install equilibrator-cheminfo[openbabel]


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]


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.

Files for equilibrator-cheminfo, version 0.9.0
Filename, size File type Python version Upload date Hashes
Filename, size equilibrator_cheminfo-0.9.0-py3-none-any.whl (78.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size equilibrator-cheminfo-0.9.0.tar.gz (38.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page