chython.reactor package

class chython.reactor.Reactor(patterns: Tuple[QueryContainer, ...], products: Tuple[MoleculeContainer | QueryContainer, ...], *, delete_atoms: bool = True, one_shot: bool = True, polymerise_limit: int = 10, automorphism_filter: bool = True, fix_aromatic_rings: bool = True, fix_tautomers: bool = True)

Reactor for molecules transformations. Generates reaction from input molecules using transformation template.

Reactor calling transforms reactants to products and returns generator of reaction transformations with all possible reactions.

Parameters:
  • patterns – Search patterns for each reactant.

  • products – Resulted structures.

  • delete_atoms – If True atoms exists in reactants but not exists in products will be removed.

  • one_shot – Do only single reaction center then True, else do all possible combinations of reactions.

  • polymerise_limit – Limit of self reactions. Make sense than one_shot = False.

  • fix_aromatic_rings – Proceed kekule and thiele on products.

  • fix_tautomers – See thiele() docs.

  • automorphism_filter – Skip matches to same atoms.

class chython.reactor.Transformer(pattern: QueryContainer, replacement: MoleculeContainer | QueryContainer, delete_atoms: bool = True, automorphism_filter: bool = True, fix_aromatic_rings: bool = True, fix_tautomers: bool = True)

Editor for molecules. generates modified molecules from input molecule using template. Transformer calling returns generator of all possible replacements.

Parameters:
  • pattern – Search pattern.

  • replacement – Resulted structure.

  • delete_atoms – If True atoms exists in reactants but not exists in products will be removed.

  • fix_aromatic_rings – Proceed kekule and thiele on products.

  • fix_tautomers – See thiele() docs.

  • automorphism_filter – Skip matches to same atoms.