The Octet Molecular Representation Framework v0.8.2

net.sf.octet.query
Class BasicPaddleWheelComparator

java.lang.Object
  extended bynet.sf.octet.query.BasicPaddleWheelComparator
All Implemented Interfaces:
PaddleWheelComparator

public class BasicPaddleWheelComparator
extends java.lang.Object
implements PaddleWheelComparator

A default implementation of the PaddleWheelComparator interface. A BasicPaddleWheelComparator can operate in two different modes, "unilateral" or "bilateral", which differ in the stringency of comparison criteria used. The use of one mode or the other will, in turn, be determined by the problem being solved.

In bilateral mode, comparison is made by identifying a reciprocal one-to-one correspondence between all HalfPlanes within two PaddleWheels. A match will be identified only if both PaddleWheels contain the same number of HalfPlanes. This type of comparison can be applied to exact structure queries in which every Atom of an input molecule maps onto one model Atom and vice versa.

In unilateral mode, a positive comparison may be identified, even if the input PaddleWheel contains fewer HalfPlanes than the model. This type of comparison can be applied to substructure stereo queries in that the only prerequesite is for a valid mapping of all features from input onto model.

Unilateral matching is currently incomplete in this implementation. Provided that neither PaddleWheel contains more than one Atom in the top or bottom of a HalfPlane, unilateral matching works as expected. This represents the majority of Molecules. However, Molecules containing more than one Atom in either half of a HalfPlane will not be properly matched.

PaddleWheels determined to be homomorphic will result in a true return value from match, but those determined to be either heteromorphic or enantiomorphic will result in return values of false

Author:
Richard Apodaca

Method Summary
 boolean compare(PaddleWheel input, PaddleWheel model, AtomMap map)
          Compares input to model using the specified AtomMap to correlate Atoms between the two.
static PaddleWheelComparator getBilateralInstance()
          Returns a bilateral PaddleWheelComparator as a singleton instance.
static PaddleWheelComparator getUnilateralInstance()
          Returns a unilateral PaddleWheelComparator as a singleton instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

compare

public boolean compare(PaddleWheel input,
                       PaddleWheel model,
                       AtomMap map)
Description copied from interface: PaddleWheelComparator
Compares input to model using the specified AtomMap to correlate Atoms between the two. Returns true if a match is detected, or false otherwise.

Specified by:
compare in interface PaddleWheelComparator
Parameters:
input - the PaddleWheel whose features an attempt will be made to correlate with those of model
model - the PaddleWheel serving as the reference for comparison with respect to input
map - the mapping of input atoms onto model atoms
Returns:
true if the comparison was positive or false otherwise

getUnilateralInstance

public static PaddleWheelComparator getUnilateralInstance()
Returns a unilateral PaddleWheelComparator as a singleton instance.

Returns:
a unilateral PaddleWheelComparator as a singleton instance

getBilateralInstance

public static PaddleWheelComparator getBilateralInstance()
Returns a bilateral PaddleWheelComparator as a singleton instance.

Returns:
a bilateral PaddleWheelComparator as a singleton instance

The Octet Molecular Representation Framework v0.8.2