schrodinger.livedesign.run_reaction module¶
Given a USER DRAWN reaction and some sets of mols, run the reaction and return the products.
This is different from rdkit.Chem.rdchem.Reaction.RunReactants() because it is designed to usually work with user-drawn reactions, which are much less precise than the ones that we use in pathfinder, say.
It gives up speed and accuracy to improve robustness.
Core Strategy:
Given some drawn reaction with “R groups” as designated attachment points,
If the product has no wildcards, replace the reacting region with the product
If the product has wildcards, map unmapped atoms
- schrodinger.livedesign.run_reaction.run_reaction(rxn: rdkit.Chem.rdChemReactions.ChemicalReaction, reactant_lists: List[List[rdkit.Chem.rdchem.Mol]], tag_property: Optional[str] = None) Iterator[Optional[rdkit.Chem.rdchem.Mol]] ¶
Combinatorically runs a reaction on lists of candidates for each reactant.
It’s the responsibility of the caller to make sure that the reactant candidates are not duplicated inside each of the lists.
If the original reaction doesn’t yield any results, an attempt will be made to use derived reactions where R groups have been removed.
All potential products of the reaction are yielded (duplicates can happen!).
- Parameters
rxn – reaction to apply to each list of reactants or reaction SMARTS.
reactant_lists – lists of reactants; Each list has to have the correct length, matching the number of reactant templates used by the reaction.
tag_property – if provided, the value of this property must be set on all of the reactants. The tag_property values of the reactants used to generate a product will be combined and stored under the tag_property of the product in order to allow tracking of the origin of the products. If the tag_property of any of the products used to generate a product is a blank string, then the product will be tagged with just an empty string.
- schrodinger.livedesign.run_reaction.run_reaction_with_filters(rxn: rdkit.Chem.rdChemReactions.ChemicalReaction, reactant_lists: List[List[rdkit.Chem.rdchem.Mol]], max_products: Optional[int] = None, property_filters: Optional[dict] = None, tag_property: Optional[str] = None) Iterator[str] ¶
- Parameters
rxn – reaction to apply to each list of reactants or reaction SMARTS.
reactant_lists – lists of reactants; Each list has to have the correct length, matching the number of reactant templates used by the reaction.
max_products – yield at most this many unique products. If not provided, all products are returned without limit or deduplication. (The canonical SMILES is used as the key.)
property_filters – dictionary with JSON data describing the property filters, with the schema expected by schrodinger.ui.qt.filter_dialog_dir.filter_core.Filter.
tag_property – if provided, the property on the reactants that will be combined and added to the product in order to allow tracking of the origin of the products.