chemaxon.structurechecker.structurechecker

class StructureCheckerResult:

StructureCheckerResult

Attributes

description : str Description of the found error checker_name : str name of the checker reporting the error colored_mol : Molecule colored molecule showing the errors, None if returnColoredHit is False atom_indexes : list list of atom indexes with errors bond_indexes : list list of bond indexes with errors

StructureCheckerResult( result: chemaxon.structurechecker.structurechecker._CStructureCheckerResult, returnColoredHit: bool)
description
checker_name
atom_indexes
bond_indexes
sgroup_indexes
rgroup_ids
class StructureCheckerBatchResult:

StuctureCheckerBatchResult

Attributes

results: list of StructureCheckerResults aggregated_colored_mol: colored molecule showing all errors as union, None if returnedColoredHit is False or no errors found.

StructureCheckerBatchResult( result: chemaxon.structurechecker.structurechecker._CStructureCheckerBatchResult, returnColoredHit: bool)
results
def is_error_free(self) -> bool:

Returns whether there is no error detected in the molecule.

class StructureFixerResult:

StructureFixerResult

Attributes

fixed_mol: Molecule, fixed molecule or the original if fix was not successful is_fix_successful: boolean, whether the fixing was successful.

StructureFixerResult( fixer_result: chemaxon.structurechecker.structurechecker._CStructureFixerResult)
fixed_mol
is_fix_successful
class StructureChecker:

Creates a structurechecker object.

More info about structure checkers: https://docs.chemaxon.com/display/docs/structure-checker_index

Parameters:

config: Configuration parameter in any of the following formats:
     - xml string
     - action string
     - list of action strings
     - file object of the configuration file.

Example:

structurechecker = StructureChecker("aromaticityerror:type=basic")

structurechecker = StructureChecker(["wedgeerror", "valenceerror"])

with open("config.xml") as f: structurechecker = StructureChecker(f)

StructureChecker(config)
config: str
def check( self, mol: chemaxon.molecule.Molecule, returnColoredHit: bool = True) -> StructureCheckerBatchResult:

Molecule structure checking.

Parameters

mol: The molecule to be checked.

Raises

RuntimeError If the molecule contains more than 500 atoms / bonds.

Returns

result structure checking batch result.

Fixes the given structure based on the config provided during StructureChecker construction.

Parameters

mol: Molecule to be fixed.

Returns

result: StructureFixerResult object containing the fixed molecule and a flag showing if the fix was successful. If fix was unsuccessful it returns the original mol.