Synthesis#
Synthesis engines, multi-step search, benchmarking, and ranking utilities.
Reactor#
- class synkit.Synthesis.Reactor.batch_reactor.BatchReactor(data: List[str | Dict[str, Any]], host_key: str | None = None, *, react_engine: str = 'syn', pre_filter_engine: str | None = None, explicit_h: bool = True, implicit_temp: bool = False, strategy: str = 'bt', dedupe: bool = True, entry_n_jobs: int = 1, rule_n_jobs: int = 1, parallel_rules: bool = False, allow_nested: bool = False, cache_enabled: bool = True, cache_maxsize: int = 32768, logger: Logger | None = None, enable_logging: bool = True)[source]#
Bases:
object
- class synkit.Synthesis.Reactor.benchmark.Benchmark(data: List[Dict[str, Any]], reaction_key: str = 'reactions', *, react_engine: str = 'syn', pre_filter_engine: str | None = None, explicit_h: bool = True, implicit_temp: bool = False, strategy: str = 'bt', dedupe: bool = True, entry_n_jobs: int = 1, rule_n_jobs: int = 1, parallel_rules: bool = False, allow_nested: bool = False, cache_enabled: bool = True, cache_maxsize: int = 32768, logger: Logger | None = None, enable_logging: bool = True)[source]#
Bases:
BatchReactor
- class synkit.Synthesis.Reactor.imba_engine.ImbaEngine(substrate: str | Graph | SynGraph, template: str | Graph | SynRule, add_wildcard: bool = True, clean_fragments: bool = False, max_frag: bool = False, invert: bool = False, canonicaliser: GraphCanonicaliser | None = None, strategy: Strategy | str = Strategy.ALL, partial: bool = False, embed_threshold: float = None, embed_pre_filter: bool = False, electron_diagnostics: bool = False)[source]#
Bases:
object- fit() ImbaEngine[source]#
- class synkit.Synthesis.Reactor.mod_aam.MODAAM(substrate: str | List[str], rule_file: str | Path, *, invert: bool = False, strategy: str | Strategy = Strategy.BACKTRACK, verbosity: int = 0, print_results: bool = False, check_isomorphic: bool = True)[source]#
Bases:
object
- class synkit.Synthesis.Reactor.mod_reactor.MODReactor(substrate: str | List[str], rule_file: str | Path, *, invert: bool = False, strategy: str | Strategy = Strategy.BACKTRACK, verbosity: int = 0, print_results: bool = False)[source]#
Bases:
object- static generate_reaction_smiles(temp_results: List[List[str]], base_smiles: str, *, invert: bool = False, arrow: str = '>>', separator: str = '.') List[str][source]#
- run() MODReactor[source]#
- class synkit.Synthesis.Reactor.partial_engine.PartialEngine(smi: str, template: str, electron_diagnostics: bool = False)[source]#
Bases:
object
- class synkit.Synthesis.Reactor.post_syn.PostSyn(n_jobs: int = 1, verbose: int = 2, standardizer: Standardize | None = None, reaction_key: str = 'reactions', fw_key: str = 'fw', bw_key: str = 'bw')[source]#
Bases:
object
- class synkit.Synthesis.Reactor.rbl_engine.RBLEngine(*, wildcard_element: ~typing.Any = ('*', '*'), element_key: str = 'element', node_attrs: ~typing.Sequence[str] | None = None, edge_attrs: ~typing.Sequence[str] | None = None, prune_wc: bool = True, prune_automorphisms: bool = True, mcs_side: str = 'l', early_stop: bool = True, fast_paths_only: bool = False, mode: str | None = None, max_mappings_per_pair: int = 1, implicit_temp: bool = True, explicit_h: bool = False, electron_diagnostics: bool = False, embed_threshold: int = 10000, reactor_cls: type = <class 'synkit.Synthesis.Reactor.syn_reactor.SynReactor'>, wildcard_adder_cls: type = <class 'synkit.Chem.Reaction.radical_wildcard.RadicalWildcardAdder'>, matcher_cls: type = <class 'synkit.Graph.Matcher.mcs_matcher.MCSMatcher'>, fuse_fn: ~typing.Callable[[~typing.Any, ~typing.Any, ~typing.Dict[~typing.Any, ~typing.Any]], ~typing.Any] = <function fuse_its_graphs>, remove_explicit_H_fn: ~typing.Callable[[str], str] = <function remove_explicit_H_from_rsmi>, rsmi_to_its_fn: ~typing.Callable[[...], ~typing.Any] = <function rsmi_to_its>, its_to_rsmi_fn: ~typing.Callable[[~typing.Any], str] = <function its_to_rsmi>, h_to_implicit_fn: ~typing.Callable[[~typing.Any], ~typing.Any] = <function h_to_implicit>, standardize_h_fn: ~typing.Callable[[~typing.Any], ~typing.Any] = <function standardize_hydrogen>, standardize_fn: ~typing.Callable[[str], str] | None = <bound method Standardize.fit of <synkit.Chem.Reaction.standardize.Standardize object>>, logger: ~logging.Logger | None = None)[source]#
Bases:
object
- class synkit.Synthesis.Reactor.rule_filter.RuleFilter(host_graph: Graph, rules_list: List[Any], invert: bool = False, engine: str = 'turbo', node_label: str | List[str] = ['element', 'charge'], edge_label: str | List[str] = 'order', distance_threshold: int = 5000, sing_max_path: int = 3)[source]#
Bases:
object
- class synkit.Synthesis.Reactor.strategy.Strategy(value)[source]#
-
- ALL = 'all'#
- BACKTRACK = 'bt'#
- COMPONENT = 'comp'#
- PARTIAL = 'partial'#
- class synkit.Synthesis.Reactor.syn_reactor.SynReactor(substrate: str | Graph | SynGraph, template: str | Graph | SynRule, invert: bool = False, canonicaliser: GraphCanonicaliser | None = None, explicit_h: bool = True, implicit_temp: bool = False, strategy: Strategy | str = Strategy.ALL, partial: bool = False, template_format: Literal['typesGH', 'tuple'] = 'typesGH', electron_diagnostics: bool = False, embed_threshold: int | None = None, embed_pre_filter: bool = False, automorphism: bool = True)[source]#
Bases:
object- canonicaliser: GraphCanonicaliser | None = None#
- classmethod from_smiles(smiles: str, template: str | Graph | SynRule, *, invert: bool = False, canonicaliser: GraphCanonicaliser | None = None, explicit_h: bool = True, implicit_temp: bool = False, automorphism: bool = False, strategy: Strategy | str = Strategy.ALL, template_format: Literal['typesGH', 'tuple'] = 'typesGH', electron_diagnostics: bool = False) SynReactor[source]#
- property its#
- property mapping_count#
- property smarts#
- property smiles_list#
- property substrate_smiles#