public class JChemSearchOptions extends SearchOptions implements Serializable, SearchConstants, Cloneable
JChemSearch.DEFAULT_TIMEOUT_LIMIT, dirty, timeoutLimitMilliseconds, verboseABS_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 |
|---|
JChemSearchOptions(int searchType)
Creates a JChemSearchOptions object while setting different search options
according to a predefined search type.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Makes an identical copy of this SearchObject.
|
void |
clonecopy(SearchOptions other)
Copies parameters to
other. |
void |
clonecopyOptions(SearchOptions other)
Copies all search options except search type to other.
|
int |
getAbsoluteStereo()
Get the absolute stereo matching mode.
|
String |
getDescriptorConfig()
Get the screening configuration string used for descriptor dissimilarity search.
|
String |
getDescriptorName()
Get the name of descriptor used for descriptor similarity search
|
String |
getDissimilarityMetric()
Get the property dissimilarity metric property.
|
String |
getDissimilarityMetricParameters()
Get the parameters of the dissimilarity metric.
|
float |
getDissimilarityThreshold()
Get the dissimilarity threshold.
|
String |
getFilterQuery()
Get the filter query property.
|
String |
getFormulaSearchQuery()
Get the query set for formula search.
|
int |
getFormulaSearchType()
Gets the type set for formula search.
|
HaltOnErrorOption |
getHaltOnError()
Get the current error handling behaviour option.
|
boolean |
getMarkushScreeningType(chemaxon.sss.search.options.MarkushScreeningType type)
Internal use only!
Gets whether a given Markush screening is enabled or disabled |
MatchCountOptions |
getMatchCountOptions()
Get the match count options.
|
int |
getMaxResultCount()
Get the maximum result count.
|
int |
getTimeoutLimitMilliseconds()
The search on a single target timeouts reaching this amount of time.
|
int |
getTotalSearchTimeoutLimitMilliseconds()
The total search on a database table timeouts reaching this amount of time.
|
boolean |
isCacheRegistrationNeeded()
Only for internal use!
|
boolean |
isDissimilarityThresholdExcluded()
Get the dissimilarity threshold exclusion option.
|
boolean |
isMarkushScreeningEnabled()
Gets whether screening methods are used for Markush search before ABAS step.
|
boolean |
isOptimizeQueries()
Get whether query should be optimized.
|
boolean |
isReturnsNonHits()
Indicates if an inverse hit list is to be returned.
|
void |
setAbsoluteStereo(int absoluteStereo)
Sets the absolute stereo matching mode.
|
void |
setCacheRegistrationNeeded(boolean value)
Only for internal use!
|
void |
setDescriptorConfig(String descriptorConfig)
Sets the screening configuration string used for descriptor dissimilarity search.
|
void |
setDescriptorName(String descriptorName)
Sets the name of descriptor used for descriptor similarity search
|
void |
setDissimilarityMetric(String dissimilarityMetric)
Sets the metric to be used during similarity search.
|
void |
setDissimilarityMetricParameters(String dissimilarityMetricParam)
Sets the parameters of dissimilarity metric to be used during
similarity search.
|
void |
setDissimilarityThreshold(float dissimilarityThreshold)
Setter for property dissimilarityThreshold.
|
void |
setDissimilarityThresholdExcluded(boolean thresholdExcluded)
Setter for property dissimilarityThresholdExcluded.
|
void |
setFilterQuery(String filterQuery)
Setter for property filterQuery.
|
void |
setFormulaSearchQuery(String formulaSearchQuery)
Sets the query for the formula search.
|
void |
setFormulaSearchType(int formulaSearchType)
Sets the type for the formula search.
|
void |
setHaltOnError(HaltOnErrorOption value)
Set whether search should stop at first error or log the error and
continue search if possible.
|
void |
setMarkushScreeningEnabled(boolean value)
Set whether to use screening for Markush search before ABAS step.
|
void |
setMarkushScreeningType(chemaxon.sss.search.options.MarkushScreeningType type,
boolean enabled)
Internal use only!
Sets the use of a given Markush screening options. |
void |
setMarkushScreeningTypes(String types)
Internal use only!
Enables all Markush screening options represented by the given option string. |
void |
setMatchCountOptions(MatchCountOptions matchCountOptions)
Setter for MatchCountOptions
|
void |
setMaxResultCount(int maxResultCount)
Sets the maximum number of molecules returned by the search.
|
void |
setOptimizeQueries(boolean value)
Sets whether the query molecule should be optimized.
|
void |
setReturnsNonHits(boolean returnsNonHits)
Determines if the inverse of the hit set should be returned.
|
void |
setTotalSearchTimeoutLimitMilliseconds(int value)
The total search on a database timeouts reaching this amount of time.
|
ArrayList<String> |
toList() |
addUserComparator, areMonomersTransformed, clearChangesInUserComparators, deleteAllUserComparators, deleteUserComparator, getAllOptionsAsString, getAllOptionsAsString, getAttachedDataMatch, getAttachedDataPrefixes, getBoolean, getChargeMatching, getCheckSpHyb, getChemTermsFilter, getChemTermsFilterConfig, getChemTermsFilterOption, getCompleteHG, getDoubleBondStereoMatchingMode, getExactSpecialAtomMatching, getExhaustiveModeLimit, getHCountMatching, getHitOrdering, getHomologyBroadTranslation, getHomologyNarrowTranslation, getImplicitHMatching, getIsotopeMatching, getMarkushAromHandling, getOption, getOptionNames, getRadicalMatching, getRLigandEqualityCheck, getSearchType, getSearchType, getSSRType, getStereoModel, getStereoSearchType, getTargetHomologyMatchingMode, getTautomerSearch, getUndefinedRAtom, getUserComparators, getVagueBondLevel, hasChangesInUserComparators, hasUserComparators, isBridgingRAllowed, isCopolymerMatching, isDirty, isEndgroupMatching, isExactBondMatching, isExactQueryAtomMatching, isIgnoreAxialStereo, isIgnoreCumuleneOrRingCisTransStereo, isIgnoreDoubleBondStereo, isIgnoreSynAntiStereo, isIgnoreTetrahedralStereo, isKeepQueryOrder, isMixSgroupMatching, isOrderSensitiveSearch, isPhaseShiftedMatching, isPolymerMatching, isReactionUnpairedMapMatching, isThrowExceptionOnTimeout, isUndefinedRAtomMatchingGroup, isValenceMatching, isVerbose, nonPositiveToInfinite, returnOptionString, setAttachedDataMatch, setAttachedDataPrefixes, setBridgingRAllowed, setChargeMatching, setCheckSpHyb, setChemTermsFilter, setChemTermsFilterConfig, setChemTermsFilterConfig, setChemTermsFilterOption, setCompleteHG, setCopolymerMatching, setDirty, setDoubleBondStereoMatchingMode, setEndgroupMatching, setExactBondMatching, setExactQueryAtomMatching, setExactSpecialAtomMatching, setExhaustiveModeLimit, setHCountMatching, setHitOrdering, setHomologyBroadTranslation, setHomologyNarrowTranslation, setIgnoreAxialStereo, setIgnoreCumuleneOrRingCisTransStereo, setIgnoreDoubleBondStereo, setIgnoreSynAntiStereo, setIgnoreTetrahedralStereo, setImplicitHMatching, setIsotopeMatching, setKeepQueryOrder, setMarkushAromHandling, setMixSgroupMatching, setMonomerTransform, setOption, setOptions, setOrderSensitiveSearch, setPhaseShiftedMatching, setPolymerMatching, setRadicalMatching, setReactionUnpairedMapMatching, setRLigandEqualityCheck, setSSRType, setStereoModel, setStereoSearchType, setTargetHomologyMatchingMode, setTautomerSearch, setThrowExceptionOnTimeout, setTimeoutLimitMilliseconds, setUndefinedRAtom, setUndefinedRAtomUserDefined, setVagueBondLevel, setValenceMatching, setVerbose, toString, toStringpublic JChemSearchOptions(int searchType)
SearchConstants.NO_SCREEN,
SearchConstants.NO_ABAS,
SearchConstants.SUBSTRUCTURE
(default),
SearchConstants.SUPERSTRUCTURE
(no query features allowed),
SearchConstants.SIMILARITY,
SearchConstants.FULL,
SearchConstants.DUPLICATE and
SearchConstants.FULL_FRAGMENT.
searchType - the predefined search typepublic void setAbsoluteStereo(int absoluteStereo)
absoluteStereo - absolute stereo matching mode
SearchConstants.ABS_STEREO_TABLE_OPTION.SearchConstants.ABS_STEREO_TABLE_OPTION,
SearchConstants.ABS_STEREO_CHIRAL_FLAG,
SearchConstants.ABS_STEREO_ALWAYS_ONpublic int getAbsoluteStereo()
SearchConstants.ABS_STEREO_TABLE_OPTION.SearchConstants.ABS_STEREO_TABLE_OPTION,
SearchConstants.ABS_STEREO_CHIRAL_FLAG,
SearchConstants.ABS_STEREO_ALWAYS_ON,
setAbsoluteStereo(int)public void setFormulaSearchType(int formulaSearchType)
formulaSearchType - Formula search type.
FormulaSearch.NONE.getFormulaSearchType(),
FormulaSearch.NONE,
FormulaSearch.EXACT,
FormulaSearch.EXACT_SUBFORMULA,
FormulaSearch.SUBFORMULApublic int getFormulaSearchType()
FormulaSearch.NONE.setFormulaSearchType(int),
FormulaSearch.NONE,
FormulaSearch.EXACT,
FormulaSearch.EXACT_SUBFORMULA,
FormulaSearch.SUBFORMULApublic void setFormulaSearchQuery(String formulaSearchQuery)
formulaSearchQuery - Formula search query. E.g. "C6-8 H-20 N1"
null.getFormulaSearchQuery(),
setFormulaSearchType(int),
FormulaSearchpublic String getFormulaSearchQuery()
null.setFormulaSearchQuery(String),
setFormulaSearchType(int),
FormulaSearchpublic String getFilterQuery()
null.setFilterQuery(String)public void setFilterQuery(String filterQuery)
searchOptions.setFilterQuery("select cd_id from mystructures where cd_id > 1000");
If the SELECT contains an "ORDER BY" clause, the results will be ordered
accordingly, the setting for JChemSearch.setOrder(int) will be ignored,
except when an
inverse hit list is requested.
NOTE: The filtered cd_id values are cached. Invoke
setFilterQuery again before the next search, if the filter
needs to be refreshed.
filterQuery - New value of property filterQuery.
null.getFilterQuery()public void setDissimilarityThreshold(float dissimilarityThreshold)
dissimilarityThreshold - value of the dissimilarity threshold.
0.3.getDissimilarityThreshold()public float getDissimilarityThreshold()
0.3.setDissimilarityThreshold(float)public void setDissimilarityThresholdExcluded(boolean thresholdExcluded)
thresholdExcluded - If true, only dissimilarity values less than the
threshold value are considered hits. If false,
dissimilarity values equaling the threshold value are also
considered hits. (Defaults to false.)
false.isDissimilarityThresholdExcluded()public boolean isDissimilarityThresholdExcluded()
false.setDissimilarityThresholdExcluded(boolean)public int getMaxResultCount()
0.setMaxResultCount(int)public void setMaxResultCount(int maxResultCount)
throws IllegalArgumentException
NOTE:
maxResultCount
most similar results will be given back. In this case this option does not mean speedup.
maxResultCount - New value of property maxResultCount.
Default value is 0, i.e. there is no limit.IllegalArgumentException - if maxResultCount was negative number.getMaxResultCount()public void setReturnsNonHits(boolean returnsNonHits)
returnsNonHits - set to true to get non-hit structures. Default
is false.
false.isReturnsNonHits()public boolean isReturnsNonHits()
true if inverse hit list it to be returned.
false.setReturnsNonHits(boolean)public void setDissimilarityMetric(String dissimilarityMetric)
dissimilarityMetric - the name of the metric to be used.
Specify null for the default metric.
For reaction tables see ReactionFingerprint.
For molecule and any tables the default metrics
can be replaced by the metrics described in
SimilarityCalculatorFactory.create(String).
null.JChemSearch.getDissimilarityMetrics(chemaxon.util.ConnectionHandler, String),
getDissimilarityMetric(),
setDissimilarityThreshold(float),
getDissimilarityThreshold(),
SimilarityCalculatorFactory.create(String),
ReactionFingerprintpublic String getDissimilarityMetric()
null.setDissimilarityMetric(String),
setDissimilarityThreshold(float),
getDissimilarityThreshold()public void setDissimilarityMetricParameters(String dissimilarityMetricParam)
dissimilarityMetricParam - parameters of the dissimilarity metric
e.g. for Tversky: "0.3,0.7" or equivalenly: "queryWeight=0.3,targetWeight=0.7"
Specify empty string for no parameters or default parameter.
For molecule and any tables the available metrics are the ones
described in SimilarityCalculatorFactory.create(String).
null.getDissimilarityMetricParameters(),
JChemSearch.getDissimilarityMetrics(chemaxon.util.ConnectionHandler, String),
getDissimilarityMetric(),
setDissimilarityThreshold(float),
getDissimilarityThreshold(),
SimilarityCalculatorFactory.create(String),
ReactionFingerprintpublic String getDissimilarityMetricParameters()
null.setDissimilarityMetricParameters(String),
setDissimilarityMetric(String),
setDissimilarityThreshold(float),
getDissimilarityThreshold()public void setDescriptorConfig(String descriptorConfig)
descriptorConfig - the configuration string used for dissimilarity search
calculation. Default value: null (means default configuration)
null.getDescriptorConfig(),
MDTableHandler.getMDConfig(String, String),
setDescriptorName(String),
getDescriptorName()public String getDescriptorConfig()
null.setDescriptorConfig(String),
setDescriptorName(String),
getDescriptorName()public void setDescriptorName(String descriptorName)
descriptorName - the descriptor identifier used for similarity
search. If not specified or null, structural fingerprint
similarity search performed by default.
null.getDescriptorName(),
setDescriptorConfig(String),
getDescriptorConfig()public String getDescriptorName()
null.setDescriptorName(String),
setDescriptorConfig(String),
getDescriptorConfig()public void setMatchCountOptions(MatchCountOptions matchCountOptions)
matchCountOptions - a predefined MatchCountOptions objectgetMatchCountOptions()public MatchCountOptions getMatchCountOptions()
MatchCountOptions,
setMatchCountOptions(MatchCountOptions)public boolean isOptimizeQueries()
true if the query molecule should be optimized
true.setOptimizeQueries(boolean)public void setOptimizeQueries(boolean value)
value - true if the query molecule should be optimized.
true.isOptimizeQueries()public void setCacheRegistrationNeeded(boolean value)
value - new value for cacheRegistrationpublic boolean isCacheRegistrationNeeded()
public void setMarkushScreeningEnabled(boolean value)
true all known screening methods are enabled,
if set to false all known screening methods are disabled.
value - markush screening should be used or not.
true.isMarkushScreeningEnabled(),
setMarkushScreeningType(MarkushScreeningType, boolean),
MarkushScreeningTypepublic boolean isMarkushScreeningEnabled()
true if screening is used, false otherwise.setMarkushScreeningEnabled(boolean),
setMarkushScreeningType(MarkushScreeningType, boolean),
getMarkushScreeningType(MarkushScreeningType)public void setMarkushScreeningType(chemaxon.sss.search.options.MarkushScreeningType type,
boolean enabled)
type - Markush screening option enabled or disabledenabled - true to enable screening option, false
to disable screening optionsetMarkushScreeningEnabled(boolean),
getMarkushScreeningType(MarkushScreeningType),
MarkushScreeningTypepublic void setMarkushScreeningTypes(String types)
types - Markush screening options to enable separated by a comma.
If null (default), all screening options are enabled. If empty string, no methods
are enabled.public boolean getMarkushScreeningType(chemaxon.sss.search.options.MarkushScreeningType type)
type - Markush screening option to checktrue if screening is enabled, false
if screening method is disabledgetMarkushScreeningType(MarkushScreeningType),
MarkushScreeningTypepublic void setHaltOnError(HaltOnErrorOption value)
value - stop at first error or not.
HaltOnErrorOption.DEFAULTHaltOnErrorOption,
getHaltOnError()public HaltOnErrorOption getHaltOnError()
HaltOnErrorOption,
setHaltOnError(HaltOnErrorOption)public Object clone() throws CloneNotSupportedException
clone in class SearchOptionsCloneNotSupportedExceptionpublic void clonecopy(SearchOptions other)
other.
It copies
other is a JchemSearchOptions object
clonecopy in class SearchOptionsother - search option to overwrite.public void clonecopyOptions(SearchOptions other)
SearchOptionsclonecopyOptions in class SearchOptionsother - search option object to overwritepublic int getTimeoutLimitMilliseconds()
getTimeoutLimitMilliseconds in class SearchOptionsSearchOptions.getTimeoutLimitMilliseconds(),
SearchOptions.setTimeoutLimitMilliseconds(int),
setTotalSearchTimeoutLimitMilliseconds(int)public final int getTotalSearchTimeoutLimitMilliseconds()
setTotalSearchTimeoutLimitMilliseconds(int),
getTimeoutLimitMilliseconds()public void setTotalSearchTimeoutLimitMilliseconds(int value)
SearchOptions.setTimeoutLimitMilliseconds(int) is set
the search still can time out.
JChemSearch.isRunning() must be constantly called within
the specified time interval, otherwise the search stops. Useful if the
user no longer monitors the search process, e.g. closes the browser
window.
value - The time limit to set in milliseconds. Negative values are treated as Integer.MAX_VALUE.getTotalSearchTimeoutLimitMilliseconds(),
SearchOptions.setTimeoutLimitMilliseconds(int)public ArrayList<String> toList()
toList in class SearchOptionsSearchOptions.setOptions(String),
SearchOptions.toString()