Perform substructure searches

A program that searches a molecule file using a SMARTS pattern. Flags include: -c, count the number of matches, -o, output the matches to a file, -p, the SMARTS pattern to use, -r, do the reverse search i.e. all molecules that don’t match the SMARTS.

Example

prompt> molgrep -p 'c1ccccc1' -c dbase.oeb.gz
prompt> molgrep -r -p 'c1ccccc1' -i dbase.oeb.gz -o output.oeb.gz

Code

Download code

molgrep.cpp

See also