synplan.chem.reaction_rules package#
Subpackages#
Submodules#
synplan.chem.reaction_rules.extraction module#
Module contents#
- class synplan.chem.reaction_rules.RuleSet(rules: Sequence[ReactionContainer], smarts_strings: Sequence[str], popularity: Sequence[int], reaction_indices: Sequence[tuple[int, ...]])#
Bases:
objectA collection of reaction rules loaded from a TSV file.
Provides iteration, indexing, slicing, Jupyter SVG rendering, and optional pandas DataFrame export.
- classmethod from_tsv(tsv_path: str | Path) RuleSet#
Load rules from a SynPlanner extraction TSV file.
- TSV columns (tab-separated, with header):
rule_smarts popularity reaction_indices
Rules that fail to parse are skipped with a warning.
- Parameters:
tsv_path – Path to the TSV file.
- Returns:
RuleSet instance.