polymerist.polymers.smidgelib ============================= .. py:module:: polymerist.polymers.smidgelib .. autoapi-nested-parse:: Utilities for parsing, validating, and translating SMILES-like Monomer Interconnectivity and Degree Graph Encoding (SMIDGE) string Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/polymerist/polymers/smidgelib/smidgebonds/index /autoapi/polymerist/polymers/smidgelib/smidgeread/index /autoapi/polymerist/polymers/smidgelib/smidgewrite/index Attributes ---------- .. autoapisummary:: polymerist.polymers.smidgelib.BOND_PRIMITIVES_FOR_REGEX polymerist.polymers.smidgelib.BOND_TOKEN_RE Classes ------- .. autoapisummary:: polymerist.polymers.smidgelib.MonomerGraphBondInfo Package Contents ---------------- .. py:data:: BOND_PRIMITIVES_FOR_REGEX :value: '[~\\-=#$:]' .. py:data:: BOND_TOKEN_RE .. py:class:: MonomerGraphBondInfo Encapsulated information about an intermonomer bond in a monomer graph .. py:attribute:: DEFAULT_BONDTYPE :type: ClassVar[rdkit.Chem.BondType] .. py:attribute:: DEFAULT_FLAVOR :type: ClassVar[int] :value: 0 .. py:attribute:: incoming_flavor :type: int :value: 0 .. py:attribute:: bondtype :type: rdkit.Chem.BondType .. py:attribute:: outgoing_flavor :type: int :value: 0 .. py:property:: bond_str :type: str SMARTS representation of the current bondtype (defaults to the default symbol if None or invalid bondtype is provided) .. py:method:: parse_str_dict(str_dict: dict[str, str]) -> dict[str, Optional[Union[str, rdkit.Chem.BondType]]] :staticmethod: Parse string-valued dict into dict of correct types and NoneType defaults for empty keys .. py:method:: from_dict(str_dict: dict[str, str]) -> MonomerGraphBondInfo :classmethod: Initialize from dictionary of values, after sanitizing .. py:method:: from_match(match: Optional[re.Match]) -> MonomerGraphBondInfo :classmethod: Initialize from groupdict of regex Match