RDKit: RDKit::StructureCheck::StructChecker Class Reference

| RDKit Open-source cheminformatics and machine learning.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | List of all members
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

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
}
}

Definition at line 243 of file StructChecker.h.

## Member Typedef Documentation

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

## Member Enumeration Documentation

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 245 of file StructChecker.h.

## Constructor & Destructor Documentation

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

Definition at line 277 of file StructChecker.h.

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

Definition at line 278 of file StructChecker.h.

## Member Function Documentation

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

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

Definition at line 281 of file StructChecker.h.

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

Definition at line 282 of file StructChecker.h.

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

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

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

- StructChecker.h