Package chemaxon.sss.search
Class SearchOptions
- java.lang.Object
-
- chemaxon.sss.search.SearchOptions
-
- All Implemented Interfaces:
SearchConstants
,Serializable
,Cloneable
- Direct Known Subclasses:
MolSearchOptions
@PublicAPI public class SearchOptions extends Object implements SearchConstants, Cloneable, Serializable
Class to encapsulate common search parameters.- Since:
- 5.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_TIMEOUT_LIMIT
protected boolean
dirty
This flag is set to true whenever any of the options change.protected int
timeoutLimitMilliseconds
The search on a single target timeouts reaching this number of milliseconds.boolean
verbose
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
Constructors Constructor Description SearchOptions(int searchType)
Creates a SearchOptions object while setting different search options according to a predefined search type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addUserComparator(MolComparator mc)
Adds the given user-defined comparator to the search.boolean
areMonomersTransformed()
Obtain monomer transformation information.void
clearChangesInUserComparators()
Used in initializing searches.Object
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
deleteAllUserComparators()
Deletes all comparator added by the user.void
deleteUserComparator(MolComparator mc)
Deletes a given user defined comparator if found.String
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)String
getAllOptionsAsString(String sep)
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)int
getAttachedDataMatch()
Returns whether attached data (in data sgroups) should be used when comparing structures.String
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.protected static boolean
getBoolean(String value)
Returns value as a boolean flag.int
getChargeMatching()
Get the charge matching option valueboolean
getCheckSpHyb()
Get the sp-hybridization state optionString
getChemTermsFilter()
Gets the Chemical Terms filtering expressionString
getChemTermsFilterConfig()
Gets the configuration string for Chemical Terms filter.chemaxon.sss.search.options.ChemTermsFilterOption
getChemTermsFilterOption()
FOR INTERNAL USE ONLY Returns the chem term filtering options.boolean
getCompleteHG()
Retrieves the information if only complete structures are matching on target homology groups.int
getDoubleBondStereoMatchingMode()
Get the double bond stereo matching mode.String
getExactSpecialAtomMatching()
Get the identifiers of those special atoms that should match exactly during structure comparison.int
getExhaustiveModeLimit()
Upon reaching this number of steps, the search switches to exhaustive mode from fast mode.int
getHCountMatching()
Get the interpretation of H count in the query.int
getHitOrdering()
Returns the hit ordering type.HomologyTranslationOption
getHomologyBroadTranslation()
Get target-side homology matching option.HomologyTranslationOption
getHomologyNarrowTranslation()
Get query-side homology matching option, which homology atoms can match specific atoms.int
getImplicitHMatching()
Get option for matching implicit and explicit hydrogensint
getIsotopeMatching()
Get option for matching isotopesMarkushAromaticityHandlingOption
getMarkushAromHandling()
Gets the Markush aromatic search behavior.String
getOption(String name)
Returns option value in string format.Collection<String>
getOptionNames()
Returns the name of all available options which can be used to set/get option values withsetOption(String, String)
andgetOption(String)
methods.int
getRadicalMatching()
Get option for radical matching behaviour.boolean
getRLigandEqualityCheck()
Returnstrue
if undefined R-atoms with the same R-group ID should match the same structure.int
getSearchType()
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
.SetOfSmallestRingsOption
getSSRType()
Gets the type of the set of smallest rings to useint
getStereoModel()
Get the stereo model option.int
getStereoSearchType()
Get the stereo search type option.TargetHomologyMatchingMode
getTargetHomologyMatchingMode()
Returns the target homology matching mode.int
getTautomerSearch()
Indicates if tautomers of the query should be enumerated for search.int
getTimeoutLimitMilliseconds()
The search on a single target timeouts reaching this amount of time.int
getUndefinedRAtom()
Returns undefined R atom matching behaviour mode.MolComparator[]
getUserComparators()
Returns the user defined comparators.int
getVagueBondLevel()
Getter for vague bond level.boolean
hasChangesInUserComparators()
Used in initializing searches.boolean
hasUserComparators()
Gets whether searcher has user defined comparators.boolean
isBridgingRAllowed()
Returnstrue
if different undefined R-atoms can match the same group of atoms.boolean
isCopolymerMatching()
Specifies whether matching mode is copolymer.boolean
isDirty()
Returns the dirty flag.boolean
isEndgroupMatching()
Get whether polymers end groups must match.boolean
isExactBondMatching()
Indicates whether bond types should match exactly - looking for query bonds target.boolean
isExactQueryAtomMatching()
Returns whether exact matching of query atom information is set.boolean
isIgnoreAxialStereo()
Retrieves if axial stereo is ignored during searching.boolean
isIgnoreCumuleneOrRingCisTransStereo()
Retrieves if cumulene cis-trans stereo is ignored during searching.boolean
isIgnoreDoubleBondStereo()
Retrieves if double bond stereo is ignored during searching.boolean
isIgnoreSynAntiStereo()
Retrieves if syn-anti stereo is ignored during searching.boolean
isIgnoreTetrahedralStereo()
Retrieves if tetrahedral stereo is ignored during searching.boolean
isKeepQueryOrder()
Get options for rearranging query atoms for better search performance.boolean
isMixSgroupMatching()
Get option whether search should consider consider COM, MIX and FOR sgroups during search.boolean
isOrderSensitiveSearch()
Indicates whether the search is order sensitiveboolean
isPhaseShiftedMatching()
Get option whether phase shifted polymer matches on the original.boolean
isPolymerMatching()
Get option whether to search consider polymer sgroups during search.boolean
isReactionUnpairedMapMatching()
Get whether unpaired(orphan or widow) atom maps can match any atom.boolean
isThrowExceptionOnTimeout()
It search should throw exception upon timeout.boolean
isUndefinedRAtomMatchingGroup()
Gets whether undefined R atom matches group of atoms.boolean
isValenceMatching()
Get the valence matching optionboolean
isVerbose()
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 behaviour.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)
Sets if only complete structures should match on homology groups.void
setCopolymerMatching(boolean value)
Adjusts copolymer matching mode.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
setExactSpecialAtomMatching(String value)
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
setHomologyBroadTranslation(HomologyTranslationOption value)
Adjusts for which query atoms broad translation on target homology groups is allowed.void
setHomologyNarrowTranslation(HomologyTranslationOption value)
Adjusts for which query homology atoms narrow translation on target specific atoms is allowed.void
setIgnoreAxialStereo(boolean value)
Sets ignoring axial stereo information during serching.void
setIgnoreCumuleneOrRingCisTransStereo(boolean value)
Sets ignoring cumulene cis-trans stereo information during serching.void
setIgnoreDoubleBondStereo(boolean value)
Sets ignoring double bond stereo information during serching.void
setIgnoreSynAntiStereo(boolean value)
Sets ignoring syn-anti stereo information during serching.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
setMarkushAromHandling(MarkushAromaticityHandlingOption value)
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
setOption(String name, String value)
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
setSSRType(SetOfSmallestRingsOption value)
Sets which type of set of smallest rings to use for property calculationsvoid
setStereoModel(int value)
Set stereo model option.void
setStereoSearchType(int value)
Specifies the way stereo information is considered during searching.void
setTargetHomologyMatchingMode(TargetHomologyMatchingMode mode)
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 behaviour 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.ArrayList<String>
toList()
String
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)String
toString(String sep)
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 Detail
-
dirty
protected boolean dirty
This 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 verbose
For debugging purposes. Public, because it does not count for the dirty flag.
-
DEFAULT_TIMEOUT_LIMIT
public static final int DEFAULT_TIMEOUT_LIMIT
- See Also:
- Constant Field Values
-
timeoutLimitMilliseconds
protected int timeoutLimitMilliseconds
The search on a single target timeouts reaching this number of milliseconds.
-
-
Constructor Detail
-
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 Detail
-
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()
, Stereochemistry documentation
-
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:
setDoubleBondStereoMatchingMode(int)
,StereoConstants.DBS_ALL
,StereoConstants.DBS_MARKED
,StereoConstants.DBS_NONE
, Stereochemistry documentation
-
getSearchType
public final int getSearchType()
Returns the currently set global search operation mode.- Returns:
- the search type.
- Since:
- JChem 3.2
- See Also:
SearchOptions(int)
,SearchConstants.SUBSTRUCTURE
,SearchConstants.SUPERSTRUCTURE
,SearchConstants.FULL
,SearchConstants.FULL_FRAGMENT
,SearchConstants.DUPLICATE
,SearchConstants.SIMILARITY
-
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(int)
,SearchConstants.HCOUNT_MATCHING_AUTO
,SearchConstants.HCOUNT_MATCHING_EQUAL
,SearchConstants.HCOUNT_MATCHING_GREATER_OR_EQUAL
-
setHCountMatching
public void setHCountMatching(int value)
Sets the H count matching mode.- Parameters:
value
- possible values:
Default value isSearchConstants.HCOUNT_MATCHING_AUTO
.- See Also:
SearchConstants.HCOUNT_MATCHING_AUTO
,SearchConstants.HCOUNT_MATCHING_EQUAL
,SearchConstants.HCOUNT_MATCHING_GREATER_OR_EQUAL
-
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
public static int getSearchType(String searchTypeValue)
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
public void setOptions(String optionString)
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:
setOption(String,String)
-
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:
setOrderSensitiveSearch(boolean)
-
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:
SearchConstants.VAGUE_BOND_OFF
,SearchConstants.VAGUE_BOND_LEVEL_HALF
,SearchConstants.VAGUE_BOND_LEVEL1
,SearchConstants.VAGUE_BOND_LEVEL2
,SearchConstants.VAGUE_BOND_LEVEL3
,SearchConstants.VAGUE_BOND_LEVEL4
,getVagueBondLevel()
, Vague bond level documenation
-
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:
SearchConstants.VAGUE_BOND_LEVEL_HALF
,SearchConstants.VAGUE_BOND_LEVEL1
,SearchConstants.VAGUE_BOND_LEVEL2
,SearchConstants.VAGUE_BOND_LEVEL3
,SearchConstants.VAGUE_BOND_LEVEL4
,setVagueBondLevel(int)
, Vague bond level documenation
-
setCompleteHG
public void setCompleteHG(boolean completeStr)
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
.- See Also:
getCompleteHG()
-
getCompleteHG
public final boolean getCompleteHG()
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
. - See Also:
setCompleteHG(boolean)
-
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:
getUserComparators()
,addUserComparator(MolComparator)
,deleteUserComparator(MolComparator)
,deleteAllUserComparators()
,MolComparator
-
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
public void addUserComparator(MolComparator mc)
Adds the given user-defined comparator to the search.- Parameters:
mc
- user-defined MolComparator- See Also:
MolComparator
,getUserComparators()
,deleteAllUserComparators()
-
deleteUserComparator
public void deleteUserComparator(MolComparator mc)
Deletes a given user defined comparator if found.- Parameters:
mc
- user defined comparator to delete.- See Also:
MolComparator
,deleteAllUserComparators()
,addUserComparator(MolComparator)
-
deleteAllUserComparators
public void deleteAllUserComparators()
Deletes all comparator added by the user.
-
getUserComparators
public MolComparator[] 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(boolean)
-
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:
isDirty()
-
clone
public Object clone() throws CloneNotSupportedException
Makes an identical copy of this SearchObject.- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
clonecopy
public void clonecopy(SearchOptions other)
Copies all search options to other. Even the search type.- Parameters:
other
- search option to overwrite.
-
clonecopyOptions
public void clonecopyOptions(SearchOptions other)
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:
SearchConstants.TAUTOMER_SEARCH_DEFAULT
,SearchConstants.TAUTOMER_SEARCH_OFF
,SearchConstants.TAUTOMER_SEARCH_ON
,SearchConstants.TAUTOMER_SEARCH_ON_IGNORE_TAUTOMERSTEREO
,getTautomerSearch()
, Tautomer search documenation
-
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:
SearchConstants.TAUTOMER_SEARCH_DEFAULT
,SearchConstants.TAUTOMER_SEARCH_OFF
,SearchConstants.TAUTOMER_SEARCH_ON
,setTautomerSearch(int)
, Tautomer search documenation
-
setOption
public void setOption(String name, String value)
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 callinggetOptionNames()
.- See Also:
getOption(String)
-
getOption
public String getOption(String name)
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:
setOption(String, String)
-
getBoolean
protected static boolean getBoolean(String value)
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
protected String returnOptionString(boolean value)
-
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 behaviour.
Default isSearchConstants.ISOTOPE_MATCHING_DEFAULT
(isotope query matches only isotope target, nonisotope query matches all) - See Also:
setIsotopeMatching(int)
,SearchConstants.ISOTOPE_MATCHING_DEFAULT
,SearchConstants.ISOTOPE_MATCHING_EXACT
,SearchConstants.ISOTOPE_MATCHING_IGNORE
, Query features documentation
-
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:
SearchConstants.ISOTOPE_MATCHING_DEFAULT
,SearchConstants.ISOTOPE_MATCHING_EXACT
,SearchConstants.ISOTOPE_MATCHING_IGNORE
,getIsotopeMatching()
, Query features documentation
-
getChargeMatching
public final int getChargeMatching()
Get the charge matching option value- Returns:
- Charge searching behaviour.
Default isCHARGE_MATCHING_DEFAULT
(charged query matches only charged target, noncharged query matches all) - See Also:
setChargeMatching(int)
,SearchConstants.CHARGE_MATCHING_DEFAULT
,SearchConstants.CHARGE_MATCHING_EXACT
,SearchConstants.CHARGE_MATCHING_IGNORE
, Query features documentation
-
setChargeMatching
public void setChargeMatching(int value)
Set charge matching behaviour.- Parameters:
value
- Specifies the charge searching behaviour.
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:
SearchConstants.CHARGE_MATCHING_DEFAULT
,SearchConstants.CHARGE_MATCHING_EXACT
,SearchConstants.CHARGE_MATCHING_IGNORE
, Query features documentation
-
isValenceMatching
public final boolean isValenceMatching()
Get the valence matching option- Returns:
true
if valence is checked during search.
Default value istrue
.- See Also:
setValenceMatching(boolean)
-
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:
isValenceMatching()
-
getRadicalMatching
public final int getRadicalMatching()
Get option for radical matching behaviour.- Returns:
- Radical searching behaviour.
Default isSearchConstants.RADICAL_MATCHING_DEFAULT
(radical query matches only radical target, nonradical query matches all). - See Also:
setRadicalMatching(int)
,SearchConstants.RADICAL_MATCHING_DEFAULT
,SearchConstants.RADICAL_MATCHING_EXACT
,SearchConstants.RADICAL_MATCHING_IGNORE
, Query features documentation
-
setRadicalMatching
public void setRadicalMatching(int value)
Set the radical matching mode.- Parameters:
value
- Specifies the radical searching behaviour.
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:
SearchConstants.RADICAL_MATCHING_DEFAULT
,SearchConstants.RADICAL_MATCHING_EXACT
,SearchConstants.RADICAL_MATCHING_IGNORE
,getRadicalMatching()
, Query features documentation
-
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(boolean)
-
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:
isMixSgroupMatching()
-
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(boolean)
-
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:
isPolymerMatching()
, Polymer search documentation
-
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:
setPolymerMatching(boolean)
, Polymer search documentation
-
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(boolean)
, Polymer search documentation
-
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:
areMonomersTransformed()
, Polymer search documentation
-
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(boolean)
-
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:
isPhaseShiftedMatching()
-
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(boolean)
, Polymer search documentation
-
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:
isCopolymerMatching()
, Polymer search documentation
-
getHomologyNarrowTranslation
public final HomologyTranslationOption getHomologyNarrowTranslation()
Get query-side homology matching option, which homology atoms can match specific atoms.- Returns:
- see possible values at
HomologyTranslationOption
.
Default value isHomologyTranslationOption.MARKED
. - See Also:
setHomologyNarrowTranslation(HomologyTranslationOption)
-
setHomologyNarrowTranslation
public void setHomologyNarrowTranslation(HomologyTranslationOption value)
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.MARKED
- See Also:
getHomologyNarrowTranslation()
, Query features documentation
-
getHomologyBroadTranslation
public final HomologyTranslationOption getHomologyBroadTranslation()
Get target-side homology matching option. Which specific atoms can match on homology atoms.- Returns:
- see possible values at
HomologyTranslationOption
.
Default value isHomologyTranslationOption.MARKED
. - See Also:
setHomologyBroadTranslation(HomologyTranslationOption)
-
setHomologyBroadTranslation
public void setHomologyBroadTranslation(HomologyTranslationOption value)
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.MARKED
- See Also:
getHomologyBroadTranslation()
-
setTargetHomologyMatchingMode
public void setTargetHomologyMatchingMode(TargetHomologyMatchingMode mode)
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()
-
getTargetHomologyMatchingMode
public TargetHomologyMatchingMode 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:
setTargetHomologyMatchingMode(TargetHomologyMatchingMode)
-
setSSRType
public void setSSRType(SetOfSmallestRingsOption value)
Sets which type of set of smallest rings to use for property calculations- Parameters:
value
- set of smallest rings options to use- See Also:
SetOfSmallestRingsOption
,getSSRType()
-
getSSRType
public SetOfSmallestRingsOption getSSRType()
Gets the type of the set of smallest rings to useDefault value is
SetOfSmallestRingsOption.SSSR
- Returns:
- set of smallest rings option
- See Also:
SetOfSmallestRingsOption
,setSSRType(SetOfSmallestRingsOption)
-
getMarkushAromHandling
@Beta public MarkushAromaticityHandlingOption getMarkushAromHandling()
Gets the Markush aromatic search behavior.- Returns:
- behaviour of Markush aromatic search.
- Since:
- 6.2
- See Also:
MarkushAromaticityHandlingOption
,setMarkushAromHandling(MarkushAromaticityHandlingOption)
-
setMarkushAromHandling
@Beta public void setMarkushAromHandling(MarkushAromaticityHandlingOption value)
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:
MarkushAromaticityHandlingOption
,getMarkushAromHandling()
-
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:
SearchConstants.STEREO_MODEL_LOCAL
,SearchConstants.STEREO_MODEL_COMPREHENSIVE
,SearchConstants.STEREO_MODEL_GLOBAL
,SearchConstants.STEREO_MODEL_DEFAULT
, Stereo Model documentation
-
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:
SearchConstants.STEREO_MODEL_LOCAL
,SearchConstants.STEREO_MODEL_COMPREHENSIVE
,SearchConstants.STEREO_MODEL_GLOBAL
,SearchConstants.STEREO_MODEL_DEFAULT
,getStereoModel()
, Stereo Model documentation
-
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:
SearchConstants.STEREO_SPECIFIC
,SearchConstants.STEREO_IGNORE
,SearchConstants.STEREO_EXACT
,SearchConstants.STEREO_DIASTEREOMER
,SearchConstants.STEREO_ENANTIOMER
,getStereoSearchType()
, Stereochemistry documentation
-
getStereoSearchType
public final int getStereoSearchType()
Get the stereo search type option.- Returns:
- Specifies the stereo search type.
Default isSearchConstants.STEREO_SPECIFIC
. - See Also:
SearchConstants.STEREO_SPECIFIC
,SearchConstants.STEREO_IGNORE
,SearchConstants.STEREO_EXACT
,SearchConstants.STEREO_DIASTEREOMER
,SearchConstants.STEREO_ENANTIOMER
,setStereoSearchType(int)
, Stereochemistry documentation
-
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:
setIgnoreTetrahedralStereo(boolean)
-
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:
setIgnoreDoubleBondStereo(boolean)
-
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:
setIgnoreCumuleneOrRingCisTransStereo(boolean)
-
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:
setIgnoreAxialStereo(boolean)
-
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:
setIgnoreSynAntiStereo(boolean)
-
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(boolean)
,MoleculeGraph.calcHybridization()
, Search options documenation
-
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:
getCheckSpHyb()
,MoleculeGraph.calcHybridization()
, Search options documenation
-
getImplicitHMatching
public final int getImplicitHMatching()
Get option for matching implicit and explicit hydrogens- Returns:
- Matching behaviour between explicit and implicit hydrogens.
Default isSearchConstants.IMPLICIT_H_MATCHING_DEFAULT
(matching depends on the circumstances of search) - See Also:
SearchConstants.IMPLICIT_H_MATCHING_DEFAULT
,SearchConstants.IMPLICIT_H_MATCHING_DISABLED
,SearchConstants.IMPLICIT_H_MATCHING_ENABLED
, Search options documentation
-
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:
SearchConstants.IMPLICIT_H_MATCHING_DEFAULT
,SearchConstants.IMPLICIT_H_MATCHING_DISABLED
,SearchConstants.IMPLICIT_H_MATCHING_ENABLED
,SearchConstants.IMPLICIT_H_MATCHING_IGNORE
, Implicit H matching documentation
-
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(boolean)
, Reaction search documentation
-
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:
isReactionUnpairedMapMatching()
, Reaction search documentation
-
setChemTermsFilter
public void setChemTermsFilter(String value)
Sets the Chemical Terms filtering expression.- Parameters:
value
- the chemical terms filter expression
Default value isnull
.- See Also:
getChemTermsFilter()
, Chemical terms documentation
-
getChemTermsFilter
public final String getChemTermsFilter()
Gets the Chemical Terms filtering expression- Returns:
- chemical filter expression
Default value isnull
. - See Also:
setChemTermsFilter(String)
, Chemical terms documentation
-
setChemTermsFilterConfig
public void setChemTermsFilterConfig(File file) throws IOException
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:
getChemTermsFilterConfig()
, Chemical terms documentation
-
setChemTermsFilterConfig
public void setChemTermsFilterConfig(String value)
Sets the configuration string for Chemical Terms filter.- Parameters:
value
- the configuration string. Set tonull
for default configuration.
Default value isnull
.- See Also:
getChemTermsFilterConfig()
, Chemical terms documentation
-
getChemTermsFilterConfig
public final String getChemTermsFilterConfig()
Gets the configuration string for Chemical Terms filter.- Returns:
- the configuration string
Default value isnull
. - See Also:
setChemTermsFilterConfig(String)
, Chemical terms documentation
-
setUndefinedRAtom
public void setUndefinedRAtom(int value)
Sets the matching behaviour 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:
getUndefinedRAtom()
, Special search types documentation
-
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 behaviour mode.- Returns:
- Matching mode value.
Default isSearchConstants.UNDEF_R_MATCHING_GROUP
. - See Also:
SearchConstants.UNDEF_R_MATCHING_ALL
,SearchConstants.UNDEF_R_MATCHING_UNDEF_R
,SearchConstants.UNDEF_R_MATCHING_GROUP
,SearchConstants.UNDEF_R_MATCHING_GROUP_H
,SearchConstants.UNDEF_R_MATCHING_GROUP_H_EMPTY
,setUndefinedRAtom(int)
, Special search types documentation
-
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:
setUndefinedRAtom(int)
,getUndefinedRAtom()
-
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 behaviour (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:
setUndefinedRAtom(int)
-
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 behaviour.- Returns:
true
if different undefined R-atoms can match the same group of atoms
Default value isfalse
.- Since:
- JChem 5.3
- See Also:
SearchConstants.UNDEF_R_MATCHING_GROUP
,SearchConstants.UNDEF_R_MATCHING_GROUP_H
,SearchConstants.UNDEF_R_MATCHING_GROUP_H_EMPTY
,setBridgingRAllowed(boolean)
-
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 behaviour- 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:
setUndefinedRAtom(int)
,SearchConstants.UNDEF_R_MATCHING_GROUP
,SearchConstants.UNDEF_R_MATCHING_GROUP_H
,SearchConstants.UNDEF_R_MATCHING_GROUP_H_EMPTY
,getRLigandEqualityCheck()
, Special search types documentation
-
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 behaviour- 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:
SearchConstants.UNDEF_R_MATCHING_GROUP
,SearchConstants.UNDEF_R_MATCHING_GROUP_H
,SearchConstants.UNDEF_R_MATCHING_GROUP_H_EMPTY
,setRLigandEqualityCheck(boolean)
, Special search types documentation
-
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:
SearchConstants.HIT_ORDERING_NONE
,SearchConstants.HIT_ORDERING_UNDEF_R_MATCHING_GROUP_FIRST
,getHitOrdering()
-
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:
SearchConstants.HIT_ORDERING_NONE
,SearchConstants.HIT_ORDERING_UNDEF_R_MATCHING_GROUP_FIRST
,setHitOrdering(int)
-
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()
,SearchConstants.ATTACHED_DATA_MATCH_IGNORE
,SearchConstants.ATTACHED_DATA_MATCH_GENERAL
,SearchConstants.ATTACHED_DATA_MATCH_EXACT
, Query features documentation
-
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:
setAttachedDataMatch(int)
,SearchConstants.ATTACHED_DATA_MATCH_IGNORE
,SearchConstants.ATTACHED_DATA_MATCH_GENERAL
,SearchConstants.ATTACHED_DATA_MATCH_EXACT
, Query features documentation
-
setAttachedDataPrefixes
public void setAttachedDataPrefixes(String value)
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:
setAttachedDataMatch(int)
,getAttachedDataPrefixes()
, Query features documentation
-
getAttachedDataPrefixes
public final String 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:
setAttachedDataPrefixes(String)
, Query features documentation
-
setExactSpecialAtomMatching
public void setExactSpecialAtomMatching(String value)
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
public final String 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:
setExactSpecialAtomMatching(String)
-
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(int)
-
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:
getExhaustiveModeLimit()
-
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(int)
-
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:
getTimeoutLimitMilliseconds()
-
nonPositiveToInfinite
protected static int nonPositiveToInfinite(int value)
-
isThrowExceptionOnTimeout
public final boolean isThrowExceptionOnTimeout()
It search should throw exception upon timeout.- Returns:
- true if it throws exception.
Default value isfalse
. - See Also:
setThrowExceptionOnTimeout(boolean)
-
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:
isThrowExceptionOnTimeout()
-
getChemTermsFilterOption
@Beta public chemaxon.sss.search.options.ChemTermsFilterOption 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
public String 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)- Overrides:
toString
in classObject
- Returns:
- a string in format "optionname1:optionvalue1 optionname2:optionvalue2 ..."
- See Also:
setOptions(String)
,toList()
-
toString
public String toString(String sep)
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:
setOptions(String)
,toList()
-
getAllOptionsAsString
public String 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(String)
,setOptions(String)
,toString()
-
getAllOptionsAsString
public String getAllOptionsAsString(String sep)
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:
getAllOptionsAsString()
,setOptions(String)
,toString()
-
toList
public ArrayList<String> toList()
- Returns:
- An arraylist that contains strings of format "optionname:optionvalue". Doesn't contain options that have their default value.
- See Also:
setOptions(String)
,toString()
-
getOptionNames
public Collection<String> 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
-
-