RDKit::StructureCheck::StructChecker Class Reference

Class for performing structure validation and cleanup. More...

`#include <StructChecker.h>`

## Public Types

enum

StructureFlags {
NO_CHANGE = 0 , BAD_MOLECULE = 0x0001 , ALIAS_CONVERSION_FAILED = 0x0002 , STEREO_ERROR = 0x0004 ,
STEREO_FORCED_BAD = 0x0008 , ATOM_CLASH = 0x0010 , ATOM_CHECK_FAILED = 0x0020 , SIZE_CHECK_FAILED = 0x0040 ,
TRANSFORMED = 0x0100 , FRAGMENTS_FOUND = 0x0200 , EITHER_WARNING = 0x0400 , DUBIOUS_STEREO_REMOVED = 0x0800 ,
RECHARGED = 0x1000 , STEREO_TRANSFORMED = 0x2000 , TEMPLATE_TRANSFORMED = 0x4000 , TAUTOMER_TRANSFORMED = 0x8000 ,
BAD_SET , TRANSFORMED_SET
}

typedef enum RDKit::StructureCheck::StructChecker::StructureFlags | StructureFlags

## Public Member Functions

| StructChecker ()
| StructChecker (const StructCheckerOptions &options)
const StructCheckerOptions & | GetOptions () const
void | SetOptions (const StructCheckerOptions &options)
unsigned | checkMolStructure (RWMol &mol) const

## Static Public Member Functions

static std::string | StructureFlagsToString (unsigned flags)
static unsigned | StringToStructureFlags (const std::string &str)

## Detailed Description

Class for performing structure validation and cleanup.

NOTE: This class should be considered beta. The API may change in future releases.

Examples of Usage

StructChecker chk;
int flags = StructureCheck::checkMolStructure( mol ); // use defaults
RDKit::StructureCheck::StructChecker::StructChecker
StructChecker()
Definition: StructChecker.h:279

or

StructureCheck::StructCheckerOptions options; // use defaults
// To use external data
StructureCheck::loadOptionsFromFiles(options, file1, file2);
StructChecker chk(options);
for( mol in mols ) {
int flags = StructureCheck::checkMolStructure( mol, &options);
if (0!=(flags & StructureCheck::StructureFlags::BAD_SET)) {
// write to error file
} else if (0!=(flags & StructureCheck::StructureFlags::TRANSFORMED_SET))
{
// input molecule was transformed
} else { // flag == NO_CHANGE
// no change
}
}
RDKit::StructureCheck::loadOptionsFromFiles
RDKIT_STRUCTCHECKER_EXPORT bool loadOptionsFromFiles(StructCheckerOptions &op, const std::string &augmentedAtomTranslationsFile="", const std::string &patternFile="", const std::string &rotatePatternFile="", const std::string &stereoPatternFile="", const std::string &tautomerFile="")

Definition at line 245 of file StructChecker.h.

## Member Typedef Documentation

## StructureFlags

typedef enum RDKit::StructureCheck::StructChecker::StructureFlags RDKit::StructureCheck::StructChecker::StructureFlags

## Member Enumeration Documentation

## StructureFlags

enum RDKit::StructureCheck::StructChecker::StructureFlags

Enumerator
NO_CHANGE |
BAD_MOLECULE |
ALIAS_CONVERSION_FAILED |
STEREO_ERROR |
STEREO_FORCED_BAD |
ATOM_CLASH |
ATOM_CHECK_FAILED |
SIZE_CHECK_FAILED |
TRANSFORMED |
FRAGMENTS_FOUND |
EITHER_WARNING |
DUBIOUS_STEREO_REMOVED |
RECHARGED |
STEREO_TRANSFORMED |
TEMPLATE_TRANSFORMED |
TAUTOMER_TRANSFORMED |
BAD_SET |
TRANSFORMED_SET |

Definition at line 247 of file StructChecker.h.

## Constructor & Destructor Documentation

## StructChecker() [1/2]

RDKit::StructureCheck::StructChecker::StructChecker | ( |  | ) |

inline

Definition at line 279 of file StructChecker.h.

## StructChecker() [2/2]

RDKit::StructureCheck::StructChecker::StructChecker | ( | const StructCheckerOptions & | options | ) |

inline

Definition at line 280 of file StructChecker.h.

## Member Function Documentation

## checkMolStructure()

unsigned RDKit::StructureCheck::StructChecker::checkMolStructure | ( | RWMol & | mol | ) | const

## GetOptions()

const StructCheckerOptions& RDKit::StructureCheck::StructChecker::GetOptions | ( |  | ) | const

inline

Definition at line 283 of file StructChecker.h.

## SetOptions()

void RDKit::StructureCheck::StructChecker::SetOptions | ( | const StructCheckerOptions & | options | ) |

inline

Definition at line 284 of file StructChecker.h.

## StringToStructureFlags()

static unsigned RDKit::StructureCheck::StructChecker::StringToStructureFlags | ( | const std::string & | str | ) |

static

## StructureFlagsToString()

static std::string RDKit::StructureCheck::StructChecker::StructureFlagsToString | ( | unsigned | flags | ) |

static

The documentation for this class was generated from the following file:

- StructChecker.h