polymerist.smileslib ==================== .. py:module:: polymerist.smileslib .. autoapi-nested-parse:: General-purpose utilities related to SMILES and SMARTS string manipulations Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/polymerist/smileslib/chemdbqueries/index /autoapi/polymerist/smileslib/cleanup/index /autoapi/polymerist/smileslib/functgroups/index /autoapi/polymerist/smileslib/primitives/index /autoapi/polymerist/smileslib/special/index Attributes ---------- .. autoapisummary:: polymerist.smileslib.Smiles polymerist.smileslib.Smarts Exceptions ---------- .. autoapisummary:: polymerist.smileslib.InvalidChemicalLineNotation polymerist.smileslib.InvalidSMILES polymerist.smileslib.InvalidSMARTS polymerist.smileslib.InvalidInChI Functions --------- .. autoapisummary:: polymerist.smileslib.is_valid_SMILES polymerist.smileslib.is_valid_SMARTS polymerist.smileslib.canonical_SMILES_from_mol polymerist.smileslib.expanded_SMILES Package Contents ---------------- .. py:type:: Smiles :canonical: str .. py:function:: is_valid_SMILES(smiles: Smiles) -> bool Check if SMARTS string is valid (according to RDKit) .. py:type:: Smarts :canonical: str .. py:function:: is_valid_SMARTS(smarts: Smarts) -> bool Check if SMARTS string is valid (according to RDKit) .. py:exception:: InvalidChemicalLineNotation Bases: :py:obj:`ValueError` Exception raised when a malformed chemical notation string is passed somewhere .. py:exception:: InvalidSMILES Bases: :py:obj:`InvalidChemicalLineNotation` Exception raised when a malformed SMILES string is passed somewhere .. py:exception:: InvalidSMARTS Bases: :py:obj:`InvalidChemicalLineNotation` Exception raised when a malformed SMARTS string is passed somewhere .. py:exception:: InvalidInChI Bases: :py:obj:`InvalidChemicalLineNotation` Exception raised when a malformed InChI string is passed somewhere .. py:function:: canonical_SMILES_from_mol(mol: rdkit.Chem.Mol) -> str Cast Mol to a "canonical" SMILES format Mols with identical chemical structure should produce identical strings .. py:function:: expanded_SMILES(smiles: str, assign_map_nums: bool = True, start_from: int = 1, kekulize: bool = True, canonicalize: bool = True) -> str 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