|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.util.HitDisplayTool
public class HitDisplayTool
Class for displaying hit results with hit coloring, alignment, partial clean, etc. E.g.
HitColoringAndAlignmentOptions hco = new HitColoringAndAlignmentOptions(); hco.coloring = true; hco.alignmentMode = align; hco.markushDisplayMode = //set the desired markush display mode MolSearchOptions mso = ... //get you search options Molecule query = ... //get your query HitDisplayTool hdt = new HitDisplayTool(hco, mso, null, query); //retrieve all hits: Molecule[] hits = hdt.getHits(m, (Molecule) null, 0); //or retrieve the hits one-by-one: HitDisplayTool hdt2 = new HitDisplayTool(hco, mso, null, query); hdt2.setTarget(m); ArrayListhitList = new ArrayList (); Molecule hit = hdt2.getNextHit(); while(hit!=null) { hitList.add(hit); hit = hdt2.getNextHit(); }
| Field Summary | |
|---|---|
static int |
HIT_ATOM_SET
Set identifier for hit atoms |
static int |
HIT_BOND_SET
Set identifier for hit bonds |
static int |
NON_HIT_ATOM_SET
Set identifier for non-hit atoms |
static int |
NON_HIT_BOND_SET
Set identifier for non hit bonds |
| Constructor Summary | |
|---|---|
HitDisplayTool(HitColoringAndAlignmentOptions options,
MolSearchOptions searchOptions,
Standardizer standardizer,
Molecule query)
Constructor. |
|
| Method Summary | |
|---|---|
Molecule |
getHit(Molecule targetMol)
Processes the next target structure. |
java.util.ArrayList<int[]> |
getHitIndexes()
Returns the hit indexes for the last target. |
Molecule[] |
getHits(int maxHitCountIn)
Processes the next target structure. |
Molecule[] |
getHits(Molecule targetMol,
byte[] markushSource,
int maxHitCount)
Processes the next target structure. |
Molecule[] |
getHits(Molecule targetMol,
Molecule markush,
int maxHitCount)
Processes the next target structure. |
Molecule |
getNextHit()
Gets the next hit. |
boolean |
isLicensed()
|
void |
setLicenseEnvironment(java.lang.String env)
|
void |
setMoleculeMarkushSourceTarget(Molecule targetMol,
byte[] markushSource)
Sets the target structure. |
void |
setTarget(Molecule targetMol)
Sets the target structure. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int HIT_ATOM_SET
public static final int NON_HIT_ATOM_SET
public static final int HIT_BOND_SET
public static final int NON_HIT_BOND_SET
| Constructor Detail |
|---|
public HitDisplayTool(HitColoringAndAlignmentOptions options,
MolSearchOptions searchOptions,
Standardizer standardizer,
Molecule query)
options - options for coloring and alignmentsearchOptions - search optionsstandardizer - this Standardizer will be used during the search
process, or null for only aromatization.query - the query structure| Method Detail |
|---|
public Molecule getHit(Molecule targetMol)
throws chemaxon.sss.search.SearchException,
chemaxon.enumeration.supergraph.SupergraphException
targetMol - the target
null if there was
no hit
- Throws:
chemaxon.sss.search.SearchException - error during searching
chemaxon.enumeration.supergraph.SupergraphException - if target is a markush structure but is erroneous
public Molecule[] getHits(Molecule targetMol,
byte[] markushSource,
int maxHitCount)
throws MolFormatException,
chemaxon.enumeration.supergraph.SupergraphException,
chemaxon.sss.search.SearchException
targetMol - the targetmarkushSource - a markush structure can be specified here, or
null. The proper byte[] can be obtained from the database
cd_markush field.maxHitCount - specify 0 to get back all the hits found,
or an arbitrary limit.-1 to get back only a single hit, the best fitting
is returned in case of alignment (default).
MolFormatException
chemaxon.enumeration.supergraph.SupergraphException
chemaxon.sss.search.SearchException
public Molecule[] getHits(Molecule targetMol,
Molecule markush,
int maxHitCount)
throws chemaxon.enumeration.supergraph.SupergraphException,
chemaxon.sss.search.SearchException
targetMol - the targetmarkush - a markush structure can be specified here,
or nullmaxHitCount - specify 0 to get back all the hits found,
or an arbitrary limit.-1 to get back only a single hit, the best fitting
is returned in case of alignment (default).
chemaxon.enumeration.supergraph.SupergraphException
chemaxon.sss.search.SearchExceptionpublic void setTarget(Molecule targetMol)
targetMol - the target
public void setMoleculeMarkushSourceTarget(Molecule targetMol,
byte[] markushSource)
throws MolFormatException,
java.util.ServiceConfigurationError
targetMol - the targetmarkushSource - a markush structure can be specified here, or
null. The proper byte[] can be obtained from the database
cd_markush field.
MolFormatException - markushSource is not of a suitable format
Ille - the markush structure read from the byte array has bad structure.
java.util.ServiceConfigurationError
public Molecule[] getHits(int maxHitCountIn)
throws chemaxon.sss.search.SearchException,
chemaxon.enumeration.supergraph.SupergraphException
maxHitCountIn - specify 0 to get back all the hits found,
or an arbitrary limit.-1 to get back only a single hit, the best fitting
is returned in case of alignment (default).
chemaxon.sss.search.SearchException
chemaxon.enumeration.supergraph.SupergraphExceptionsetTarget(Molecule),
setMoleculeMarkushSourceTarget(Molecule, byte[])
public Molecule getNextHit()
throws chemaxon.sss.search.SearchException,
chemaxon.enumeration.supergraph.SupergraphException
chemaxon.sss.search.SearchException
chemaxon.enumeration.supergraph.SupergraphExceptionsetTarget(Molecule),
setMoleculeMarkushSourceTarget(Molecule, byte[])public java.util.ArrayList<int[]> getHitIndexes()
getHit(Molecule),
getHits(int) or getNextHit()
int[]
elements.public boolean isLicensed()
isLicensed in interface chemaxon.license.Licensablepublic void setLicenseEnvironment(java.lang.String env)
setLicenseEnvironment in interface chemaxon.license.Licensable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||