MoleculeContainsQ

MoleculeContainsQ[molecule,patt]

returns True if patt is a substructure of molecule, and False otherwise.

MoleculeContainsQ[patt]

represents an operator form of MoleculeContainsQ that can be applied to a molecule.

Details and Options

  • patt should be one of the following forms:
  • MoleculePattern[]a valid molecule pattern
    Atom[]a pattern for a single atom
    Bond[{a1,a2}]a bond between atoms with specified patterns

Examples

Basic Examples  (4)

Test for the presence of oxygen atoms:

Check for sulfur atoms:

Select molecules with a carboxylic acid group:

Test for the presence of carbon-sulfur bonds in a molecule:

The bond order can be specified or not:

Test if a molecule has rings:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2023_moleculecontainsq, author="Wolfram Research", title="{MoleculeContainsQ}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/MoleculeContainsQ.html}", note=[Accessed: 19-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_moleculecontainsq, organization={Wolfram Research}, title={MoleculeContainsQ}, year={2019}, url={https://reference.wolfram.com/language/ref/MoleculeContainsQ.html}, note=[Accessed: 19-April-2024 ]}