Class OverlappingBondsChecker

All Implemented Interfaces:
StructureChecker, chemaxon.license.Licensable, PropertyChangeListener, Cloneable, EventListener

@PublicAPI public class OverlappingBondsChecker extends BondChecker
OverlappingBondsChecker detects bonds that are too close to each other.

This checker checks two dimensional structures only.

Two bonds considered as overlapping when they crossing each other, or their distance is smaller then the 80% of the standard Chemaxon bond length ( MolBond.CCLENGTH ). Here distance means the distance of two line segments in euclidean space.
Since:
Marvin 5.3
See Also:
  • Constructor Details

    • OverlappingBondsChecker

      public OverlappingBondsChecker()
      Default constructor
  • Method Details

    • 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)
      Detects bond of the molecule is crossing another bond or closer than the limit distance.
      Specified by:
      check in class ComponentChecker<MolBond>
      Parameters:
      bond - the index of the bond (MolBond instance) in the molecule to check
      molecule - is a Molecule instance
      Returns:
      true if the molecule contains crossing bonds, false otherwise
    • expandMolecule

      protected Molecule expandMolecule(Molecule molecule, Map<MolAtom,MolAtom> atomMap, Map<MolBond,MolBond> bondMap)
      Description copied from class: AbstractStructureChecker
      Returns the original molecule if no groups to expand, or the clone of the original molecule with expanded groups.
      Overrides:
      expandMolecule in class AbstractStructureChecker
      Parameters:
      molecule - the molecule to check
      Returns:
      the original molecule, or a clone with expanded sgroups