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

Examples

Basic Examples  (2)

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

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

The bond order can be specified or not:

In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=

Test if a molecule has rings:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2019
(12.0)