FindMoleculeSubstructure
FindMoleculeSubstructure[mol,patt] finds a mapping between the atom indices in mol and an occurrence of patt in mol.
FindMoleculeSubstructure[mol,patt,All] finds all occurrences of patt in mol and returns all mappings.
FindMoleculeSubstructure[mol,patt,n] finds at most n mappings.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.