The Octet Molecular Representation Framework v0.8.2

net.sf.octet.query
Class UnilateralQueryStrategy

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

public class UnilateralQueryStrategy
extends java.lang.Object
implements MoleculeQueryStrategy

A MoleculeQueryStrategy that is consistent with substructure searches. UnilateralQueryStrategy requires only that a feature that is present in an input Molecule also be present in a model Molecule. In other words, a match will be found if a model Molecule has additional features that do not map to an input Molecule.

Author:
Richard Apodaca

Nested Class Summary
 
Nested classes inherited from class net.sf.octet.traversal.IsomorphismTraverser
IsomorphismTraverser.Handler
 
Constructor Summary
UnilateralQueryStrategy()
          Constructs a fully-functional UnilateralQueryStrategy.
UnilateralQueryStrategy(IsomorphismTraverser traverser)
          Constructs a fully-functional UnilateralQueryStrategy 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

UnilateralQueryStrategy

public UnilateralQueryStrategy()
Constructs a fully-functional UnilateralQueryStrategy.


UnilateralQueryStrategy

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

Parameters:
traverser - the IsomorphismTraverser to which traversal operations will be delegated
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

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

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

The Octet Molecular Representation Framework v0.8.2