@PublicAPI public class HitDisplayTool extends java.lang.Object implements SearchConstants, chemaxon.license.Licensable
HitColoringAndAlignmentOptions displayOpts = new HitColoringAndAlignmentOptions(); displayOpts.setColoringEnabled(true); displayOpts.setAlignmentMode(align); // ... MolSearchOptions searchOpts = ... // set search options Molecule query = ... // set your query HitDisplayTool hdt = new HitDisplayTool(displayOpts, searchOpts, query); // Retrieve all hits Molecule[] hits = hdt.getHits(m, (Molecule) null, 0); // Or retrieve the hits one-by-one HitDisplayTool hdt2 = new HitDisplayTool(displayOpts, searchOpts, query); hdt2.setTarget(m); List<Molecule> hitList = new ArrayList<Molecule>(); Molecule hit = hdt2.getNextHit(); while (hit != null) { hitList.add(hit); hit = hdt2.getNextHit(); }
Modifier and Type | Field and Description |
---|---|
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
|
ABS_STEREO_ALWAYS_ON, ABS_STEREO_CHIRAL_FLAG, ABS_STEREO_TABLE_OPTION, ATTACHED_DATA_MATCH_EXACT, ATTACHED_DATA_MATCH_GENERAL, ATTACHED_DATA_MATCH_IGNORE, ATTACHMENT_ATOM, ATTACHMENT_LABEL, ATTACHMENT_MAP, ATTACHMENT_NONE, ATTACHMENT_POINT, ATTACHMENT_RLABEL, CHARGE_MATCHING_DEFAULT, CHARGE_MATCHING_EXACT, CHARGE_MATCHING_IGNORE, DEFAULT_DISSIMILARITY_THRESHOLD, DEFAULT_SEARCHTYPE, DISSIMILARITY_PROPERTY_NAME, DUPLICATE, FULL, FULL_FRAGMENT, HCOUNT_MATCHING_AUTO, HCOUNT_MATCHING_EQUAL, HCOUNT_MATCHING_GREATER_OR_EQUAL, HIT_EXCLUDEDQ, HIT_LP, HIT_MULTICENTER, HIT_NON_R, HIT_ORDERING_NONE, HIT_ORDERING_UNDEF_R_MATCHING_GROUP_FIRST, HIT_R, HIT_R_EMPTY_MATCH, HIT_UNMAPABLE, IMPLICIT_H_MATCHING_DEFAULT, IMPLICIT_H_MATCHING_DISABLED, IMPLICIT_H_MATCHING_ENABLED, IMPLICIT_H_MATCHING_IGNORE, ISOTOPE_MATCHING_DEFAULT, ISOTOPE_MATCHING_EXACT, ISOTOPE_MATCHING_IGNORE, MARKUSH_HIT_INNER, MARKUSH_HIT_ORIGINAL, MATCH_COUNT_BETWEEN, MATCH_COUNT_RELATION, NO_ABAS, NO_SCREEN, POSITION_ON_0TH_HEAVY_ATOM, RADICAL_MATCHING_DEFAULT, RADICAL_MATCHING_EXACT, RADICAL_MATCHING_IGNORE, SEARCH_MODE_NAMES, SEARCH_TYPE_NAMES, SIMILARITY, STEREO_DIASTEREOMER, STEREO_ENANTIOMER, STEREO_EXACT, STEREO_IGNORE, STEREO_MODEL_COMPREHENSIVE, STEREO_MODEL_DEFAULT, STEREO_MODEL_GLOBAL, STEREO_MODEL_LOCAL, STEREO_SPECIFIC, SUBSTRUCTURE, SUPERSTRUCTURE, TAUTOMER_SEARCH_DEFAULT, TAUTOMER_SEARCH_OFF, TAUTOMER_SEARCH_ON, TAUTOMER_SEARCH_ON_IGNORE_TAUTOMERSTEREO, UNDEF_R_MATCHING_ALL, UNDEF_R_MATCHING_GROUP, UNDEF_R_MATCHING_GROUP_H, UNDEF_R_MATCHING_GROUP_H_EMPTY, UNDEF_R_MATCHING_UNDEF_R, VAGUE_BOND_DEFAULT, VAGUE_BOND_LEVEL_HALF, VAGUE_BOND_LEVEL1, VAGUE_BOND_LEVEL2, VAGUE_BOND_LEVEL3, VAGUE_BOND_LEVEL4, VAGUE_BOND_OFF
Constructor and Description |
---|
HitDisplayTool(HitColoringAndAlignmentOptions options,
MolSearchOptions searchOptions,
Molecule query)
Creates a new instance with the specified parameters, with using a default standardization
method which applies only aromatization during the search process.
|
HitDisplayTool(HitColoringAndAlignmentOptions options,
MolSearchOptions searchOptions,
Molecule query,
Standardizer standardizer)
Constructor.
|
HitDisplayTool(HitColoringAndAlignmentOptions hco,
chemaxon.sss.search.pipeline.SearchSettings settings,
Molecule query,
Standardizer standardizer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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,
Molecule markush,
int maxHitCount)
Processes the next target structure.
|
Molecule |
getNextHit()
Gets the next hit.
|
boolean |
isLicensed() |
void |
setLicenseEnvironment(java.lang.String env) |
void |
setMoleculeAndMarkushTarget(Molecule targetMol,
Molecule markushInnerRepresentation)
Sets the target structure.
|
void |
setTarget(Molecule targetMol)
Sets the target structure.
|
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
public HitDisplayTool(HitColoringAndAlignmentOptions options, MolSearchOptions searchOptions, Molecule query, Standardizer standardizer)
options
- options for coloring and alignmentsearchOptions
- search optionsquery
- the query structurestandardizer
- the Standardizer
which will be used during the search process, or
null
for only aromatization.public HitDisplayTool(HitColoringAndAlignmentOptions options, MolSearchOptions searchOptions, Molecule query)
options
- options for coloring and alignmentsearchOptions
- search optionsquery
- the query structure@Beta public HitDisplayTool(HitColoringAndAlignmentOptions hco, chemaxon.sss.search.pipeline.SearchSettings settings, Molecule query, Standardizer standardizer)
hco
- options for coloring and alignmentsettings
- search settings containing search options among othersquery
- the query structurestandardizer
- the Standardizer
which will be used during the search process, or
null
for only aromatization.public Molecule getHit(Molecule targetMol) throws SearchException, chemaxon.enumeration.supergraph.SupergraphException
targetMol
- the targetnull
if there was
no hitSearchException
- error during searchingchemaxon.enumeration.supergraph.SupergraphException
- if target is a markush structure but is erroneouspublic Molecule[] getHits(Molecule targetMol, Molecule markush, int maxHitCount) throws chemaxon.enumeration.supergraph.SupergraphException, SearchException
targetMol
- the targetmarkush
- a markush structure can be specified here, or null
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).chemaxon.enumeration.supergraph.SupergraphException
- in case of search failureSearchException
- in case of search failurepublic void setTarget(Molecule targetMol)
targetMol
- the target@Beta public void setMoleculeAndMarkushTarget(Molecule targetMol, Molecule markushInnerRepresentation) throws chemaxon.enumeration.supergraph.SupergraphException
targetMol
- the targetmarkushInnerRepresentation
- if the target molecule is a markush molecule and its inner representation is
known it can be specified here, otherwise this parameter should be set to null.chemaxon.enumeration.supergraph.SupergraphException
- in case of search failurepublic Molecule[] getHits(int maxHitCountIn) throws 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.enumeration.supergraph.SupergraphException
- in case of search failureSearchException
- in case of search failuresetTarget(Molecule)
,
setMoleculeAndMarkushTarget(Molecule, Molecule)
public Molecule getNextHit() throws SearchException, chemaxon.enumeration.supergraph.SupergraphException
chemaxon.enumeration.supergraph.SupergraphException
- in case of search failureSearchException
- in case of search failuresetTarget(Molecule)
,
setMoleculeAndMarkushTarget(Molecule, Molecule)
public java.util.ArrayList<int[]> getHitIndexes()
getHit(Molecule)
,
getHits(int)
or getNextHit()
int[]
elements.public boolean isLicensed()
isLicensed
in interface chemaxon.license.Licensable
public void setLicenseEnvironment(java.lang.String env)
setLicenseEnvironment
in interface chemaxon.license.Licensable