Synthesis Rebalancing Framework for Computational Chemistry
Project description
SynRBL: Synthesis Rebalancing Framework
SynRBL is a toolkit tailored for computational chemistry, aimed at correcting imbalances in chemical reactions. It employs a dual strategy: a rule-based method for adjusting non-carbon elements and an mcs-based (maximum common substructure) technique for carbon element adjustments.
Table of Contents
Installation
To install and set up the SynRBL framework, follow these steps. Please ensure you have Python 3.11 or later installed on your system.
Prerequisites
- Python 3.11
- RDKit == 2023.9.4
- joblib==1.3.2
- seaborn==0.13.2
- xgoost==2.0.3
- scikit_learn==1.4.1.post1
- imbalanced_learn==0.12.0
- reportlab==4.1.0
- fgutils==0.0.13
Step-by-Step Installation Guide
-
Python Installation: Ensure that Python 3.11 or later is installed on your system. You can download it from python.org.
-
Creating a Virtual Environment (Optional but Recommended): It's recommended to use a virtual environment to avoid conflicts with other projects or system-wide packages. Use the following commands to create and activate a virtual environment:
python -m venv synrbl-env
source synrbl-env/bin/activate # On Windows use `synrbl-env\Scripts\activate`
Or Conda
conda create --name synrbl-env python=3.11
conda activate synrbl-env
- Install with pip: Clone the SynRBL repository from GitHub and install it:
pip install synrbl
- Verify Installation: After installation, you can verify that SynRBL is correctly installed by running a simple test.
python -c "from synrbl import Balancer; bal = Balancer(reaction_col='reactions', id_col='id'); print(bal.rebalance(reactions='CCO>>CC=O', output_dict=True))"
Usage
- Jupyter Notebook:
from synrbl import Balancer
test = (
"COC(=O)[C@H](CCCCNC(=O)OCc1ccccc1)NC(=O)Nc1cc(OC)cc(C(C)(C)C)c1O>>"
+ "COC(=O)[C@H](CCCCN)NC(=O)Nc1cc(OC)cc(C(C)(C)C)c1O"
)
synrbl = Balancer(reaction_col="reactions", id_col="id")
results = synrbl.rebalance(reactions=test, output_dict=True)
>> [{
"reactions": "COC(=O)[C@H](CCCCNC(=O)OCc1ccccc1)NC(=O)Nc1cc(OC)cc(C(C)(C)C)c1O.O>>"
+ "COC(=O)[C@H](CCCCN)NC(=O)Nc1cc(OC)cc(C(C)(C)C)c1O.O=C(O)OCc1ccccc1",
"solved": True,
"input_reaction": "COC(=O)[C@H](CCCCNC(=O)OCc1ccccc1)NC(=O)Nc1cc(OC)cc(C(C)(C)C)c1O>>"
+ "COC(=O)[C@H](CCCCN)NC(=O)Nc1cc(OC)cc(C(C)(C)C)c1O",
"issue": "",
"rules": ["append O when next to O or N", "default single bond"],
"solved_by": "mcs-based",
"confidence": 0.999,
}]
- Command line
python -m synrbl run --help
- Reproduce the experiment
python -m synrbl run -o validation_results.csv -p 4 ./Data/Validation_set/validation_set.csv
Contributing
License
This project is licensed under MIT License - see the License file for details.
Acknowledgments
This project has received funding from the European Unions Horizon Europe Doctoral Network programme under the Marie-Skłodowska-Curie grant agreement No 101072930 (TACsy -- Training Alliance for Computational)
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
Built Distribution
File details
Details for the file synrbl-0.0.12.tar.gz
.
File metadata
- Download URL: synrbl-0.0.12.tar.gz
- Upload date:
- Size: 4.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bf6582f90888a999b13a6d805c01efaa787b7109a20dbba3086dc250f014b58 |
|
MD5 | 64647502958d0bd0b8ea7b184af6670b |
|
BLAKE2b-256 | 27d9d7ba32f1a1bc6b6a80f42688ca6da6ec7f1a9af4b0851cf23fd2b33e6b52 |
Provenance
File details
Details for the file synrbl-0.0.12-py3-none-any.whl
.
File metadata
- Download URL: synrbl-0.0.12-py3-none-any.whl
- Upload date:
- Size: 193.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7e37ad3068f79339fb260d3f0fcc44f55a93d77f6685516612da4a22f69da28 |
|
MD5 | 8cc411c6c55977ebecba651a65a0949d |
|
BLAKE2b-256 | 5408cd041546ed17c7f665aef8ee5787c8063a6107c5a206653870b4636eac1b |