Informatics Matters Standardize Molecule Utility
The im-standardize_molecule module is a utility provided by Informatics Matters.
It contains a Python module to: 1. Take an original SMILES (Simple Molecule Input Line rESpresentation) and convert it to an Isomeric or Nonisomeric canonical SMILES representation in a consistent way. 2. Convert an rdkit.Chem.rdchem.Mol object to a standard format.
Preparation
Note that although this module is available on PyPI, it is not possible to simply install it and run it. The module is strongly dependent on RDKit. In most cases, one of the the Informatics Matters RDKit container images can be used. More details can be found here: IM-RDKit RDKit can also be installed with Conda.
Testing
To check installation is successful, from within an RDKit environment, run:
python -m unittest test.test
Usage
standardize_to_noniso_smiles (osmiles:str)
standardize_to_iso_smiles (osmiles:str)
Takes a smiles and returns the converted smiles and standardized molecule as an rdkit.Chem.rdchem.Mol
Example:
from standardize_molecule import standardize_to_noniso_smiles
noniso = standardize_to_noniso_smiles('N[C@@H](C[C@@H]1CCNC1O)[C@@H](O)CO')
[17:30:44] Initializing MetalDisconnector
[17:30:44] Running MetalDisconnector
[17:30:44] Initializing Normalizer
[17:30:44] Running Normalizer
[17:30:44] Running Uncharger
print(noniso[0])
NC(CC1CCNC1O)C(O)CO
standardize_molecule (molecule: object, osmiles:str = ‘NotProvided’)
Takes an rdkit.Chem.rdchem.Mol object and (optionally) a smiles string for logging and returns a standardized molecule.
Example:
from rdkit import Chem
from standardize_molecule import standardize_molecule
mol = Chem.MolFromSmiles('C1=CC=CC=C1')
std = standardize_molecule(mol, 'C1=CC=CC=C1')
[17:37:40] Initializing MetalDisconnector
[17:37:40] Running MetalDisconnector
[17:37:40] Initializing Normalizer
[17:37:40] Running Normalizer
[17:37:40] Running Uncharger
print(std)
<rdkit.Chem.rdchem.Mol object at 0x7f18ca2a93f0>
print(noniso[1].GetNumHeavyAtoms())
13
Metadata
Release files for im-standardize-molecule 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| im_standardize_molecule-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for im_standardize_molecule-0.1.0-py3-none-any.whl |
Release files / im_standardize_molecule-0.1.0-py3-none-any.whl
| Download URL | im_standardize_molecule-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14c22e69386ab15494db96bb9aeed5585561ea6a80e30aead320ae2be6c695bf
|
|
BLAKE2b-256 checksum How to use checksums |
49b980a75f67141c1335cfe616fefac8f8c0fd8aaa660b8b6a159fab4c6dc3f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Security for im-standardize-molecule 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.