CBGfinder is a software for given graphs to find subgraphs (any subgraphs, connected subgraphs, spanning subgraphs or induced subgraphs) accepted by an automaton (a CBG automaton, an ST automaton or a BFS-ST automaton).
CBGfinder was developed with Visual C++ on Windows. However, it can be compiled by g++ on linux.
If you have g++ on linux, try:
$ g++ -o CBGfinder -std=c++11 sample_main.cpp CBGfinder.cpp
The sample program reads graphs in an SDF file (or a MOL file for a single graph) and outputs results in SDF files (accept.sdf, reject.sdf and tw_big.sdf).
To find a longest path in each sample graph, type:
$ CBGfinder -a automaton_path.txt -max sample.sdf
To find a longest cycle in each sample graph, type:
$ CBGfinder -a automaton_cycle.txt -max sample.sdf
To find a benzene ring in each sample graph, type:
$ CBGfinder -a automaton_benzene.txt sample.sdf