Skip to main content

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 some tasks such as atom-mapping with rxnmapper you need to setup additional environment and packages, see here

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 --with dev

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
  • routes - routines for handling synthesis routes

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

Metadata

Release files for reaction-utils 1.9.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reaction-utils 1.9.4
File Size Uploaded
reaction_utils-1.9.4.tar.gz 86.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for reaction-utils 1.9.4
File Interpreter ABI Platform
reaction_utils-1.9.4-py3-none-any.whl Python 3 none any Details

Total release size: 196.3 kB

Release files / reaction_utils-1.9.4.tar.gz

Download URL reaction_utils-1.9.4.tar.gz
Size 86.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2b25c7e5933548d9a117733715887d3eec35b1a07d97fce656a48903c9be4628
BLAKE2b-256 checksum
How to use checksums
6f230476b095abdd5f92fcef2d9c854f1b2b2f1a57536d495aa9e5097dde04f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / reaction_utils-1.9.4-py3-none-any.whl

Download URL reaction_utils-1.9.4-py3-none-any.whl
Size 110.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2da09ec0da6d32fa029b7d3a2cc80f0719f8ef0cefb8ee93e23d3696dd36291
BLAKE2b-256 checksum
How to use checksums
4d80de6b915651a904a2b2da8a7f271fc0bbba6eb7fca5a6c6ab04baf750135b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.9.4 This release

2 release files

1.9.3

2 release files

1.9.2

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page