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.14.0.tar.gz (41.4 kB view details)

Uploaded Source

Built Distribution

equilibrator_cheminfo-0.14.0-py3-none-any.whl (76.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: equilibrator-cheminfo-0.14.0.tar.gz
  • Upload date:
  • Size: 41.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for equilibrator-cheminfo-0.14.0.tar.gz
Algorithm Hash digest
SHA256 3688e546f9d12411aed737f587e8f1070eb4be6e5b354904565edeae662c650b
MD5 2b7323e54de0b1deb98e0e288a54ea24
BLAKE2b-256 99cb62a2ba8edf905a7ba7b7e7f3f9a50e328d5cfb9ead75202c032ee84ed392

See more details on using hashes here.

File details

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

File metadata

  • Download URL: equilibrator_cheminfo-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 76.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for equilibrator_cheminfo-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29ffd8b7561de43b1f3c07f52def0c20393b98f9999d9f78cacf9a2de89ac0bf
MD5 c6bc103677d2909c0864dee4de7833e9
BLAKE2b-256 2452e3e3ff445f0df496303168fe330efc5bd8287a94b26ddcd3fb397fc2202a

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