DeepSMILES, a SMILES-like syntax suited to machine learning
Project description
This Python module can convert well-formed SMILES (that is, as writen by a cheminformatics toolkit) to DeepSMILES. It also does the reverse conversion.
Install the latest version with:
pip install --upgrade deepsmiles
DeepSMILES is a SMILES-like syntax suited to machine learning. Rings are indicated using a single symbol instead of two, while branches do not use matching parentheses but rather use a right parenthesis as a ‘pop’ operator.
For example, benzene is c1ccccc1 in SMILES but cccccc6 in DeepSMILES (where the 6 indicates the ring size). As a branch example, the SMILES C(Br)(OC)I can be converted to the DeepSMILES CBr)OC))I. For more information, please see the corresponding preprint.
The library is used as follows:
import deepsmiles
print("DeepSMILES version: %s" % deepsmiles.__version__)
converter = deepsmiles.Converter(rings=True, branches=True)
print(converter) # record the options used
encoded = converter.encode("c1cccc(C(=O)Cl)c1")
print("Encoded: %s" % encoded)
try:
decoded = converter.decode(encoded)
except deepsmiles.DecodeError as e:
decoded = None
print("DecodeError! Error message was '%s'" % e.message)
if decoded:
print("Decoded: %s" % decoded)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deepsmiles-1.0.1.tar.gz.
File metadata
- Download URL: deepsmiles-1.0.1.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83c12dfd51684aa6fb69e64fbded890af1ab34b046eeb9808361dde6d0a5bd0e
|
|
| MD5 |
fd62b28caeb47fe9f348dc4a6166fe0b
|
|
| BLAKE2b-256 |
86f52ab36f143a1f34c2ff0ad558f09fa1cf226e58d18ffab616be80bc4b5dff
|
File details
Details for the file deepsmiles-1.0.1-py2.py3-none-any.whl.
File metadata
- Download URL: deepsmiles-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e78a5967868634d9b58a1bb9f5deeaa266a179f27b37fbd631ae53ea5b070ba1
|
|
| MD5 |
b0fd414c8082500e59de8e7f0d088925
|
|
| BLAKE2b-256 |
c4aac043624e7cdac49811725dfc139423b5092bbf7cccb5a346d63ea0f364c1
|