FindMoleculeSubstructure

FindMoleculeSubstructure[mol,patt]

finds a mapping between the atom indices in mol and all occurrences of patt in mol.

FindMoleculeSubstructure[mol,patt,n]

finds at most n mappings.

Details and Options

  • FindMoleculeSubstructure returns a list of associations Association[p1->m1,p2->m2,] where pi and mi are atom indices in patt and mol, respectively.
  • If n is All, all mappings are returned.
  • 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 all close all

Basic Examples  (2)

Find phenyl rings in a molecule:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Find all alcohol functional groups:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Scope  (4)

Introduced in 2019
(12.0)