Interface CheckerRunner

  • All Known Implementing Classes:
    AdvancedCheckerRunner, chemaxon.checkers.runner.BasicCheckerRunner, SketchCheckerRunner

    public interface CheckerRunner
    The descendant of CheckerRunner interface has to provide the functionality to run StructureChecker instances automatically
    on the given molecule and fix the problems with the associated StructureFixer instances.


    CheckerRunner can be used directly with the checkAndWait method. This method returns a List of StructureCheckerResult
    which contains all the identified problem of the given molecule. CheckerRunner can return all the StructureFixer instances
    for a StructureCheckerResult. These fixers can be executed one by one.

    CheckerRunner runner;
    ... (initialize/initiate the current CheckerRunner instance)
    List results = runner.checkAndWait();
    for (StructureChecekrResult result : results) {
    List fixers = runner.getFixers(result);
    ... execute one of the fixers

    CheckerRunner supports executing the default fixer of a StructureCheckerResult.

    CheckerRunner runner;
    ... (initialize/initiate the current CheckerRunner instance)
    List results = runner.checkAndWait();
    for (StructureCheckerResult result : results) {

    CheckerRunner supports running the checkers in background thread with the check() method. After the background thread is ended (isChecking() returns false or "checking" property changed fired) the usage is the same. CheckerRunner provides support to try to identify all the problems in the given molecule and fix these problems with the default fixer using the fix() method.
    Marvin 5.3
    • Method Detail

      • setConfigurationReader

        void setConfigurationReader​(ConfigurationReader reader)
        Sets a new configuration for the Runner.
        reader - is the ConfigurationReader instance which provides the current configuraiton
      • check

        void check()
        Invokes a background thread which will run all checkers on the given molecule
      • cancel

        void cancel()
        Stops the background thread
      • isChecking

        boolean isChecking()
        This function identifies the state of the checker thread
        true if the background thread runs false otherwise
      • getCurrent

        int getCurrent()
        the current progress percent
      • getCurrentCheckerName

        String getCurrentCheckerName()
        which StructureChecker instance run currently
      • getProgessLength

        int getProgessLength()
        the length of the checking process
      • fix

        boolean fix()
        Runs all StructureChecker on the given molecule and after that fixes all identified problems with the first StructureFixer which is associated with the current problem.
        true if the fix ended correctly false otherwise
      • setMolecule

        void setMolecule​(Molecule molecule)
        Sets the molecule to be checked by the checkers
        molecule - a Molecule instance to be checked
      • getCheckerConfiguration

        List<StructureChecker> getCheckerConfiguration()
        Gets the list of available checkers
        the list of available checkers
      • setIgnoreConfigurationErrors

        void setIgnoreConfigurationErrors​(boolean ignore)
        Sets whether configuration errors should be ignored on execution.
        ignore - true if configuration errors should be ignored on execution