Package chemaxon.sss.search
Class SearchOptions
java.lang.Object
chemaxon.sss.search.SearchOptions
- All Implemented Interfaces:
SearchConstants
,Serializable
,Cloneable
- Direct Known Subclasses:
JChemSearchOptions
,MolSearchOptions
@PublicApi
public class SearchOptions
extends Object
implements SearchConstants, Cloneable, Serializable
Class to encapsulate common search parameters.
- Since:
- 5.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
protected boolean
This flag is set to true whenever any of the options change.protected int
The search on a single target timeouts reaching this number of milliseconds.boolean
For debugging purposes.Fields inherited from interface chemaxon.sss.SearchConstants
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 Summary
ConstructorDescriptionSearchOptions
(int searchType) Creates a SearchOptions object while setting different search options according to a predefined search type. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the given user-defined comparator to the search.final boolean
Obtain monomer transformation information.final void
Used in initializing searches.clone()
Makes an identical copy of this SearchObject.void
clonecopy
(SearchOptions other) Copies all search options to other.void
clonecopyOptions
(SearchOptions other) Copies all search options except search type to other.void
Deletes all comparator added by the user.void
Deletes a given user defined comparator if found.Returns a string that
- describes the state of the options
- can be the input of setOptions(String)
- contains all options, including those which have their default value (except dissimilarity threshold in case of similarity search)Returns a string that
- describes the state of the options
- can be the input of setOptions(String)
- contains all options, including those which have their default value (except dissimilarity threshold in case of similarity search)final int
Returns whether attached data (in data sgroups) should be used when comparing structures.final String
Returns the prefixes of the names of those data sgroups that will be used during structure comparison ornull
if all data sgroups should be checked.protected static boolean
getBoolean
(String value) Returns value as a boolean flag.final int
Get the charge matching option valuefinal boolean
Get the sp-hybridization state optionfinal String
Gets the Chemical Terms filtering expressionfinal String
Gets the configuration string for Chemical Terms filter.chemaxon.sss.search.options.ChemTermsFilterOption
FOR INTERNAL USE ONLY.final boolean
Deprecated, for removal: This API element is subject to removal in a future version.This option is no longer supported.final int
Get the double bond stereo matching mode.final String
Get the identifiers of those special atoms that should match exactly during structure comparison.final int
Upon reaching this number of steps, the search switches to exhaustive mode from fast mode.final int
Get the interpretation of H count in the query.int
Returns the hit ordering type.Get target-side homology matching option.Get query-side homology matching option, which homology atoms can match specific atoms.final int
Get option for matching implicit and explicit hydrogensfinal int
Get option for matching isotopesGets the Markush aromatic search behavior.Returns option value in string format.Returns the name of all available options which can be used to set/get option values withsetOption(String, String)
andgetOption(String)
methods.final int
Get option for radical matching behavior.final boolean
Returnstrue
if undefined R-atoms with the same R-group ID should match the same structure.final int
Returns the currently set global search operation mode.static int
getSearchType
(String searchTypeValue) Decodes the string representation of the search type and returns the predefined constant value defined inSearchConstants
.Gets the type of the set of smallest rings to usefinal int
Get the stereo model option.final int
Get the stereo search type option.Returns the target homology matching mode.final int
Indicates if tautomers of the query should be enumerated for search.int
The search on a single target timeouts reaching this amount of time.final int
Returns undefined R atom matching behavior mode.Returns the user defined comparators.final int
Getter for vague bond level.final boolean
Used in initializing searches.final boolean
Gets whether searcher has user defined comparators.final boolean
Returnstrue
if different undefined R-atoms can match the same group of atoms.final boolean
Specifies whether matching mode is copolymer.final boolean
isDirty()
Returns the dirty flag.final boolean
Get whether polymers end groups must match.final boolean
Indicates whether bond types should match exactly - looking for query bonds target.final boolean
Returns whether exact matching of query atom information is set.final boolean
Retrieves if axial stereo is ignored during searching.final boolean
Retrieves if cumulene cis-trans stereo is ignored during searching.final boolean
Retrieves if double bond stereo is ignored during searching.final boolean
Retrieves if syn-anti stereo is ignored during searching.final boolean
Retrieves if tetrahedral stereo is ignored during searching.final boolean
Get options for rearranging query atoms for better search performance.final boolean
Get option whether search should consider consider COM, MIX and FOR sgroups during search.final boolean
Indicates whether the search is order sensitivefinal boolean
Get option whether phase shifted polymer matches on the original.final boolean
Get option whether to search consider polymer sgroups during search.final boolean
Get whether unpaired(orphan or widow) atom maps can match any atom.final boolean
Is search should throw exception upon timeout.final boolean
Gets whether undefined R atom matches group of atoms.final boolean
Get the valence matching optionfinal boolean
For debugging purposes only.protected static int
nonPositiveToInfinite
(int value) protected String
returnOptionString
(boolean value) void
setAttachedDataMatch
(int value) Sets whether attached data (in data sgroups) should be used when comparing structures.void
setAttachedDataPrefixes
(String value) Sets the prefixes of the names of those data sgroups that will be used during structure comparison.void
setBridgingRAllowed
(boolean value) Sets whether different undefined R-atoms can match the same group of atoms.void
setChargeMatching
(int value) Set charge matching behavior.void
setCheckSpHyb
(boolean checkSp) Sets whether the sp-hybridization state of the atoms should be considered.void
setChemTermsFilter
(String value) Sets the Chemical Terms filtering expression.void
setChemTermsFilterConfig
(File file) Sets the configuration file for Chemical Terms filter.void
setChemTermsFilterConfig
(String value) Sets the configuration string for Chemical Terms filter.void
setChemTermsFilterOption
(chemaxon.sss.search.options.ChemTermsFilterOption chemTermsFilterOption) FOR INTERNAL USE ONLY.void
setCompleteHG
(boolean completeStr) Deprecated, for removal: This API element is subject to removal in a future version.This option is no longer supported.void
setCopolymerMatching
(boolean value) Adjusts copolymer matching mode.final void
setDirty
(boolean v) Sets or clears the dirty flag.void
setDoubleBondStereoMatchingMode
(int value) Sets how double bond cis/trans stereo information should match during the search.void
setEndgroupMatching
(boolean value) Adjusts polymer end group matching.void
setExactBondMatching
(boolean value) Specifies whether bond types should match exactly - looking for query bonds target.void
setExactQueryAtomMatching
(boolean isExact) Sets whether exact query atom matching should be used or not.void
Sets the identifiers of those special atoms that should match exactly during structure comparison.void
setExhaustiveModeLimit
(int value) Upon reaching this number of steps, the search switches to exhaustive mode from fast mode.void
setHCountMatching
(int value) Sets the H count matching mode.void
setHitOrdering
(int value) Sets the hit ordering type.void
Adjusts for which query atoms broad translation on target homology groups is allowed.void
Adjusts for which query homology atoms narrow translation on target specific atoms is allowed.final void
setIgnoreAxialStereo
(boolean value) Sets ignoring axial stereo information during serching.final void
setIgnoreCumuleneOrRingCisTransStereo
(boolean value) Sets ignoring cumulene cis-trans stereo information during serching.final void
setIgnoreDoubleBondStereo
(boolean value) Sets ignoring double bond stereo information during serching.final void
setIgnoreSynAntiStereo
(boolean value) Sets ignoring syn-anti stereo information during serching.final void
setIgnoreTetrahedralStereo
(boolean value) Sets ignoring tetrahedral stereo information during serching.void
setImplicitHMatching
(int value) Set option for matching implicit and explicit hydrogens.void
setIsotopeMatching
(int value) Set the isotope matching mode.void
setKeepQueryOrder
(boolean value) Set option for rearranging query atoms to increase search performance.void
Set handling of Markush aromatization information (ambiguous aromatic rings) during Markush searchvoid
setMixSgroupMatching
(boolean value) Set options for mixed S-group matching.void
setMonomerTransform
(boolean value) Adjusts if monomers should be transformed to structural repeating units if the monomer is homolopolimerizable.void
Sets search options.void
setOptions
(String optionString) Sets search options.void
setOrderSensitiveSearch
(boolean value) Specifies whether the same set of target atoms found in a different order should be considered as a different hit.void
setPhaseShiftedMatching
(boolean value) Adjusts if the phase shifted polymer should match on the original.void
setPolymerMatching
(boolean value) Adjust polymer matching.void
setRadicalMatching
(int value) Set the radical matching mode.void
setReactionUnpairedMapMatching
(boolean value) Set option for matching unpaired(orphan or widow) atom maps to any atom.void
setRLigandEqualityCheck
(boolean value) Sets whether undefined R-atoms with the same R-group ID should match the same structure.void
Sets which type of set of smallest rings to use for property calculationsvoid
setStereoModel
(int value) Set stereo model option.final void
setStereoSearchType
(int value) Specifies the way stereo information is considered during searching.void
Sets the target homology matching mode option.void
setTautomerSearch
(int value) Sets if tautomers of the query should be enumerated for search.void
setThrowExceptionOnTimeout
(boolean value) Sets if search should throw exception upon timeout.void
setTimeoutLimitMilliseconds
(int value) The search on a single target timeouts reaching this amount of time.void
setUndefinedRAtom
(int value) Sets the matching behavior of an undefined R atom in the query.void
setUndefinedRAtomUserDefined
(boolean undefinedRAtomUserDefined) For internal use only!void
setVagueBondLevel
(int value) Option for less strict evaluation of query bonds (e.g.void
setValenceMatching
(boolean value) Set valence check option.void
setVerbose
(boolean verboseP) For debugging purposes only.toList()
Returns the text representation of this options object as a list of "optionname:optionvalue" strings.toString()
Returns a string that
- describes the state of the options
- can be the input of setOptions(String)
- doesn't contain options that have their default value (except dissimilarity threshold in case of similarity search)Returns a string that
- describes the state of the options
- can be the input of setOptions(String)
- doesn't contain options that have their default value (except dissimilarity threshold in case of similarity search)
-
Field Details
-
dirty
protected boolean dirtyThis flag is set to true whenever any of the options change. It can be used by Search objects to check whether options changed since the previous initialization. (They set the dirty flag to false during their own initialization.) -
verbose
public boolean verboseFor debugging purposes. Public, because it does not count for the dirty flag. -
DEFAULT_TIMEOUT_LIMIT
public static final int DEFAULT_TIMEOUT_LIMIT- See Also:
-
timeoutLimitMilliseconds
protected int timeoutLimitMillisecondsThe search on a single target timeouts reaching this number of milliseconds.
-
-
Constructor Details
-
SearchOptions
public SearchOptions(int searchType) Creates a SearchOptions object while setting different search options according to a predefined search type. For full explanation see JChem Query Guide.Acceptable values:
SearchConstants.SUBSTRUCTURE
(default);SearchConstants.FULL
;SearchConstants.FULL_FRAGMENT
;SearchConstants.DUPLICATE
;SearchConstants.SUPERSTRUCTURE
(no query features allowed);SearchConstants.SIMILARITY
;SearchConstants.NO_SCREEN
; andSearchConstants.NO_ABAS
.
- Parameters:
searchType
- the predefined search type
-
-
Method Details
-
isExactQueryAtomMatching
public final boolean isExactQueryAtomMatching()Returns whether exact matching of query atom information is set. If true, query information (e.g. atom list, any atom, number of hydrogens, aromaticity, etc.) in atoms will not be evaluated, but rather exact matching of these information is required. It is useful for searching in query databases.- Returns:
true
if query information (eg atom list, any atom, number of hydrogens, aromaticity, etc) in atoms will not be evaluated, but rather exact matching of these information is required. It is useful for searching in query databases.
Default value isfalse
.- Since:
- JChem 2.2
-
setExactQueryAtomMatching
public void setExactQueryAtomMatching(boolean isExact) Sets whether exact query atom matching should be used or not. SeeisExactQueryAtomMatching()
.- Parameters:
isExact
- If true, query information (eg atom list, any atom, number of hydrogens, aromaticity, etc) in atoms will not be evaluated, but rather exact matching of these information is required. It is useful for searching in query databases.
Default value isfalse
except in case of duplicate search.- Since:
- JChem 2.2
-
setDoubleBondStereoMatchingMode
public void setDoubleBondStereoMatchingMode(int value) Sets how double bond cis/trans stereo information should match during the search.- Parameters:
value
- The following options can be used:
Default value isStereoConstants.DBS_MARKED
StereoConstants.DBS_NONE
: No double bond cis/trans is considered.StereoConstants.DBS_MARKED
: (Default) Double bond cis/trans stereo is checked for double bonds designated by the stereo search flag only.StereoConstants.DBS_ALL
: All double bonds are checked for cis/trans stereo matching.
- Since:
- JChem 2.2
- See Also:
-
getDoubleBondStereoMatchingMode
public final int getDoubleBondStereoMatchingMode()Get the double bond stereo matching mode.- Returns:
- the matching mode relating to double bond stereo.
Default value ischemaxon.struc.StereoConstants.DBS_MARKED
- Since:
- JChem 2.2
- See Also:
-
getSearchType
public final int getSearchType()Returns the currently set global search operation mode.- Returns:
- the search type.
- Since:
- JChem 3.2
- See Also:
-
getHCountMatching
public final int getHCountMatching()Get the interpretation of H count in the query.- Returns:
- the H count matching mode. (Default is HCOUNT_MATCHING_AUTO.)
Default value isSearchConstants.HCOUNT_MATCHING_AUTO
. - See Also:
-
setHCountMatching
public void setHCountMatching(int value) Sets the H count matching mode.- Parameters:
value
- possible values:
Default value isSearchConstants.HCOUNT_MATCHING_AUTO
.- See Also:
-
isVerbose
public final boolean isVerbose()For debugging purposes only.- Returns:
true
if debug information is displayed during search.
Default value isfalse
.
-
setVerbose
public void setVerbose(boolean verboseP) For debugging purposes only.- Parameters:
verboseP
- if true more detailed information is sent to the output
Default value isfalse
.
-
getSearchType
Decodes the string representation of the search type and returns the predefined constant value defined inSearchConstants
.- Parameters:
searchTypeValue
- search type represented as string- Returns:
- the identifier for the given search type
-
setOptions
Sets search options.- Parameters:
optionString
- Can set multiple options. Option names and values (all case insensitive) are defined in JChem Query Guide: summary of search options. Name and value of an option should be separated by ":", and different pairs of names/values by spaces. Instead of spaces an alternative option separator string (even more than 1 character) can be specified at the beginning of optionString by the syntax "sep='separator string' ...". After 'separator string' there must be at least 1 space character!)
E.g.- setOptions("HCountMatching:E")
- setOptions(" hcountmatching:g keepqueryorder:y")
- setOptions("sep=*-* hcoUntmatchInG:A*-*KeEpQueryorder:False")
- See Also:
-
setOrderSensitiveSearch
public void setOrderSensitiveSearch(boolean value) Specifies whether the same set of target atoms found in a different order should be considered as a different hit.
For example the 3-atom query molecule fits 2 positions on the target:
Hit 1: [1;3;5]
Hit 2: [5;3;1]
IforderSensitiveSearch
istrue
, both cases are returned, otherwise only one of them (the one found first).- Parameters:
value
- set this totrue
to get results in every possible order
Default value isfalse
.
-
isOrderSensitiveSearch
public final boolean isOrderSensitiveSearch()Indicates whether the search is order sensitive- Returns:
true
if hits are returned in every possible order
Default value isfalse
.- See Also:
-
isExactBondMatching
public final boolean isExactBondMatching()Indicates whether bond types should match exactly - looking for query bonds target.- Returns:
- true if bond types must match exactly.
Default value depends on search type.
-
setExactBondMatching
public void setExactBondMatching(boolean value) Specifies whether bond types should match exactly - looking for query bonds target.- Parameters:
value
- if set totrue
, bond types must match exactly. For example "single or double" matches only "single or double", but matches neither "single" or "double".
Default value isfalse
except in case of duplicate search.
-
setVagueBondLevel
public void setVagueBondLevel(int value) Option for less strict evaluation of query bonds (e.g. ambiguous aromaticity).- Parameters:
value
- the desired vague bond level
Default value isSearchConstants.VAGUE_BOND_LEVEL_HALF
.- Since:
- JChem 5.0
- See Also:
-
getVagueBondLevel
public final int getVagueBondLevel()Getter for vague bond level.- Returns:
- the current vague bond level
Default value isSearchConstants.VAGUE_BOND_LEVEL_HALF
. - Since:
- JChem 5.0
- See Also:
-
setCompleteHG
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void setCompleteHG(boolean completeStr) Deprecated, for removal: This API element is subject to removal in a future version.This option is no longer supported. This method does not change anything.Sets if only complete structures should match on homology groups. If set to false than substructures which don't form an entire homology group can also match (e.g. carbon chain on a cycloalkyl).- Parameters:
completeStr
- if true only complete structures are accepted, if false all substructures.
Default value istrue
.
-
getCompleteHG
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public final boolean getCompleteHG()Deprecated, for removal: This API element is subject to removal in a future version.This option is no longer supported. This method always returns true.Retrieves the information if only complete structures are matching on target homology groups.- Returns:
- true if only complete structures are matching, false otherwise.
Default value istrue
.
-
hasChangesInUserComparators
public final boolean hasChangesInUserComparators()Used in initializing searches. Specifies whether changes occurred in the user defined comparators.- Returns:
true
if there is any changes in user-defined comparators. After initializing the search, the change flag is cleared.- See Also:
-
clearChangesInUserComparators
public final void clearChangesInUserComparators()Used in initializing searches. Clears the change flag of user-defined MolComparators. -
hasUserComparators
public final boolean hasUserComparators()Gets whether searcher has user defined comparators.- Returns:
- true, if there is any user-defined MolComparator
-
addUserComparator
Adds the given user-defined comparator to the search.- Parameters:
mc
- user-defined MolComparator- See Also:
-
deleteUserComparator
Deletes a given user defined comparator if found.- Parameters:
mc
- user defined comparator to delete.- See Also:
-
deleteAllUserComparators
public void deleteAllUserComparators()Deletes all comparator added by the user. -
getUserComparators
Returns the user defined comparators.- Returns:
- user-defined
MolComparator
s
-
isDirty
public final boolean isDirty()Returns the dirty flag. Dirty flag usage:- When the search object initializes itself using the actual query, target and options, it clears the dirty flag(sets to false).
- When the search options change, the dirty flag is set automatically.
- Next time a major operation is done with the search object, it checks the dirty flag of the options. If set, it re-initializes itself.
- Returns:
- true if the options are dirty
- See Also:
-
setDirty
public final void setDirty(boolean v) Sets or clears the dirty flag. See the description of isDirty() for its usage.- Parameters:
v
- new dirty value- See Also:
-
clone
Makes an identical copy of this SearchObject.- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
clonecopy
Copies all search options to other. Even the search type.- Parameters:
other
- search option to overwrite.
-
clonecopyOptions
Copies all search options except search type to other.- Parameters:
other
- search option object to overwrite
-
setTautomerSearch
public void setTautomerSearch(int value) Sets if tautomers of the query should be enumerated for search.- Parameters:
value
- the desired tautomer search behavior
Default value isSearchConstants.TAUTOMER_SEARCH_DEFAULT
.- Since:
- JChem 5.4
- See Also:
-
getTautomerSearch
public final int getTautomerSearch()Indicates if tautomers of the query should be enumerated for search.- Returns:
- the current tautomer search behavior
Default value isSearchConstants.TAUTOMER_SEARCH_DEFAULT
. - Since:
- JChem 5.4
- See Also:
-
setOption
Sets search options.- Parameters:
name
- Name (case insensitive) of search option (e.g. stereoSearch).value
- String form (case insensitive) of search parameter value (y, M, ef, ...).
In case of boolean parameters 'true' is acceptable instead of 'y' and 'false' instead of 'n'.The available options can be obtained by calling
getOptionNames()
.- See Also:
-
getOption
Returns option value in string format.- Parameters:
name
- Name (case insensitive) of search option (e.g. stereoSearch). For the list of available search options, seesetOption(String, String)
.- Returns:
- string value of the given option (true --> y, false --> n, except 'valence', 'polymer' and 'mix': true --> d, false --> i)
- See Also:
-
getBoolean
Returns value as a boolean flag.- Parameters:
value
- String representation of boolean flag.- Returns:
- true if value is null, "", "y", "Y"; false if "n" or "N".
- Throws:
IllegalArgumentException
- otherwise.
-
returnOptionString
-
isKeepQueryOrder
public final boolean isKeepQueryOrder()Get options for rearranging query atoms for better search performance.- Returns:
- false if search rearranges query atoms for better
search performance
Default value isfalse
.
-
setKeepQueryOrder
public void setKeepQueryOrder(boolean value) Set option for rearranging query atoms to increase search performance.- Parameters:
value
- false, if search should rearrange query atoms for better search performance
Default value isfalse
.
-
getIsotopeMatching
public final int getIsotopeMatching()Get option for matching isotopes- Returns:
- Isotope searching behavior.
Default isSearchConstants.ISOTOPE_MATCHING_DEFAULT
(isotope query matches only isotope target, nonisotope query matches all) - See Also:
-
setIsotopeMatching
public void setIsotopeMatching(int value) Set the isotope matching mode.- Parameters:
value
- Specifies the isotope searching behavior. Default isSearchConstants.ISOTOPE_MATCHING_DEFAULT
(isotope query matches only isotope target, non-isotope query matches all)
Default isSearchConstants.ISOTOPE_MATCHING_DEFAULT
(isotope query matches only isotope target, nonisotope query matches all) with the exception of duplicate search whereSearchConstants.ISOTOPE_MATCHING_EXACT
is the default.- See Also:
-
getChargeMatching
public final int getChargeMatching()Get the charge matching option value- Returns:
- Charge searching behavior.
Default isCHARGE_MATCHING_DEFAULT
(charged query matches only charged target, noncharged query matches all) - See Also:
-
setChargeMatching
public void setChargeMatching(int value) Set charge matching behavior.- Parameters:
value
- Specifies the charge searching behavior.
Default value isSearchConstants.CHARGE_MATCHING_DEFAULT
(charged query matches only charged target, noncharged query matches all) with the exception of duplicate search whereSearchConstants.CHARGE_MATCHING_EXACT
is the default.- See Also:
-
isValenceMatching
public final boolean isValenceMatching()Get the valence matching option- Returns:
true
if valence is checked during search.
Default value istrue
.- See Also:
-
setValenceMatching
public void setValenceMatching(boolean value) Set valence check option.- Parameters:
value
- true, if valence should be checked during search.
Default value istrue
.- See Also:
-
getRadicalMatching
public final int getRadicalMatching()Get option for radical matching behavior.- Returns:
- Radical searching behavior.
Default isSearchConstants.RADICAL_MATCHING_DEFAULT
(radical query matches only radical target, nonradical query matches all). - See Also:
-
setRadicalMatching
public void setRadicalMatching(int value) Set the radical matching mode.- Parameters:
value
- Specifies the radical searching behavior.
Default isSearchConstants.RADICAL_MATCHING_DEFAULT
(radical query matches only radical target, nonradical query matches all) with the exception of duplicate search whereSearchConstants.RADICAL_MATCHING_EXACT
is the default.- See Also:
-
isMixSgroupMatching
public final boolean isMixSgroupMatching()Get option whether search should consider consider COM, MIX and FOR sgroups during search.- Returns:
- true if considers COM, MIX and FOR sgroups during search
Default value istrue
. - See Also:
-
setMixSgroupMatching
public void setMixSgroupMatching(boolean value) Set options for mixed S-group matching.- Parameters:
value
- true, if COM, MIX and FOR sgroups should be considered during search.
Default value istrue
.- See Also:
-
isPolymerMatching
public final boolean isPolymerMatching()Get option whether to search consider polymer sgroups during search.- Returns:
- true if considers polymer sgroups during search
Default value istrue
. - See Also:
-
setPolymerMatching
public void setPolymerMatching(boolean value) Adjust polymer matching.- Parameters:
value
- true, if polymer sgroups should be considered during search.
Default value istrue
.- See Also:
-
isEndgroupMatching
public final boolean isEndgroupMatching()Get whether polymers end groups must match.- Returns:
true
if polymer end groups must match during search. In this case the star atom can't match on a specified engroup.
Default value istrue
.- See Also:
-
setEndgroupMatching
public void setEndgroupMatching(boolean value) Adjusts polymer end group matching.- Parameters:
value
- true, if polymer endgroups should be matched during search. In this case the star atom can't match on a specified engroup.
Default value istrue
.
-
areMonomersTransformed
public final boolean areMonomersTransformed()Obtain monomer transformation information.- Returns:
- true if monomers (source based representation of polymers)
are transformed to sru repeating units if they can be polimerizated.
Default value istrue
. - See Also:
-
setMonomerTransform
public void setMonomerTransform(boolean value) Adjusts if monomers should be transformed to structural repeating units if the monomer is homolopolimerizable.- Parameters:
value
- true if monomers should be transformed, false otherwise
Default value istrue
.- See Also:
-
isPhaseShiftedMatching
public final boolean isPhaseShiftedMatching()Get option whether phase shifted polymer matches on the original.- Returns:
- true if the phase-shifted polymers are matching.
Default value istrue
. - See Also:
-
setPhaseShiftedMatching
public void setPhaseShiftedMatching(boolean value) Adjusts if the phase shifted polymer should match on the original.- Parameters:
value
- true if the phase shifted should be matching false otherwise.
Default value istrue
.- See Also:
-
isCopolymerMatching
public final boolean isCopolymerMatching()Specifies whether matching mode is copolymer.- Returns:
- true if the copolymer matching mode is set.
Default value isfalse
. - See Also:
-
setCopolymerMatching
public void setCopolymerMatching(boolean value) Adjusts copolymer matching mode. If set, then target polymers in copolymers can only be matched by query polymers in copolymers.- Parameters:
value
- true if copolymer matching mode should be set, false otherwise. (default false)
Default value isfalse
- See Also:
-
getHomologyNarrowTranslation
Get query-side homology matching option, which homology atoms can match specific atoms.- Returns:
- see possible values at
HomologyTranslationOption
.
Default value isHomologyTranslationOption.ALL
. - See Also:
-
setHomologyNarrowTranslation
Adjusts for which query homology atoms narrow translation on target specific atoms is allowed. If it's allowed for a query homology atom, it may match target specific atoms. If an atom is not marked or all atoms are baned then it can only match the same homology group.- Parameters:
value
- For possible values see:HomologyTranslationOption
.
Default value isHomologyTranslationOption.ALL
.- See Also:
-
getHomologyBroadTranslation
Get target-side homology matching option. Which specific atoms can match on homology atoms.- Returns:
- see possible values at
HomologyTranslationOption
.
Default value isHomologyTranslationOption.NONE
. - See Also:
-
setHomologyBroadTranslation
Adjusts for which query atoms broad translation on target homology groups is allowed. If it's allowed for a specific query atom, it may match pseudo atoms with homology names on the target side. If an atom is not marked or all atoms are baned then it can match a homology group only if it's a pseudo atom of the same homology group.- Parameters:
value
- For possible values see:HomologyTranslationOption
.
Default value isHomologyTranslationOption.NONE
.- See Also:
-
setTargetHomologyMatchingMode
Sets the target homology matching mode option. Only used when homology broad translation is set.- Parameters:
mode
- homology matching mode. For possible values, see:TargetHomologyMatchingMode
.
Default value isTargetHomologyMatchingMode.ALL
.- See Also:
-
getTargetHomologyMatchingMode
Returns the target homology matching mode. Only used when homology broad translation is set.- Returns:
- homology matching mode. For possible return values, see:
TargetHomologyMatchingMode
.
Default value isTargetHomologyMatchingMode.ALL
. - See Also:
-
setSSRType
Sets which type of set of smallest rings to use for property calculations- Parameters:
value
- set of smallest rings options to use- See Also:
-
getSSRType
Gets the type of the set of smallest rings to useDefault value is
SetOfSmallestRingsOption.SSSR
- Returns:
- set of smallest rings option
- See Also:
-
getMarkushAromHandling
Gets the Markush aromatic search behavior.- Returns:
- behavior of Markush aromatic search.
- Since:
- 6.2
- See Also:
-
setMarkushAromHandling
Set handling of Markush aromatization information (ambiguous aromatic rings) during Markush search- Parameters:
value
- the desired Markush aromatic search option- Since:
- 6.2
- See Also:
-
getStereoModel
public final int getStereoModel()Get the stereo model option.- Returns:
- Used stereo model. Default is STEREO_MODEL_COMPREHENSIVE for substructure and supertructure searches and STEREO_MODEL_GLOBAL otherwise.
- See Also:
-
setStereoModel
public void setStereoModel(int value) Set stereo model option.- Parameters:
value
- Specifies the used stereo model. Default isSearchConstants.STEREO_MODEL_DEFAULT
, whose actual behavior depends on the search type and, in case of database search, the type of the structure table. For substructure and superstructure searches, it equals toSearchConstants.STEREO_MODEL_COMPREHENSIVE
, while for other searches, it usually equals toSearchConstants.STEREO_MODEL_GLOBAL
.- See Also:
-
setStereoSearchType
public final void setStereoSearchType(int value) Specifies the way stereo information is considered during searching. (setStereoModel(int)
specifies the model for calculating the stereo information.)- Parameters:
value
- Specifies the stereo mode.
Default value isSearchConstants.STEREO_SPECIFIC
with the exception of duplicate search whereSearchConstants.STEREO_EXACT
is the default.- See Also:
-
getStereoSearchType
public final int getStereoSearchType()Get the stereo search type option.- Returns:
- Specifies the stereo search type.
Default isSearchConstants.STEREO_SPECIFIC
. - See Also:
-
setIgnoreTetrahedralStereo
public final void setIgnoreTetrahedralStereo(boolean value) Sets ignoring tetrahedral stereo information during serching. If this option is set tetrahedral stereo information is ignored andsetStereoSearchType(int)
only specifies double bond stereo matching.- Parameters:
value
- the value to set, set true to ignore.
Default value isfalse
.
-
isIgnoreTetrahedralStereo
public final boolean isIgnoreTetrahedralStereo()Retrieves if tetrahedral stereo is ignored during searching.- Returns:
- true if ignored.
Default value isfalse
. - See Also:
-
setIgnoreDoubleBondStereo
public final void setIgnoreDoubleBondStereo(boolean value) Sets ignoring double bond stereo information during serching. If this option is set double bond stereo information is ignored andsetStereoSearchType(int)
only specifies tetrahedral stereo matching.- Parameters:
value
- the value to set, set true to ignore.
Default value isfalse
.
-
isIgnoreDoubleBondStereo
public final boolean isIgnoreDoubleBondStereo()Retrieves if double bond stereo is ignored during searching.- Returns:
- true if ignored.
Default value isfalse
. - See Also:
-
setIgnoreCumuleneOrRingCisTransStereo
public final void setIgnoreCumuleneOrRingCisTransStereo(boolean value) Sets ignoring cumulene cis-trans stereo information during serching.- Parameters:
value
- the value to set, set true to ignore.
Default value istrue
.
-
isIgnoreCumuleneOrRingCisTransStereo
public final boolean isIgnoreCumuleneOrRingCisTransStereo()Retrieves if cumulene cis-trans stereo is ignored during searching.- Returns:
- true if ignored.
Default value istrue
. - See Also:
-
setIgnoreAxialStereo
public final void setIgnoreAxialStereo(boolean value) Sets ignoring axial stereo information during serching.- Parameters:
value
- the value to set, set true to ignore.
Default value istrue
.
-
isIgnoreAxialStereo
public final boolean isIgnoreAxialStereo()Retrieves if axial stereo is ignored during searching.- Returns:
- true if ignored.
Default value istrue
. - See Also:
-
setIgnoreSynAntiStereo
public final void setIgnoreSynAntiStereo(boolean value) Sets ignoring syn-anti stereo information during serching.- Parameters:
value
- the value to set, set true to ignore.
Default value istrue
.
-
isIgnoreSynAntiStereo
public final boolean isIgnoreSynAntiStereo()Retrieves if syn-anti stereo is ignored during searching.- Returns:
- true if ignored.
Default value istrue
. - See Also:
-
getCheckSpHyb
public final boolean getCheckSpHyb()Get the sp-hybridization state option- Returns:
true
if sp-hybridization state of the atoms is considered,
Default value isfalse
.- See Also:
-
setCheckSpHyb
public void setCheckSpHyb(boolean checkSp) Sets whether the sp-hybridization state of the atoms should be considered.- Parameters:
checkSp
- If true the sp-hybridization state is checked.
Default value isfalse
.- Since:
- 5.1
- See Also:
-
getImplicitHMatching
public final int getImplicitHMatching()Get option for matching implicit and explicit hydrogens- Returns:
- Matching behavior between explicit and implicit hydrogens.
Default isSearchConstants.IMPLICIT_H_MATCHING_DEFAULT
(matching depends on the circumstances of search) - See Also:
-
setImplicitHMatching
public void setImplicitHMatching(int value) Set option for matching implicit and explicit hydrogens.- Parameters:
value
- Specifies matching bahaviour between explicit and implicit hydrogens.
Default isSearchConstants.IMPLICIT_H_MATCHING_DEFAULT
(matching depends on the circumstances of search)- See Also:
-
isReactionUnpairedMapMatching
public final boolean isReactionUnpairedMapMatching()Get whether unpaired(orphan or widow) atom maps can match any atom.- Returns:
- true if in reaction search unpaired (orphan and widow)
atom maps can match any atom map.
Default value istrue
. - See Also:
-
setReactionUnpairedMapMatching
public void setReactionUnpairedMapMatching(boolean value) Set option for matching unpaired(orphan or widow) atom maps to any atom.- Parameters:
value
- true, if in reaction search unpaired (orphan and widow) atom maps can match any atom map.
Default value istrue
.- See Also:
-
setChemTermsFilter
Sets the Chemical Terms filtering expression.- Parameters:
value
- the chemical terms filter expression
Default value isnull
.- See Also:
-
getChemTermsFilter
Gets the Chemical Terms filtering expression- Returns:
- chemical filter expression
Default value isnull
. - See Also:
-
setChemTermsFilterConfig
Sets the configuration file for Chemical Terms filter.- Parameters:
file
- the configuration file. Set tonull
for default configuration.
Default value isnull
.- Throws:
IOException
- if the supplied file can't be read with the default charset.- Since:
- JChem 6.0
- See Also:
-
setChemTermsFilterConfig
Sets the configuration string for Chemical Terms filter.- Parameters:
value
- the configuration string. Set tonull
for default configuration.
Default value isnull
.- See Also:
-
getChemTermsFilterConfig
Gets the configuration string for Chemical Terms filter.- Returns:
- the configuration string
Default value isnull
. - See Also:
-
setUndefinedRAtom
public void setUndefinedRAtom(int value) Sets the matching behavior of an undefined R atom in the query.
Possible values for search:
SearchConstants.UNDEF_R_MATCHING_ALL
SearchConstants.UNDEF_R_MATCHING_UNDEF_R
SearchConstants.UNDEF_R_MATCHING_GROUP
(default)SearchConstants.UNDEF_R_MATCHING_GROUP_H
SearchConstants.UNDEF_R_MATCHING_GROUP_H_EMPTY
Possible values for RGroupDecomposition:
SearchConstants.UNDEF_R_MATCHING_GROUP
SearchConstants.UNDEF_R_MATCHING_GROUP_H
(default for queries with explicit undefined R-atom)SearchConstants.UNDEF_R_MATCHING_GROUP_H_EMPTY
(default for queries without explicit undefined R-atom)
- Parameters:
value
- Matching mode value.- See Also:
-
setUndefinedRAtomUserDefined
public void setUndefinedRAtomUserDefined(boolean undefinedRAtomUserDefined) For internal use only!- Parameters:
undefinedRAtomUserDefined
- the new value.
-
getUndefinedRAtom
public final int getUndefinedRAtom()Returns undefined R atom matching behavior mode.- Returns:
- Matching mode value.
Default isSearchConstants.UNDEF_R_MATCHING_GROUP
. - See Also:
-
isUndefinedRAtomMatchingGroup
public final boolean isUndefinedRAtomMatchingGroup()Gets whether undefined R atom matches group of atoms. This is the case whengetUndefinedRAtom()
is- Returns:
true
if undefined R atom matches group- Since:
- JChem 5.3
- See Also:
-
setBridgingRAllowed
public void setBridgingRAllowed(boolean value) Sets whether different undefined R-atoms can match the same group of atoms. This parameter is only used if R-atom matching behavior (setUndefinedRAtom(int)
) is set to group matching:SearchConstants.UNDEF_R_MATCHING_GROUP
orSearchConstants.UNDEF_R_MATCHING_GROUP_H
orSearchConstants.UNDEF_R_MATCHING_GROUP_H_EMPTY
.- Parameters:
value
-true
if different undefined R-atoms can match the same group of atoms
Default value isfalse
.- Since:
- JChem 5.3
- See Also:
-
isBridgingRAllowed
public final boolean isBridgingRAllowed()Returnstrue
if different undefined R-atoms can match the same group of atoms. This parameter is only used if R-atom matching behavior (setUndefinedRAtom(int)
) is set to group matching:SearchConstants.UNDEF_R_MATCHING_GROUP
orSearchConstants.UNDEF_R_MATCHING_GROUP_H
orSearchConstants.UNDEF_R_MATCHING_GROUP_H_EMPTY
.- Returns:
true
if different undefined R-atoms can match the same group of atoms
Default value isfalse
.- Since:
- JChem 5.3
- See Also:
-
setRLigandEqualityCheck
public void setRLigandEqualityCheck(boolean value) Sets whether undefined R-atoms with the same R-group ID should match the same structure. This parameter is only used if R-atom matching behavior (setUndefinedRAtom(int)
) is set to group matching:SearchConstants.UNDEF_R_MATCHING_GROUP
orSearchConstants.UNDEF_R_MATCHING_GROUP_H
orSearchConstants.UNDEF_R_MATCHING_GROUP_H_EMPTY
.- Parameters:
value
-true
if undefined R-atoms with the same R-group ID should match the same structure
Default value istrue
.- Since:
- JChem 5.3
- See Also:
-
getRLigandEqualityCheck
public final boolean getRLigandEqualityCheck()Returnstrue
if undefined R-atoms with the same R-group ID should match the same structure. This parameter is only used if R-atom matching behavior (setUndefinedRAtom(int)
) is set to group matching:SearchConstants.UNDEF_R_MATCHING_GROUP
orSearchConstants.UNDEF_R_MATCHING_GROUP_H
orSearchConstants.UNDEF_R_MATCHING_GROUP_H_EMPTY
.- Returns:
true
if undefined R-atoms with the same R-group ID should match the same structure
Default value istrue
.- Since:
- JChem 5.3
- See Also:
-
setHitOrdering
public void setHitOrdering(int value) Sets the hit ordering type.- Parameters:
value
- hit ordering type value.
Default value isSearchConstants.HIT_ORDERING_NONE
.- Since:
- JChem 5.4
- See Also:
-
getHitOrdering
public int getHitOrdering()Returns the hit ordering type.- Returns:
- the hit ordering type.
Default value isSearchConstants.HIT_ORDERING_NONE
. - Since:
- JChem 5.4
- See Also:
-
setAttachedDataMatch
public void setAttachedDataMatch(int value) Sets whether attached data (in data sgroups) should be used when comparing structures.- Parameters:
value
- attach data match type
Default value isSearchConstants.ATTACHED_DATA_MATCH_IGNORE
(no attached data used)- See Also:
-
getAttachedDataMatch
public final int getAttachedDataMatch()Returns whether attached data (in data sgroups) should be used when comparing structures.- Returns:
- value of attached data match type
Default value isSearchConstants.ATTACHED_DATA_MATCH_IGNORE
(no attached data used) - See Also:
-
setAttachedDataPrefixes
Sets the prefixes of the names of those data sgroups that will be used during structure comparison. The value is used only when attached data is not ignored
Prefixes are case insensitive.- Parameters:
value
- comma separated list of name prefixes, e.g. "weight,atomcount"
Default value isnull
(all data sgroups will be checked).- See Also:
-
getAttachedDataPrefixes
Returns the prefixes of the names of those data sgroups that will be used during structure comparison ornull
if all data sgroups should be checked.- Returns:
- comma separated list of name prefixes or
null
Default value isnull
(all data sgroups will be checked). - See Also:
-
setExactSpecialAtomMatching
Sets the identifiers of those special atoms that should match exactly during structure comparison.
Identifiers are case insensitive.
Available identifiers are generic query atoms (A, AH, Q, ...) (see this page ) and pseudo atom aliases (see this page ).- Parameters:
value
- comma separated list of identifiers
Default value is""
(all data sgroups will be checked). e.g. "A,G18,*,Resin"
-
getExactSpecialAtomMatching
Get the identifiers of those special atoms that should match exactly during structure comparison.- Returns:
- comma separated list of identifiers
Default value is""
(all data sgroups will be checked). e.g. "A,G18,*,Resin" - See Also:
-
getExhaustiveModeLimit
public final int getExhaustiveModeLimit()Upon reaching this number of steps, the search switches to exhaustive mode from fast mode.- Returns:
- The limit value.
Default value is-1
. - See Also:
-
setExhaustiveModeLimit
public void setExhaustiveModeLimit(int value) Upon reaching this number of steps, the search switches to exhaustive mode from fast mode.- Parameters:
value
- Set it to -1 if you do not want to switch to exhaustive mode. Set it to 0 if you want to use exhaustive mode only.
Default value is-1
.- See Also:
-
getTimeoutLimitMilliseconds
public int getTimeoutLimitMilliseconds()The search on a single target timeouts reaching this amount of time.- Returns:
- The timeout limit in milliseconds.
Default value is 120000 . - See Also:
-
setTimeoutLimitMilliseconds
public void setTimeoutLimitMilliseconds(int value) The search on a single target timeouts reaching this amount of time. Set it to a negative value if you do not want the search to time out.- Parameters:
value
- The time limit to set in milliseconds. Negative values are treated asInteger.MAX_VALUE
.
Default value is 120000.- See Also:
-
nonPositiveToInfinite
protected static int nonPositiveToInfinite(int value) -
isThrowExceptionOnTimeout
public final boolean isThrowExceptionOnTimeout()Is search should throw exception upon timeout.- Returns:
- true if it throws exception.
Default value isfalse
. - See Also:
-
setThrowExceptionOnTimeout
public void setThrowExceptionOnTimeout(boolean value) Sets if search should throw exception upon timeout. If set to false, search returns as if there were no hits.- Parameters:
value
- true if exception should be thrown.
Default value isfalse
.- See Also:
-
getChemTermsFilterOption
FOR INTERNAL USE ONLY. Returns the chem term filtering options.- Returns:
- the chemTermOption
-
setChemTermsFilterOption
@Beta public void setChemTermsFilterOption(chemaxon.sss.search.options.ChemTermsFilterOption chemTermsFilterOption) FOR INTERNAL USE ONLY. Sets the chem term filtering options- Parameters:
chemTermsFilterOption
- the chemTermOption to set- Throws:
NullPointerException
- in casechemTermsFilterOption
is null
-
toString
Returns a string that
- describes the state of the options
- can be the input of setOptions(String)
- doesn't contain options that have their default value (except dissimilarity threshold in case of similarity search) -
toString
Returns a string that
- describes the state of the options
- can be the input of setOptions(String)
- doesn't contain options that have their default value (except dissimilarity threshold in case of similarity search)- Parameters:
sep
- the separator string between options- Returns:
- a string in format "optionname1:optionvalue1 optionname2:optionvalue2 ..."
- Since:
- JChem 5.3
- See Also:
-
getAllOptionsAsString
Returns a string that
- describes the state of the options
- can be the input of setOptions(String)
- contains all options, including those which have their default value (except dissimilarity threshold in case of similarity search)- Returns:
- a string in format "optionname1:optionvalue1 optionname2:optionvalue2 ..."
- Since:
- JChem 5.3
- See Also:
-
getAllOptionsAsString
Returns a string that
- describes the state of the options
- can be the input of setOptions(String)
- contains all options, including those which have their default value (except dissimilarity threshold in case of similarity search)- Parameters:
sep
- is the separator- Returns:
- a string in format "sep=$$ optionname1:optionvalue1$$optionname2:optionvalue2$$...", where $$ is the separator
- Since:
- JChem 5.3
- See Also:
-
toList
Returns the text representation of this options object as a list of "optionname:optionvalue" strings. Only those options are listed that have non-default values.- Returns:
- a list containing the non-default options as "optionname:optionvalue" pairs
-
getOptionNames
Returns the name of all available options which can be used to set/get option values withsetOption(String, String)
andgetOption(String)
methods.- Returns:
- Collection of available option names
-