polymerist.smileslib.cleanup
Utilities for validating, cleaning, and adding information into up SMILES and SMARTS strings
Attributes
Exceptions
Exception raised when a malformed chemical notation string is passed somewhere |
|
Exception raised when a malformed SMILES string is passed somewhere |
|
Exception raised when a malformed SMARTS string is passed somewhere |
|
Exception raised when a malformed InChI string is passed somewhere |
Functions
|
Decorator to suppress RDKit error messages during function execution |
|
Check if SMARTS string is valid (according to RDKit) |
|
Check if SMARTS string is valid (according to RDKit) |
|
Cast Mol to a "canonical" SMILES format |
|
Expands and clarifies the chemical information contained within a passed SMILES string |
Module Contents
- polymerist.smileslib.cleanup.T
- polymerist.smileslib.cleanup.suppress_rdkit_errors(func: Callable[Ellipsis, T]) Callable[Ellipsis, T][source]
Decorator to suppress RDKit error messages during function execution
- type polymerist.smileslib.cleanup.Smiles = str
- type polymerist.smileslib.cleanup.Smarts = str
- polymerist.smileslib.cleanup.is_valid_SMARTS(smarts: Smarts) bool[source]
Check if SMARTS string is valid (according to RDKit)
- polymerist.smileslib.cleanup.is_valid_SMILES(smiles: Smiles) bool[source]
Check if SMARTS string is valid (according to RDKit)
- exception polymerist.smileslib.cleanup.InvalidChemicalLineNotation[source]
Bases:
ValueErrorException raised when a malformed chemical notation string is passed somewhere
- exception polymerist.smileslib.cleanup.InvalidSMILES[source]
Bases:
InvalidChemicalLineNotationException raised when a malformed SMILES string is passed somewhere
- exception polymerist.smileslib.cleanup.InvalidSMARTS[source]
Bases:
InvalidChemicalLineNotationException raised when a malformed SMARTS string is passed somewhere
- exception polymerist.smileslib.cleanup.InvalidInChI[source]
Bases:
InvalidChemicalLineNotationException raised when a malformed InChI string is passed somewhere
- polymerist.smileslib.cleanup.canonical_SMILES_from_mol(mol: rdkit.Chem.Mol) str[source]
Cast Mol to a “canonical” SMILES format Mols with identical chemical structure should produce identical strings
- polymerist.smileslib.cleanup.expanded_SMILES(smiles: str, assign_map_nums: bool = True, start_from: int = 1, kekulize: bool = True, canonicalize: bool = True) str[source]
Expands and clarifies the chemical information contained within a passed SMILES string namely explicit hydrogens and bond orders, and (optionally) kekulized aromatic bonds and atom map numbers