Skip to main content

Python wrapper for BlueDesc molecular descriptors

Project description

License: MIT

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bluedesc_pywrapper-0.0.6.post1.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

bluedesc_pywrapper-0.0.6.post1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file bluedesc_pywrapper-0.0.6.post1.tar.gz.

File metadata

  • Download URL: bluedesc_pywrapper-0.0.6.post1.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for bluedesc_pywrapper-0.0.6.post1.tar.gz
Algorithm Hash digest
SHA256 208469010c9dc44c4b1f1a7d37a508817a17ecead87eee595e749258c5868722
MD5 bb01a8d1025fea13d1cc9151402fe2e0
BLAKE2b-256 724f9611a25120d62934c18cbf8a10353323022885f38897f8ff8847dfd9731a

See more details on using hashes here.

File details

Details for the file bluedesc_pywrapper-0.0.6.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for bluedesc_pywrapper-0.0.6.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 68a5fbb62bf405a0f65533b8fbe31c073cb9b18b33f9e8d00fa5479690537e1d
MD5 7f3f790c53c7653b58790b04a9a7e5bc
BLAKE2b-256 2ef7037e801e9335243f1f60d7b3effd1cc8680c4c70da542b7771d2929b3824

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page