The Octet Molecular Representation Framework v0.8.2

net.sf.octet.query
Class BilateralQueryStrategy

java.lang.Object
  extended bynet.sf.octet.query.BilateralQueryStrategy
All Implemented Interfaces:
ConfigurationComparator, ConformationComparator, IsomorphismTraverser, MoleculeQueryStrategy

public class BilateralQueryStrategy
extends java.lang.Object
implements MoleculeQueryStrategy

A MoleculeQueryStrategy consistent with exact structure matching. BilateralQueryStrategy requires a reciprocal one-to-one correspondence between all features in two Molecules.

Author:
Richard Apodaca

Nested Class Summary
 
Nested classes inherited from class net.sf.octet.traversal.IsomorphismTraverser
IsomorphismTraverser.Handler
 
Constructor Summary
BilateralQueryStrategy()
          Constructs a fully-functional BilateralQueryStrategy.
BilateralQueryStrategy(IsomorphismTraverser traverser)
          Constructs a fully functional BilateralQueryStrategy that delegates traversal operations to traverser.
 
Method Summary
 boolean compare(Configuration input, Configuration model, AtomMap map)
          Compares input with model using map to correlate Atoms between the two.
 boolean compare(Conformation input, Conformation model, AtomMap map)
          Compares input to model, using the specified AtomMap to correlate Atoms between the two.
 AtomQuery createAtomQuery(Atom atom, Molecule molecule)
          Creates an AtomQuery for atom in the context of molecule.
 void traverse(AtomGraph input, AtomGraph model, IsomorphismTraverser.Handler handler)
          Traverses the Atoms and AtomPairs in model that are isomorphic with those contained in input while forwarding traversal events to handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BilateralQueryStrategy

public BilateralQueryStrategy()
Constructs a fully-functional BilateralQueryStrategy.


BilateralQueryStrategy

public BilateralQueryStrategy(IsomorphismTraverser traverser)
Constructs a fully functional BilateralQueryStrategy that delegates traversal operations to traverser.

Parameters:
traverser - the IsomorphismTraverser to which this BilateralQueryStrategy will delegate traversal responsibilities
Method Detail

createAtomQuery

public AtomQuery createAtomQuery(Atom atom,
                                 Molecule molecule)
Description copied from interface: MoleculeQueryStrategy
Creates an AtomQuery for atom in the context of molecule.

Specified by:
createAtomQuery in interface MoleculeQueryStrategy
Parameters:
atom - the atom after which the AtomQuery will be modeled
molecule - the context of atom
Returns:
a fully-functional AtomQuery based on the properties of atom

traverse

public void traverse(AtomGraph input,
                     AtomGraph model,
                     IsomorphismTraverser.Handler handler)
Description copied from interface: IsomorphismTraverser
Traverses the Atoms and AtomPairs in model that are isomorphic with those contained in input while forwarding traversal events to handler.

Specified by:
traverse in interface IsomorphismTraverser
Parameters:
input - the AtomGraph whose elements will be compared to model
model - the AtomGraph whose elements that are isomorphic to model will be traversed
handler - receives traversal events

compare

public boolean compare(Configuration input,
                       Configuration model,
                       AtomMap map)
Description copied from interface: ConfigurationComparator
Compares input with model using map to correlate Atoms between the two. Returns true if commonality was detected, or false otherwise.

Specified by:
compare in interface ConfigurationComparator
Parameters:
input - the Configuration whose features will be compared with those of model using map
model - the reference Configuration
map - the mapping of the atoms of input onto map
Returns:
true if the comparison was positive or false otherwise

compare

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

Specified by:
compare in interface ConformationComparator
Parameters:
input - the Conformation whose features will be compared with those of model using map
model - the reference Conformation
map - the mapping of the atoms of input onto map
Returns:
true if the comparison was positive or false otherwise

The Octet Molecular Representation Framework v0.8.2