[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/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:
```bash
pip install BlueDesc-pywrapper
```
### Get started
```python
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).<br/>
: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.
```python
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.<br/>
```python
bluedesc = BlueDesc(ignore_3D=False)
print(bluedesc.calculate(mols))
```
## Documentation
```python
def calculate(mols, show_banner=True, njobs=1, chunksize=1000):
```
Default method to calculate BlueDesc fingerprints.
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/OlivierBeq/bluedesc_pywrapper",
"name": "BlueDesc-pywrapper",
"maintainer": "Olivier J. M. B\u00e9quignon",
"docs_url": null,
"requires_python": "",
"maintainer_email": "\"olivier.bequignon.maintainer@gmail.com\"",
"keywords": "BlueDesc,molecular descriptors,cheminformatics,toxicoinformatics,QSAR",
"author": "Olivier J. M. B\u00e9quignon",
"author_email": "\"olivier.bequignon.maintainer@gmail.com\"",
"download_url": "https://files.pythonhosted.org/packages/74/2c/f2125215040b72b9f1f903a6b0064b1bbb2ae079b03c320f173729269021/BlueDesc_pywrapper-0.0.3.tar.gz",
"platform": null,
"description": "[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n\r\n# Python wrapper for BlueDesc molecular descriptors\r\n\r\n## Installation\r\n\r\nFrom source:\r\n\r\n git clone https://github.com/OlivierBeq/bluedesc_pywrapper.git\r\n pip install ./bluedesc_pywrapper\r\n\r\nwith pip:\r\n\r\n```bash\r\npip install BlueDesc-pywrapper\r\n```\r\n\r\n### Get started\r\n\r\n```python\r\nfrom BlueDesc_pywrapper import BlueDesc\r\nfrom rdkit import Chem\r\nfrom rdkit.Chem import AllChem\r\n\r\nsmiles_list = [\r\n # erlotinib\r\n \"n1cnc(c2cc(c(cc12)OCCOC)OCCOC)Nc1cc(ccc1)C#C\",\r\n # midecamycin\r\n \"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\",\r\n # selenofolate\r\n \"C1=CC(=CC=C1C(=O)NC(CCC(=O)OCC[Se]C#N)C(=O)O)NCC2=CN=C3C(=N2)C(=O)NC(=N3)N\",\r\n]\r\nmols = [Chem.AddHs(Chem.MolFromSmiles(smiles)) for smiles in smiles_list]\r\nfor mol in mols:\r\n _ = AllChem.EmbedMolecule(mol)\r\n\r\nbluedesc = BlueDesc()\r\nprint(bluedesc.calculate(mols))\r\n```\r\n\r\nThe above calculates 118 molecular descriptors (33 1D and 85 2D).<br/>\r\n:warning: BlueDesc skips molecules it cannot parse internally, a warning is given when that is the case.\r\nThe following command is recommended, should this occur, to prevent the unalignment of input and output indices.\r\n\r\n```python\r\nbluedesc.calculate(mols, chunksize=1, njobs=-1)\r\n```\r\n\r\nThe additional 56 three-dimensional (3D) descriptors may be computed like so: \r\n:warning: Molecules are required to have conformers for 3D descriptors to be calculated.<br/>\r\n\r\n```python\r\nbluedesc = BlueDesc(ignore_3D=False)\r\nprint(bluedesc.calculate(mols))\r\n\r\n```\r\n\r\n## Documentation\r\n\r\n```python\r\ndef calculate(mols, show_banner=True, njobs=1, chunksize=1000):\r\n```\r\n\r\nDefault method to calculate BlueDesc fingerprints.\r\n\r\nParameters:\r\n\r\n- ***mols : Iterable[Chem.Mol]*** \r\n RDKit molecule objects for which to obtain BlueDesc descriptors.\r\n- ***show_banner : bool*** \r\n Displays default notice about BlueDesc.\r\n- ***njobs : int*** \r\n Maximum number of simultaneous processes.\r\n- ***chunksize : int*** \r\n Maximum number of molecules each process is charged of.\r\n",
"bugtrack_url": null,
"license": "",
"summary": "Python wrapper for BlueDesc molecular descriptors",
"version": "0.0.3",
"project_urls": {
"Homepage": "https://github.com/OlivierBeq/bluedesc_pywrapper"
},
"split_keywords": [
"bluedesc",
"molecular descriptors",
"cheminformatics",
"toxicoinformatics",
"qsar"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ea4505c7ba3e9b92df85f562a50ed316d0cd7dcf39bc24ed220451dc30bb6745",
"md5": "97912f6d0d814f4af8066b87b2e09e72",
"sha256": "c9029bc460eb276edf512ca19b9fb9e41805dd228e0fb3988c0a37dbc5bb86e2"
},
"downloads": -1,
"filename": "BlueDesc_pywrapper-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "97912f6d0d814f4af8066b87b2e09e72",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 12360,
"upload_time": "2023-07-14T13:19:52",
"upload_time_iso_8601": "2023-07-14T13:19:52.999698Z",
"url": "https://files.pythonhosted.org/packages/ea/45/05c7ba3e9b92df85f562a50ed316d0cd7dcf39bc24ed220451dc30bb6745/BlueDesc_pywrapper-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "742cf2125215040b72b9f1f903a6b0064b1bbb2ae079b03c320f173729269021",
"md5": "ac15a370d417a9e5f2d68024011f395a",
"sha256": "2e1d9f6eb48c212fe073a1e3f504916d3ddd36dcf07d7b586e45fbabb8597a87"
},
"downloads": -1,
"filename": "BlueDesc_pywrapper-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "ac15a370d417a9e5f2d68024011f395a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13214,
"upload_time": "2023-07-14T13:20:02",
"upload_time_iso_8601": "2023-07-14T13:20:02.670100Z",
"url": "https://files.pythonhosted.org/packages/74/2c/f2125215040b72b9f1f903a6b0064b1bbb2ae079b03c320f173729269021/BlueDesc_pywrapper-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-14 13:20:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "OlivierBeq",
"github_project": "bluedesc_pywrapper",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"tox": true,
"lcname": "bluedesc-pywrapper"
}