polymerist.polymers.smidgelib

Utilities for parsing, validating, and translating SMILES-like Monomer Interconnectivity and Degree Graph Encoding (SMIDGE) string

Submodules

Attributes

BOND_PRIMITIVES_FOR_REGEX

BOND_TOKEN_RE

Classes

MonomerGraphBondInfo

Encapsulated information about an intermonomer bond in a monomer graph

Package Contents

polymerist.polymers.smidgelib.BOND_PRIMITIVES_FOR_REGEX = '[~\\-=#$:]'
polymerist.polymers.smidgelib.BOND_TOKEN_RE
class polymerist.polymers.smidgelib.MonomerGraphBondInfo[source]

Encapsulated information about an intermonomer bond in a monomer graph

DEFAULT_BONDTYPE: ClassVar[rdkit.Chem.BondType]
DEFAULT_FLAVOR: ClassVar[int] = 0
incoming_flavor: int = 0
bondtype: rdkit.Chem.BondType
outgoing_flavor: int = 0
property bond_str: str

SMARTS representation of the current bondtype (defaults to the default symbol if None or invalid bondtype is provided)

static parse_str_dict(str_dict: dict[str, str]) dict[str, str | rdkit.Chem.BondType | None][source]

Parse string-valued dict into dict of correct types and NoneType defaults for empty keys

classmethod from_dict(str_dict: dict[str, str]) MonomerGraphBondInfo[source]

Initialize from dictionary of values, after sanitizing

classmethod from_match(match: re.Match | None) MonomerGraphBondInfo[source]

Initialize from groupdict of regex Match