OEParseSmarts

bool OEParseSmarts(OEQMolBase& mol, const char* smarts,
                   unsigned int opt=OESmartsParseOpts::Default)
bool OEParseSmarts(OEQMolBase& mol, const char* smarts, const OEVectorBindings &vbinding,
                   unsigned int opt=OESmartsParseOpts::Default)

These functions generate a query molecule by parsing the given SMARTS pattern. If the SMARTS string passed to the function is valid and is parsed correctly the function will return true, otherwise it will return false.

mol

The OEQMolBase object that is generated for the given SMARTS pattern.

smarts

The SMARTS string that represents a molecular substructure query.

opts

The parameter determines how the SMARTS pattern is interpreted. This value has to be from the OESmartsParseOpts namespace.

vbinding

The parameter provides a mechanism for parsing a SMARTS pattern that contains vector bindings. An OEVectorBindings object containing the complete set of possible vector bindings that may be contained in a SMARTS pattern, including recursive vector bindings, and passed to the OEParseSmarts function. Vector bindings will be resolved while the SMARTS pattern is being parsed.

See also