An class for handling options for the OEParseSmiles function.
OEParseSmilesOptions(bool canon=false, bool strict=false, bool quiet=false)
Initializes the object with the specified options.
bool GetCanon() const
A value of true specifies that the OEKekulize step can be skipped. Defaults to false.
bool GetQuiet() const
bool GetStrict() const
void SetCanon(bool c)
This setting can be used to circumvent the post-processing kekulization test of OEParseSmiles. Passing a boolean true value to this argument indicates to the parser that the SMILES string should be assumed to be well-formed and the usual kekulization (by calling OEKekulize) step may be omitted. This can be used to speed-up parsing of a large database, but has the side-effect that bond orders are not correctly assigned for aromatic molecules.
void SetQuiet(bool q)
This setting can be used to force OEParseSmiles to not write anything to OESystem.OEThrow in the case of a failure. This can be useful for programs that want to determine if a string is a valid SMILES string without spewing unnecessary logging information to the terminal.
void SetStrict(bool s)
This setting controls whether OEParseSmiles should operate in strict mode. By default, the SMILES parser attempts to process any reasonably formed SMILES string. If this setting is true, the parser applies more rigorous sanity checking. For example, the SMILES C==C is accepted by the default non-strict parser, but rejected by the strict parser.