MoleculeMatchQ
Test whether a molecule matches a molecular pattern.
MoleculeMatchQ[mol, patt] returns True when the molecule mol matches patt, and False otherwise.
MoleculeMatchQ[patt] is the operator form that can be applied to a molecule.
Examples
Test a molecule against a SMARTS pattern:
pattern = MoleculePattern["CCO"];
MoleculeMatchQ[Molecule["ethanol"], pattern]Use the operator form:
Select[
Molecule /@ {"ethanol", "propane", "propanol"},
MoleculeMatchQ[MoleculePattern["*CO"]]
]Use FindMoleculeSubstructure when the atom-index mapping of a match is needed.
Something isn't working? Report an issue.
Please visit the official Wolfram Language Reference for more details.