Metadata-Version: 2.1
Name: grail_metabolism
Version: 0.1.2
Summary: GRAIL is an open-source tool for drug metabolism prediction, based on graph neural networks and SMARTS reaction rules.
Author: doctawho42
Author-email: plomoshnovnikita00@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: matplotlib (>=3.9.2,<4.0.0)
Requires-Dist: multipledispatch (>=1.0.0,<2.0.0)
Requires-Dist: numpy (>=2.1.2,<3.0.0)
Requires-Dist: pandas (>=2.2.3,<3.0.0)
Requires-Dist: rdkit (>=2024.3.5,<2025.0.0)
Requires-Dist: scikit-learn (>=1.5.2,<2.0.0)
Requires-Dist: scipy (>=1.14.1,<2.0.0)
Requires-Dist: seaborn (>=0.13.2,<0.14.0)
Requires-Dist: torch (>=2.4.1,<3.0.0)
Requires-Dist: torch-geometric (>=2.6.1,<3.0.0)
Description-Content-Type: text/markdown

# GRAIL: Graph neural networks and Rule-based Approach In drug metaboLism prediction
[![PyPI Version][pypi-image]][pypi-url]

**GRAIL** is an open-source tool for drug metabolism 
prediction, based on SMARTS reaction rules and graph neural 
networks. 

## 1. Installation
### 1.1 From source with **Poetry**
Run `poetry install` from the directory with `pyproject.toml` file
### 1.2 From **PyPi**
`pip install grail_metabolism`

**IMPORTANT:** If you are going to run **GRAIL** with **CUDA**,
then after installation run `install.py` script to add 
proper versions of `torch-geometric`, `torch-scatter`
and `torch-sparse` to your environment.

## 2. Data availability
Data can be downloaded from [Zenodo](https://zenodo.org/records/15392504?preview=1&token=eyJhbGciOiJIUzUxMiJ9.eyJpZCI6ImVmNWEwN2QyLWVlZTMtNDk2Ny1hYjg3LWExNDcwMDA5NTEyNSIsImRhdGEiOnt9LCJyYW5kb20iOiI1NDc1NDVhMmY5NTc3MzNhNWRiMmI3MjU4NjdiN2ZhZiJ9.ZS9JZ207ZRQ5b1zzvtLAxD71hOmaKIuLMCrhW5gDia1-MGrJJ287LCrVf1yyLQKm0Cr8Ls-L8OQ5HMdHbl_mOA)
draft. ATTENTION: This is not the final version of the dataset.

## 3. Quick start

**IMPORTANT:** Due to **RXNMapper** incompatibility with newer
versions of **Python**, use only **Python 3.9 or lower** if you want
to create your own set of transformation rules. All necessary
tools are in `grail.utils.reaction_mapper`

For a quick start you may look into the `notebooks/Unit_Tests.ipynb`.

### MolFrame
For the data uploading and further usage you should import `grail_metabolism.utils.preparation.MolFrame`.
It has three different variants of initialization: from pandas.DataFrame, from dictionaries with metabolic maps, and from SDF file.
For loading data from file use the `MolFrame.from_file` function, having previously read (substrate, metabolite, real_or_not) triples via `MolFrame.read_triples`.

### Models
In the `model` module you can find all necessary model classes, especially Filter and Generator.

[pypi-image]: https://badge.fury.io/py/grail_metabolism.svg
[pypi-url]: https://pypi.python.org/pypi/grail_metabolism

