chemaxon.checkers
Class OverlappingAtomsChecker

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

public class OverlappingAtomsChecker
extends AtomChecker

OverlappingAtomsChecker detects atoms that are too close to each other.

This checker checks 2D structures only.

Two atoms considered as overlapping when their euclidean distance is less than the half of the ChemAxon standard bond length ( MolBond.CCLENGTH ).

Since:
Marvin 5.3
Version:
5.7
Author:
Attila Szabo
See Also:
MolBond.CCLENGTH

Field Summary
 
Fields inherited from class chemaxon.checkers.AbstractStructureChecker
errorType, propertyChangeSupport
 
Fields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID
 
Constructor Summary
OverlappingAtomsChecker()
          Default constructor
 
Method Summary
protected  boolean check(Molecule molecule, MolAtom atom)
          Examines if an atom is closer to another than the given distance limit.
protected  StructureCheckerResult check1(Molecule molecule)
          Iterates through the components and checks every component.
 
Methods inherited from class chemaxon.checkers.AtomChecker
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

OverlappingAtomsChecker

public OverlappingAtomsChecker()
Default constructor

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<MolAtom>
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,
                        MolAtom atom)
Examines if an atom is closer to another than the given distance limit.

Specified by:
check in class ComponentChecker<MolAtom>
Parameters:
atom - the index of atom in the molecule to check
molecule - is a Molecule instance
Returns:
true if the molecule contains overlapping atoms, otherwise false