chemaxon.structurechecker.structurechecker
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
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.
StructureFixerResult
Attributes
fixed_mol: Molecule, fixed molecule or the original if fix was not successful is_fix_successful: boolean, whether the fixing was successful.
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)
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.