Python wrapper for BlueDesc molecular descriptors
Project description
Python wrapper for BlueDesc molecular descriptors
Installation
From source:
git clone https://github.com/OlivierBeq/bluedesc_pywrapper.git
pip install ./bluedesc_pywrapper
with pip:
pip install BlueDesc-pywrapper
Get started
from BlueDesc_pywrapper import BlueDesc
from rdkit import Chem
from rdkit.Chem import AllChem
smiles_list = [
# erlotinib
"n1cnc(c2cc(c(cc12)OCCOC)OCCOC)Nc1cc(ccc1)C#C",
# midecamycin
"CCC(=O)O[C@@H]1CC(=O)O[C@@H](C/C=C/C=C/[C@@H]([C@@H](C[C@@H]([C@@H]([C@H]1OC)O[C@H]2[C@@H]([C@H]([C@@H]([C@H](O2)C)O[C@H]3C[C@@]([C@H]([C@@H](O3)C)OC(=O)CC)(C)O)N(C)C)O)CC=O)C)O)C",
# selenofolate
"C1=CC(=CC=C1C(=O)NC(CCC(=O)OCC[Se]C#N)C(=O)O)NCC2=CN=C3C(=N2)C(=O)NC(=N3)N",
]
mols = [Chem.AddHs(Chem.MolFromSmiles(smiles)) for smiles in smiles_list]
for mol in mols:
_ = AllChem.EmbedMolecule(mol)
bluedesc = BlueDesc()
print(bluedesc.calculate(mols))
The above calculates 118 molecular descriptors (33 1D and 85 2D).
:warning: BlueDesc skips molecules it cannot parse internally, a warning is given when that is the case.
The following command is recommended, should this occur, to prevent the unalignment of input and output indices.
bluedesc.calculate(mols, chunksize=1, njobs=-1)
The additional 56 three-dimensional (3D) descriptors may be computed like so:
:warning: Molecules are required to have conformers for 3D descriptors to be calculated.
bluedesc = BlueDesc(ignore_3D=False)
print(bluedesc.calculate(mols))
Documentation
def calculate(mols, show_banner=True, njobs=1, chunksize=1000):
Default method to calculate BlueDesc descriptors.
Parameters:
- mols : Iterable[Chem.Mol]
RDKit molecule objects for which to obtain BlueDesc descriptors. - show_banner : bool
Displays default notice about BlueDesc. - njobs : int
Maximum number of simultaneous processes. - chunksize : int
Maximum number of molecules each process is charged of.
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
Close
Hashes for bluedesc_pywrapper-0.0.5.post1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fe275c6d26848ea32e25ad75c71798296acdd5a5d00e3f65947b8091095ca3a |
|
MD5 | 0cb1c3de455c58fdbe44a0c956606ace |
|
BLAKE2b-256 | 6aa83056bd01cfe2892c6322a79c84008c505ea2142464d783c3a4cc14f1d502 |
Close
Hashes for BlueDesc_pywrapper-0.0.5.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e6f69f20930900a3689c63a0639d986f6feb7074a7b81e08d9bae4b3a4b29a0 |
|
MD5 | 02f24fb22f2057005d830377f0f0cab5 |
|
BLAKE2b-256 | 849398bbda82fa4af479abd63439261106a3808b9a0cbd81e6e2fc8d73f1307e |