finds a mapping between the atom indices in mol and an occurrence of patt in mol.
finds all occurrences of patt in mol and returns all mappings.
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.
- 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.
Examplesopen allclose all
Use Atom to make a more general pattern. Find all charged atoms:
Use Bond to define a pattern for any double bond: