bool OEParseSmirks(OEQMolBase& mol, const char* smirks, unsigned int opt=OESmartsParseOpts::Default) bool OEParseSmirks(OEQMolBase& mo, const char* smirks, const OEVectorBindings &vb, unsigned int opt=OESmartsParseOpts::Default)
These functions generate a reaction molecule by parsing the given SMIRKS pattern. If the SMIRKS string passed to the function is valid and is parsed correctly the function will return a true, otherwise the it will return false.
- The OEQMolBase object that is generated for the given SMIRKS pattern.
- The SMARTS string that represents a molecular substructure query.
- The parameter determines how the SMARTS pattern is interpreted. This value has to be from the OESmartsParseOpts namespace.
- 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 SMIRKS pattern, including recursive vector bindings, and passed to the OEParseSmarts function. Vector bindings will be resolved while the SMIRKS pattern is being parsed.
OEParseSmirks is functionally nearly identical to OEParseSmarts. The only significant difference in how SMARTS and SMIRKS are parsed is the handling of the [H] expression. SMARTS interprets [H] as an atom that has a total hydrogen count of exactly one. SMIRKS interprets [H] as an explicit hydrogen. The OEParseSmirks function therefore parses [H] differently than would OEParseSmarts, and performs additional validity checks of the SMIRKS string.
- Example program libgen.cpp