Utilities for working with reactions, reaction templates and template extraction
Project description
rxnutils
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)
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
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 cleaningdata
- routines for manipulating various reaction data sourcespipeline
- routines for building and executing simple pipelines for modifying and analyzing reactionsroutes
- 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:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>
. - Make your changes and commit them:
git commit -m '<commit_message>'
- Push to the remote branch:
git push
- 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
-
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
-
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
Built Distribution
File details
Details for the file reaction_utils-1.7.0.tar.gz
.
File metadata
- Download URL: reaction_utils-1.7.0.tar.gz
- Upload date:
- Size: 71.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2833716063dde326495d0fe6ff66adbb8cd00939ae81a4fdfc5820272cd234ea |
|
MD5 | efc328debeeffbf714780f83c45c2b44 |
|
BLAKE2b-256 | 4ac9777b3e3a4ecce7ae394c17a3b7387437428036352327132f2eae14c51c95 |
File details
Details for the file reaction_utils-1.7.0-py3-none-any.whl
.
File metadata
- Download URL: reaction_utils-1.7.0-py3-none-any.whl
- Upload date:
- Size: 88.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7304db6439bc1a91c82a84ab386e38b3dccb072e38e5dcc8b37a7635a3d34f7d |
|
MD5 | 6b2bc59a9c990acda20124da424268e4 |
|
BLAKE2b-256 | bc12b6904524c01d01d912b8b590648871137c5edd52387bd711ec2076a97c63 |