Skip to main content

License: MIT

Python wrapper for Molecular Signature Descriptors

Python wrapper to ease the calculation of Signature molecular descriptors.

Notice

This work relies on Gilleain Torrance's re-write of Jean-Loup Faulon's signature code for molecules (https://github.com/gilleain/signatures/).

The Signature Molecular Descriptor. 2. Enumerating Molecules from Their Extended Valence Sequences Jean-Loup Faulon, Carla J. Churchwell, and Donald P. Visco Journal of Chemical Information and Computer Sciences 2003 43 (3), 721-734 DOI: 10.1021/ci020346o

Installation

From source:

git clone https://github.com/OlivierBeq/Signature_pywrapper.git
pip install ./Signature_pywrapper

with pip:

pip install Signature-pywrapper

Get started

from Signature_pywrapper import Signature

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",
    # cisplatin
    "N.N.Cl[Pt]Cl"
]
mols = [Chem.MolFromSmiles(smiles) for smiles in smiles_list]

sig = Signature()
print(sig.calculate(mols, depth=1))

One can also calculate signatures for multiple depths:

print(sig.calculate(mols, depth=[1, 2, 3]))

Documentation

def calculate(mols, show_banner=True, njobs=1, chunksize=100):

Default method to calculate counts of signatures for each vertex of the molecule.

Parameters:

  • mols : Iterable[Chem.Mol]
    RDKit molecule objects for which to obtain Signature descriptors.
  • depth : Union[int, List[int]]
    Depth of the signatures of vertices.
  • show_banner : bool
    Displays default notice about Signature descriptors.
  • njobs : int
    Maximum number of simultaneous processes.
  • chunksize : int
    Maximum number of molecules each process is charged of.
  • return_type : pd.DataFrame
    Pandas DataFrame containing Signature molecular descriptors. If executables have not previously been downloaded, attempts to download and install them.

Metadata

Release files for Signature-pywrapper 0.0.2.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Signature-pywrapper 0.0.2.post1
File Size Uploaded
Signature_pywrapper-0.0.2.post1.tar.gz 155.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Signature-pywrapper 0.0.2.post1
File Interpreter ABI Platform
Signature_pywrapper-0.0.2.post1-py3-none-any.whl Python 3 none any Details

Total release size: 308.6 kB

Release files / Signature_pywrapper-0.0.2.post1.tar.gz

Download URL Signature_pywrapper-0.0.2.post1.tar.gz
Size 155.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9c9a6aed6f4dbaf0d53331f1a82316ecf1873819649f406fac38f0510e5486a9
BLAKE2b-256 checksum
How to use checksums
07a6ea57203e48ea5a6da2ef06f128ad5fd639f6dbc2d039e205e8b9fc9c4ad3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / Signature_pywrapper-0.0.2.post1-py3-none-any.whl

Download URL Signature_pywrapper-0.0.2.post1-py3-none-any.whl
Size 153.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
589d4b5335cb856b952c197b2cfa2cf1ad4a2a31de30ed0ce5231950db16b67f
BLAKE2b-256 checksum
How to use checksums
f0a5e8d0cca561d7b0d6a26bbf9d298dd927ad5f3e452023eda885ffb5a0711e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release history Release notifications | RSS feed

This release

0.0.2.post1 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page