Package com.chemaxon.search
Interface SimpleSearcher
- All Known Implementing Classes:
MolSearch
,RGroupDecomposition
,StandardizedMolSearch
Search interface for different Molecule-Molecule search types.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMatch
(int queryAtom, int targetAtom) Adds a fixed matching between the given query and target atoms.Searches for the next hit.boolean
Determines if there is a matching between the specified query and target.void
Sets the query structure of the searcher.void
Sets the query structure of the searcher with excluded atoms.void
Sets the target structure of the searcher.void
Sets the target structure of the searcher with excluded atoms.
-
Method Details
-
setQuery
Sets the query structure of the searcher.Note: If the molecule is changed, it will need to be reset for the searcher.
- Parameters:
query
- the query structure
-
setQuery
Sets the query structure of the searcher with excluded atoms. Excluded atoms are not used during the search procedure. Atoms connected to excluded ones keep their stereo features.Note: If the molecule is changed, it will need to be reset for the searcher.
- Parameters:
query
- the query structureexcludedAtoms
- atoms excluded from search
-
setTarget
Sets the target structure of the searcher.Note: If the molecule is changed, it will need to be reset for the searcher.
- Parameters:
target
- the target structure
-
setTarget
Sets the target structure of the searcher with excluded atoms. Excluded atoms are not used during the search procedure. Atoms connected to excluded ones keep their stereo features.Note: If the molecule is changed, it will need to be reset for the searcher.
- Parameters:
target
- the target structureexcludedTargetAtoms
- atoms excluded from search
-
addMatch
void addMatch(int queryAtom, int targetAtom) Adds a fixed matching between the given query and target atoms. That is, the query atom can only match the given target atom. If such a hit is not possible, no hits will be returned. The use of this method makes the search more effective than checking the hits afterwards.- Parameters:
queryAtom
- index of the query atomtargetAtom
- index of the target atom
-
findNextHit
Searches for the next hit.- Returns:
- the next search hit or
null
if there is no more hit - Throws:
SearchException
- in case some error is encountered.
-
isMatching
Determines if there is a matching between the specified query and target.- Returns:
- true if there is matching, false if not.
- Throws:
SearchException
- in case some error is encountered.
-