Type Definitions
fragmentretro.typing is a good place to store your type definitions to make code clean and pass mypy tests.
Example Usage
from fragmentretro.typing import BondType
def _find_fragmentation_bonds(mol: Mol) -> list[BondType]:
return list(FindBRICSBonds(mol))
where BondType is defined in fragmentretro.typing as:
Source Code
fragmentretro.typing
Type definitions for FragmentRetro package.
BondType = tuple[tuple[int, int], tuple[str, str]]
AtomMappingType = tuple[int, ...]
CombType = tuple[int]
SolutionType = list[CombType]
BBsType = set[str]
StageCombDictType = dict[int, list[CombType]]
CombBBsDictType = dict[CombType, BBsType]
FragmentBBsDictType = dict[str, tuple[CombType, BBsType]]
FilterIndicesType = list[int]
CombFilterIndicesDictType = dict[CombType, FilterIndicesType]
MolProperties
Bases: TypedDict
Type definition for molecular properties.