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.
represents an operator form of ApplyReaction that can be applied to a list of molecules.
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)
Apply an autoionization reaction to water:
Apply a reaction between an organic acid and base:
Apply the same reaction with the reactants reversed, treating histidine as the acid and alanine as the base:
Apply a reaction to convert an alkene to an alcohol:
Find matching "Chemical" entities for the products:
Create a pattern reaction for the Diels–Alder reaction from a reaction SMARTS string:
Apply the pattern reaction to a diene and a dienophile:
ApplyReaction will remove duplicate results, but sometimes for combintorical 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:
It is easy to see that only two of the results are unique:
React a radical chlorine atom with methane:
Define a reaction for an intermolecular esterification:
Apply the pattern reaction to a carboxylic acid and an alcohol:
Apply the pattern reaction to a carboxylic acid and an isotopically labeled alcohol:
Define a pattern reaction for an intramolecular esterification:
Form a lactone (cyclic ester) from a hydroxylated carboxylic acid:
Find all possible lactones from mevalonic acid, a carboxylic acid with multiple hydroxyl groups:
Use an atom mapping to restrict the result to the product with the six-membered ring (mevalonolactone):
By default, hydrogen atoms are only included in the pattern matching when the pattern includes an explicit hydrogen:
Use IncludeHydrogensAll to ensure that Atom[_] will match hydrogen atoms:
Define a pattern reaction for acetylation:
Acetylate salicylic acid to form aspirin:
Exhaustively acetylate the sugar sucrose:
Synthesize phthalide from o-phthalaldehyde by applying a sequence of reactions:
A pattern reaction representing amide formation for peptides:
Generate molecules corresponding to the standard amino acids:
Generate a peptide from its amino acid sequence:
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)
The benzidine rearrangement is a rearrangement reaction for making biaryl amines:
Use the benzidine rearrangement to make benzidine from hydrazobenzene:
The Ugi reaction is a typical example of a multicomponent reaction. Here is a three-component version:
Various local anesthetics can be synthesized using the Ugi reaction, depending on the starting materials used:
These correspond to the anesthetics lidocaine and prilocaine:
Define a pattern reaction for forming a glycosidic bond:
Generate the molecules for the α and β forms of glucose's cyclic form:
Construct all possible disaccharides that can be made from the two forms of glucose:
A molecule of the β form of fructose's cyclic form:
Form sucrose from glucose and fructose using an atom mapping:
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