Skip to main content

Python wrapper for IBM RXN for Chemistry

Reason this release was yanked:

Broken API compatibility

Project description

Python wrapper for the IBM RXN for Chemistry API

Build Status PyPI version License: MIT

logo

A python wrapper to access the API of the IBM RXN for Chemistry website.

Install

From PYPI:

pip install rxn4chemistry

Or directly from the repo:

git+https://github.com/rxn4chemistry/rxn4chemistry.git

Usage

Get your API key from here and build the wrapper:

api_key='API_KEY'
from rxn4chemistry import RXN4ChemistryWrapper

rxn4chemistry_wrapper = RXN4ChemistryWrapper(api_key=api_key)
# NOTE: you can create a project or set an esiting one using:
# rxn4chemistry_wrapper.set_project('PROJECT_ID')
rxn4chemistry_wrapper.create_project('test_wrapper')
print(rxn4chemistry_wrapper.project_id)

Run a reaction prediction is as simple as:

response = rxn4chemistry_wrapper.predict_reaction(
    'BrBr.c1ccc2cc3ccccc3cc2c1'
)
results = rxn4chemistry_wrapper.get_predict_reaction_results(
    response['prediction_id']
)
print(results['payload']['attempts'][0]['smiles'])

Examples

An example on how to predict retrosynthesis for COVID19 candidates here.

Documentation

The documentation is hosted here using GitHub pages.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

RXN4Chemistry-0.1.3.tar.gz (6.6 kB view hashes)

Uploaded Source

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