Skip to main content

Utilities for working with reactions, reaction templates and template extraction

Project description

rxnutils

License Tests codecov Code style: black

Utilities to work with datasets of chemical reactions, reaction templates and template extraction

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Linux OS (or in principle Windows or macOS)

  • You have installed anaconda or miniconda with python 3.8

The tool has been developed and fully tested on a Linux platform, but it is only occassionally tested on Windows and macOS. If you find an issue on a Windows or macOS platform, we might be able to fix, but we might just disable that feature on those platforms.

Installation

For users

Setup your python environment and then run

pip install reaction-utils

Consult the documentation for further information.

For developers

First clone the repository using Git.

Then execute the following commands in the root of the repository

conda env create -f env-dev.yml
conda activate rxn-env
poetry install

the rxnutils package is now installed in editable mode.

Lastly, make sure to install pre-commits that are run on every commit

pre-commit install

Usage

The package is divided into (currently) three sub-packages:

  • chem - chemistry routines like template extraction or reaction cleaning
  • data - routines for manipulating various reaction data sources
  • pipeline - routines for building and executing simple pipelines for modifying and analyzing reactions

The full auto-generated API document is available here, and the documentation also provides a few examples on common tasks.

Development

Testing

Tests uses the pytest package, and is installed by poetry

Run the tests using:

pytest -v

The full command with all flags for CI is available through an invoke command

invoke run-tests

Documentation generation

The documentation is generated by Sphinx from hand-written tutorials and docstrings

The HTML documentation can be generated by

invoke build-docs

Linting

Linting is done preferably with pylint.

invoke run-linting

Currently we do not use mypy to check type annotations, but this will be switched on in the future.

Contributing

We welcome contributions, in the form of issues or pull requests.

If you have a question or want to report a bug, please submit an issue.

To contribute with code to the project, follow these steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b <branch_name>.
  3. Make your changes and commit them: git commit -m '<commit_message>'
  4. Push to the remote branch: git push
  5. Create the pull request.

Please use black package for formatting, and follow pep8 style guide.

Contributors

The contributors have limited time for support questions, but please do not hesitate to submit an issue (see above).

License

The software is licensed under the Apache 2.0 license (see LICENSE file), and is free and provided as-is.

References

  1. Thakkar A, Kogej T, Reymond J-L, et al (2019) Datasets and their influence on the development of computer assisted synthesis planning tools in the pharmaceutical domain. Chem Sci. https://doi.org/10.1039/C9SC04944D

  2. Kannas C, Thakkar A, Bjerrum E, Genheden S (2022) rxnutils – A Cheminformatics Python Library for Manipulating Chemical Reaction Data. ChemRxiv. https://doi.org/10.26434/chemrxiv-2022-wt440-v2

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

reaction_utils-1.2.0.tar.gz (41.0 kB view details)

Uploaded Source

Built Distribution

reaction_utils-1.2.0-py3-none-any.whl (49.3 kB view details)

Uploaded Python 3

File details

Details for the file reaction_utils-1.2.0.tar.gz.

File metadata

  • Download URL: reaction_utils-1.2.0.tar.gz
  • Upload date:
  • Size: 41.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.9.12 Linux/3.10.0-1160.24.1.el7.x86_64

File hashes

Hashes for reaction_utils-1.2.0.tar.gz
Algorithm Hash digest
SHA256 29092c95469a41d9d35d49e930918f04c3699ce9f64aacb0a4dbeccc2b6719f7
MD5 4fb2786a8c8827d42658f1e1bcffbd49
BLAKE2b-256 9558c6345ee058b9563cd312c2a79bd53b6feed4904263d79f74425abab46b57

See more details on using hashes here.

File details

Details for the file reaction_utils-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: reaction_utils-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 49.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.9.12 Linux/3.10.0-1160.24.1.el7.x86_64

File hashes

Hashes for reaction_utils-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a01a8a60384d3e2daf4196e04f724d4b3b6f55e269bc65a6b35a0757651cb35f
MD5 055e975bbe7f82a02b64da3608f219e3
BLAKE2b-256 67a1e727d8ceac4f8e3808bb835a4e616e7c51202556be6f2370287db8591eb7

See more details on using hashes here.

Supported by

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