polymerist.polymers.smidgelib.smidgebonds

Representation classes for monomer graphs bonds which encode intermonomer Port information

Attributes

BOND_TOKEN_RE

Classes

MonomerGraphBondInfo

Encapsulated information about an intermonomer bond in a monomer graph

Module Contents

polymerist.polymers.smidgelib.smidgebonds.BOND_TOKEN_RE
class polymerist.polymers.smidgelib.smidgebonds.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