3.35.9 Init

bool Init(const char *smarts, bool reorder = true)
bool Init(const OEQMolBase &qmol, bool reorder = true)

These methods are used to initialize or reinitialize instances of OESubSearch with a SMARTS pattern or query molecule. If (re)initialization is successful the method returns true. If the SMARTS pattern or query molecule passed to the function is invalid the method will return false. All prior initialization values are cleared before attempting to reinitialize. Failure to reinitialize will not restore prior state values. The second argument to each of the methods determines the traversal order used in subgraph isomorphism detection. An arbitrary traversal order will be chosen if a true value is passed to either function. If the reorder argument is false, then the traversal order will reflect the atom and bond ordering of the passed SMARTS pattern or query molecule.