Metadata-Version: 2.4
Name: chembl_gen_check
Version: 0.1.3
Summary: Simple package that performs basic molecular structural sanity checks
Project-URL: Homepage, https://github.com/eloyfelix/chembl_gen_check
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: molbloom>=2.2.1
Requires-Dist: rdkit>=2022.3.3
Provides-Extra: create
Requires-Dist: chembl-downloader; extra == 'create'
Requires-Dist: pyarrow; extra == 'create'
Requires-Dist: tqdm; extra == 'create'
Description-Content-Type: text/markdown

# chembl_gen_check

chembl_gen_check is a Python library that uses lightweight [MolBloom](https://github.com/whitead/molbloom) filters for rapid verification of the existence of scaffolds, generic scaffolds or ring systems in ChEMBL (and SureChEMBL) structures. The library can also indicate whether a compound has uncommon bonds according to the [LACAN](https://github.com/dehaenw/lacan) algorithm, or that a compound triggers a structural alert. Taken together, these checks provide rapid assessment of the reasonableness of ring systems and scaffolds, as well as ensuring that atom and bond environments have precedent.

## Installation

```
pip install chembl-gen-check
```

## Usage example

```python
from chembl_gen_check import Checker

checker = Checker("chembl")
#checker = Checker("surechembl")

smiles = "CCN(CC)C(=O)C[C@H]1C[C@@H]1c1ccccc1"
checker.load_smiles(smiles)

# Murcko scaffold found in the loaded database (True/False)
checker.check_scaffold()

# Generic Murcko scaffold found in loaded database (True/False)
checker.check_skeleton()

# All molecule ring systems found in loaded database (True/False)
checker.check_ring_systems()

# Number of structural alerts using the ChEMBL set in RDKit(integer)
checker.check_structural_alerts()

# LACAN score > 0.5 using the loaded database (True/False)
checker.check_lacan() > 0.5
```

Code to extract ring systems adapted from: W Patrick Walters. [useful_rdkit_utils](https://github.com/PatWalters/useful_rdkit_utils/blob/master/useful_rdkit_utils/ring_systems.py)

Code to calculate LACAN scores adapted from: Dehaen, W. LACAN. https://github.com/dehaenw/lacan/
