👀 smarts-explainer
SMARTS explainer is a small wrapper around the [SMARTSview](https://smarts.plus/) tool developped at ZBH U. Hamburg for creating an easy to comprehend visualization for SMARTS expression. The concept was developed K. Schomburg and M. Rarey.
Installation
smarts-explainer requires datamol and requests-toolbelt. You can install it as follows
pip install smarts-explainer
Alternatively, download, install the dependency then install it with:
git clone git@github.com:maclandrol/smexplainer.git
cd smexplainer
mamba env create -f env.yml -n "smexplainer" && conda activate smexplainer
pip install -e .
Usage
import smexplainer
my_smarts = "c12c(n(C)c(=O)[nH,$(nC)]c(=O)1)ncn2C"
smexplainer.explain(my_smarts, filetype="png")
For a batch of smarts, you can use the smexplainer.batch_explain function instead
Input parameters:
smarts: a smarts string (valid) to visualizecomparesmarts: optional smarts to compare againsvmode: visualization Mode:- 0 = Complete visualization (default)
- 1 = ID-Mapping
- 2 = Element symbols
- 3 = Structure Diagram-Like
vbonds: Visualization of Default Bonds- 0 = "Single bonds"
- 1 = "Single or Aromatic Bonds" (default)
textdesc: Legend Option 1: Textual desciption- False = No
- True = Yes (default)
depsymbols: Legend Option 2: Depiction of SMARTS symbols- False = No
- True = Yes (default)
smartsheading: Legend Option 3: Write SMARTS as picture heading- False = No
- True = Yes (default)
trim: SMARTS trim active:- False = No
- True = Yes (default)
labels: Show Atom Labels- False = No
- True = Yes (default)
cmode: Compare Mode: This only affects compare images- 1 = Search for Identical Patterns
- 2 = Subset search from smarts
- 3 = subset search from comparesmarts
- 4 = Similarity Search (default)
detectarom: Detect Aromatic Bonds- False = No
- True = Yes (default)
smileslikearom: SMILES-Like Aromaticity Detection- False = No
- True = Yes (default)
filetype: Output File Type- png (default)
- svg
outfile: Optional Output file where to save the output image
Reference
For more information about the explainer, see the corresponding paper:
@article{schomburg2010structure,
title={From structure diagrams to visual chemical patterns},
author={Schomburg, Karen and Ehrlich, Hans-Christian and Stierand, Katrin and Rarey, Matthias},
journal={Journal of chemical information and modeling},
volume={50},
number={9},
pages={1529--1535},
year={2010},
publisher={ACS Publications}
}
Changelogs
See the latest changelogs at CHANGELOG.rst.
License
The smexplainer is under the Apache-2.0 license. See LICENSE. But the original work is copyrighted by "SMARTSviewer smartsview.zbh.uni-hamburg.de, ZBH Center for Bioinformatics, University of Hamburg"
Authors
See AUTHORS.rst.
Metadata
Release files for smexplainer 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smexplainer-0.0.2.tar.gz | 9.4 kB | Without provenance | Details for smexplainer-0.0.2.tar.gz |
Release files / smexplainer-0.0.2.tar.gz
| Download URL | smexplainer-0.0.2.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5cf551e3a2fe3c70b1fe071358cf9157f4b09eb4d6114daeb585a250111e2447
|
|
BLAKE2b-256 checksum How to use checksums |
a425b430419c17d340cd90b68bab529c135657fac68cf63a654b773487317f05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for smexplainer 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.