OEParseSmilesOptions

class OEParseSmilesOptions

An class for handling options for the OEParseSmiles function.

Constructors

OEParseSmilesOptions(bool canon=false, bool strict=false, bool quiet=false)

Initializes the object with the specified options.

GetCanon

bool GetCanon() const

A value of true specifies that the OEKekulize step can be skipped. Defaults to false.

GetQuiet

bool GetQuiet() const

A value of true specifies that there will be no output written to OESystem_OEThrow if OEParseSmiles fails to parse the string. Defaults to false.

GetStrict

bool GetStrict() const

A value of true specifies that the OEParseSmiles will apply more rigorous sanity checks on the parsed SMILES string. Defaults to false.

SetCanon

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.

SetQuiet

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.

SetStrict

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.