transformation between smiles and bsmiles
All chemical molecules can be represented by SMILES notation. But from SMILES notation, can not seperate molecules into fragments directly. Here I create a new notation called BSMILES which is easier to check each fragment.
Example:
SMILES notation: O(=C1CSC(c4ccccn4)N(c2ccc3c(cccc3)c2)1)
BSMILES notation: O{0=C!CSCN!{4c%ccc!c(cccc!)c%}{3c!ccccn!}}
how to convert SMILES to BSMILES
from BSMILES.BSMILES import encode
bsmiles = encode(smiles)
how to convert BSMILES back to SMILES
from BSMILES.B_to_smiles import convertB
smiles = convertB(bsmiles)
how to get fragments from BSMILES notation
- input one file then got one output file from BSMILES.B_to_smiles import bsmiles_to_frag
inputfile_name ="bsmiles"
outputfile_name="fragment"
bsmiles_to_frag(inputfile_name,outputfile_name)
- input one bsmiles string return two vectors, the second one contains fragments. from BSMILES.B_to_smiles import getFragments
bsmiles = "any_kind_of_bsmiles"
visited = []#contain all unique fragments from bsmiles
fragments = []#contain all fragments
visited,bsmiles = getFragments(visited,bsmiles)
Release files for BSMILES 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| BSMILES-0.0.1.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| BSMILES-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.7 kB
Release files / BSMILES-0.0.1.tar.gz
| Download URL | BSMILES-0.0.1.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f87fc6bbda6158273975b6e339635448999f1f303bcc99ddd87bb4767ee4bf94
|
|
BLAKE2b-256 checksum How to use checksums |
13f6d4427600b8e0ad2335b6368e1b314fdc8fb3c56de5153c6f296e33a543dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|
Release files / BSMILES-0.0.1-py3-none-any.whl
| Download URL | BSMILES-0.0.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
281f80dda05cada7966631242618576439ffbd668ce1c9dfc85727b408f6d1d2
|
|
BLAKE2b-256 checksum How to use checksums |
faacb34ad877f683bf30b3e131b53a2a8b88a3aeed3464aae15f18fd73304ee8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|