PatternReaction

PatternReaction[reactantsproducts]

represents a templated reaction between molecule patterns in reactants and products.

PatternReaction[reactantsproducts,mapping]

represents a reaction with a specified mapping between atoms in reactants and products.

PatternReaction["smarts"]

represents a reaction defined by the given reaction SMARTS string.

Details

  • PatternReaction displays in a notebook as a graphical depiction of the reaction. Mapped atom pairs are indicated through a mouseover effect.
  • reactants and products should be lists of MoleculePattern objects.
  • A pattern reaction is used in conjunction with ApplyReaction to effect transformations on Molecule objects.
  • Multiple occurrences of a reactant or product must appear explicitly in the pattern reaction, and stoichiometric coefficients are always assumed to be 1.
  • mapping should be a list of the form {{ri,ari}{pj,apj},}, indicating that the atom with index ari in reactant ri is mapped to the atom with index apj in product pj.
  • A reaction SMARTS string is written "reactants>>products", where the reactants and products are valid SMARTS patterns, with components separated by a period. Atom mapping is indicated within the atom primitive by a colon followed by an integer. For example, "[H:1][O:2][H:3]>>[H:1][O-:2].[H+:3]" denotes the breakup of water into a hydroxide ion and a proton.
  • For a given PatternReaction rxn, the following properties "prop" can be accessed as rxn["prop"]:
  • "Reactants"a list of reactants
    "Products"a list of products
    "AtomMapping"the atom mapping from reactants to products
    "FullyAtomMappedQ"returns True if all atoms in the reaction are mapped
    "Graphics"a graphics object representing the reaction
  • For a given PatternReaction rxn, the following forms are used to test for applicability in the reaction:
  • rxn["ReactantMatchQ",mol]returns True if mol matches any reactant pattern in rxn
    rxn["ReactantMatchQ",mol,n]returns True if mol matches the n^(th) reactant pattern
    rxn["ReactantMatchList",mol]matches mol against each reactant and returns a list of True or False values
    rxn["ProductMatchQ",mol]returns True if mol matches any product in rxn
    rxn["ProductMatchQ",mol,n]returns True if mol matches the n^(th) product
    rxn["ProductMatchList",mol]matches mol against each product and returns a list of True or False values
  • PatternReaction is treated as a raw object by functions such as AtomQ.

Examples

Basic Examples  (3)

Define a pattern reaction for the dissociation of molecular sodium chloride:

Define the same reaction using a SMARTS string:

Define a pattern reaction for the dissociation of hydrochloric acid in water:

Apply the reaction to an acid and an alcohol:

Define a pattern reaction for an intermolecular esterification:

Apply the reaction to an acid and an alcohol:

Wolfram Research (2022), PatternReaction, Wolfram Language function, https://reference.wolfram.com/language/ref/PatternReaction.html.

Text

Wolfram Research (2022), PatternReaction, Wolfram Language function, https://reference.wolfram.com/language/ref/PatternReaction.html.

CMS

Wolfram Language. 2022. "PatternReaction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PatternReaction.html.

APA

Wolfram Language. (2022). PatternReaction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PatternReaction.html

BibTeX

@misc{reference.wolfram_2022_patternreaction, author="Wolfram Research", title="{PatternReaction}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/PatternReaction.html}", note=[Accessed: 28-November-2022 ]}

BibLaTeX

@online{reference.wolfram_2022_patternreaction, organization={Wolfram Research}, title={PatternReaction}, year={2022}, url={https://reference.wolfram.com/language/ref/PatternReaction.html}, note=[Accessed: 28-November-2022 ]}