chemaxon.checkers
Class BondAngleChecker

java.lang.Object
  extended by chemaxon.checkers.AbstractStructureChecker
      extended by chemaxon.checkers.ComponentChecker<MolBond>
          extended by chemaxon.checkers.BondChecker
              extended by chemaxon.checkers.BondAngleChecker
All Implemented Interfaces:
StructureChecker, chemaxon.license.Licensable, java.beans.PropertyChangeListener, java.lang.Cloneable, java.util.EventListener

public class BondAngleChecker
extends BondChecker

A descendant of BondChecker for the detection of unpreferred bond angles in 2D molecule layouts.

Since:
Marvin 5.3
Version:
5.7
Author:
Attila Szabo

Field Summary
 
Fields inherited from class chemaxon.checkers.AbstractStructureChecker
errorType, propertyChangeSupport
 
Fields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID
 
Constructor Summary
BondAngleChecker()
          Default constructor
BondAngleChecker(double tolerance)
          Parameterized constructor.
 
Method Summary
protected  boolean check(Molecule molecule, MolBond bond)
          Checks if the component with index i has problem
protected  StructureCheckerResult check1(Molecule molecule)
          Iterates through the components and checks every component.
static int getRingIndex(Molecule molecule, MolBond bond)
          This function returns the index of the ring which contains the MolBond instance represented by bond parameter
 
Methods inherited from class chemaxon.checkers.BondChecker
createResult, getComponent, getComponentCount
 
Methods inherited from class chemaxon.checkers.ComponentChecker
initialize
 
Methods inherited from class chemaxon.checkers.AbstractStructureChecker
addPropertyChangeListener, addPropertyChangeListener, check, clone, cloneItem, convertResult, equals, expandMolecule, getDescription, getDescriptor, getEditorClassName, getErrorCode, getErrorDescription, getErrorType, getHelpText, getIcon, getLocalMenuName, getName, hashCode, isAvailable, isLicensed, isValid, propertyChange, removePropertyChangeListener, removePropertyChangeListener, setDescription, setHelpText, setIcon, setLicenseEnvironment, setLocalMenuName, setMoreErrorMessage, setName, setNoErrorMessage, setOneErrorMessage, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BondAngleChecker

public BondAngleChecker()
Default constructor


BondAngleChecker

public BondAngleChecker(double tolerance)
Parameterized constructor. The given tolerance will be used during the checking mechanism.

Parameters:
tolerance - is a double value representing the maximum difference which is acceptable by the algorithm
Since:
5.4
Method Detail

check1

protected StructureCheckerResult check1(Molecule molecule)
Description copied from class: ComponentChecker
Iterates through the components and checks every component. If a component has error it is added to a List. After the iteration if no problem occurred the result is null otherwise the method creates a StructureCheckerResult containing the atoms and bonds of the problematic components.

Overrides:
check1 in class ComponentChecker<MolBond>
Parameters:
molecule - the Molecule instance to be checked for problems
Returns:
a StructureCheckerResult which contains all the indices of the problematic components

check

protected boolean check(Molecule molecule,
                        MolBond bond)
Description copied from class: ComponentChecker
Checks if the component with index i has problem

Specified by:
check in class ComponentChecker<MolBond>
Parameters:
molecule - is a Molecule instance
bond - the current component to check
Returns:
true if the component has problem, false otherwise

getRingIndex

public static int getRingIndex(Molecule molecule,
                               MolBond bond)
This function returns the index of the ring which contains the MolBond instance represented by bond parameter

Parameters:
molecule - is a Molecule instance which contains the ring and the bond
bond - is a MolBond instance
Returns:
the index of the ring which contains the MolBond