applies the pattern reaction rxn to the list of molecules mols, returning a single list of products.
returns up to n lists of products.
returns a single set of products, using mapi to map the atoms in the i molecule to the i reactant.
Details and Options
- ApplyReaction works by finding occurrences of the reactant patterns present in the PatternReaction in the list of molecules and applying the transformation.
- Pattern matching is performed in order; the first MoleculePattern in the pattern reaction is searched for in the first input Molecule.
- ApplyReaction has the following option:
IncludeHydrogens Automatic whether hydrogens should be included in the pattern matching
- When supplied, the mapi should be an association of atom indices between the given reactant pattern and molecule.
Examplesopen allclose all
Basic Examples (3)
Find matching "Chemical" entities for the products:
ApplyReaction will remove duplicate results, but sometimes for combinatorial purposes you might want all possible matchings between the reactant patterns and the input molecules. This is possible by first using FindMoleculeSubstructure with the nondefault option OverlapsTrue to obtain the atom mappings:
Use these mappings as the third argument for ApplyReaction:
The result is equivalent to the one obtained from BioSequence:
Properties & Relations (1)
The result of ApplyReaction depends on the order in which the reactant molecules are supplied:
Neat Examples (3)
Wolfram Research (2022), ApplyReaction, Wolfram Language function, https://reference.wolfram.com/language/ref/ApplyReaction.html.
Wolfram Language. 2022. "ApplyReaction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ApplyReaction.html.
Wolfram Language. (2022). ApplyReaction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ApplyReaction.html