Package chemaxon.checkers
Class OverlappingBondsChecker
java.lang.Object
chemaxon.checkers.AbstractStructureChecker
chemaxon.checkers.ComponentChecker<MolBond>
chemaxon.checkers.BondChecker
chemaxon.checkers.OverlappingBondsChecker
- All Implemented Interfaces:
StructureChecker
,chemaxon.license.Licensable
,PropertyChangeListener
,Cloneable
,EventListener
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 (
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:
-
Field Summary
Fields inherited from class chemaxon.checkers.AbstractStructureChecker
errorType, propertyChangeSupport
Fields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Detects bond of the molecule is crossing another bond or closer than the limit distance.protected StructureCheckerResult
Iterates through the components and checks every component.protected Molecule
Returns the original molecule if no groups to expand, or the clone of the original molecule with expanded groups.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, 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
-
Constructor Details
-
OverlappingBondsChecker
public OverlappingBondsChecker()Default constructor
-
-
Method Details
-
check1
Description copied from class:ComponentChecker
Iterates through the components and checks every component. If a component has error it is added to aList
. After the iteration if no problem occurred the result is null otherwise the method creates aStructureCheckerResult
containing the atoms and bonds of the problematic components.- Overrides:
check1
in classComponentChecker<MolBond>
- Parameters:
molecule
- theMolecule
instance to be checked for problems- Returns:
- a
StructureCheckerResult
which contains all the indices of the problematic components
-
check
Detects bond of the molecule is crossing another bond or closer than the limit distance.- Specified by:
check
in classComponentChecker<MolBond>
- Parameters:
bond
- the index of the bond (MolBond
instance) in the molecule to checkmolecule
- is aMolecule
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 classAbstractStructureChecker
- Parameters:
molecule
- the molecule to check- Returns:
- the original molecule, or a clone with expanded sgroups
-