MoleculeSubstructureCount

MoleculeSubstructureCount[mol,patt]

gives a count of the number of times patt appears as a substructure in mol.

MoleculeSubstructureCount[patt]

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

Details and Options

  • patt should be one of the following forms:
  • MoleculePattern[]a molecule pattern
    Atom[]a pattern for a single atom
    Bond[{a1,a2}]a bond between atoms with specified patterns
  • By default, substructure matches are pruned to remove multiple matches to the same set of atoms. Use the option Overlaps->True to disable this behavior.

Examples

open allclose all

Basic Examples  (3)

Count all carboxylic acid groups that are in a molecule:

Visualize the acidic groups:

Count carbonyls adjacent to nitrogen atoms:

Use the operator form:

Scope  (2)

Create a molecule from an ExternalIdentifier and find how many carbon-oxygen bonds it has:

Find the three molecules with the most halogen atoms:

Options  (1)

Overlaps  (1)

By default, six carboncarbon bonds are found in benzene:

By default, substructure matches are pruned to remove multiple matches to the same set of atoms. Use the option OverlapsTrue to count each match separately:

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

Text

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

BibTeX

@misc{reference.wolfram_2021_moleculesubstructurecount, author="Wolfram Research", title="{MoleculeSubstructureCount}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/MoleculeSubstructureCount.html}", note=[Accessed: 27-November-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_moleculesubstructurecount, organization={Wolfram Research}, title={MoleculeSubstructureCount}, year={2021}, url={https://reference.wolfram.com/language/ref/MoleculeSubstructureCount.html}, note=[Accessed: 27-November-2021 ]}

CMS

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

APA

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