chemaxon.sss.search
Class SearchOptions

java.lang.Object
  extended by chemaxon.sss.search.SearchOptions
All Implemented Interfaces:
SearchConstants, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
JChemSearchOptions, MolSearchOptions

public class SearchOptions
extends java.lang.Object
implements SearchConstants, java.lang.Cloneable, java.io.Serializable

Class to encapsulate common search parameters.

Since:
5.0
Author:
Szabolcs Csepregi Date: 27-Mar-2007, Tamas Csizmazia, Vencel Bors
See Also:
Serialized Form

Field Summary
protected  boolean dirty
          This flag is set to true whenever any of the options change.
protected  int[] options
          Field to store various options of the search.
 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, 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_AROM_FINAL_CHECK, MARKUSH_AROM_NO_FINAL_CHECK, MARKUSH_AROM_OFF, MARKUSH_HIT_INNER, MARKUSH_HIT_ORIGINAL, MARKUSH_MCS, MATCH_COUNT_BETWEEN, MATCH_COUNT_RELATION, NO_ABAS, NO_SCREEN, RADICAL_MATCHING_DEFAULT, RADICAL_MATCHING_EXACT, RADICAL_MATCHING_IGNORE, SEARCH_MODE_NAMES, SEARCH_OPTIONS_LENGTH, 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, 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
SearchOptions()
          Deprecated. As of relase 5.5, replaced by SearchOptions(int)
SearchOptions(int searchType)
          Creates a SearchOptions object while setting different search options according to a predefined search type.
 
Method Summary
 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.
 java.lang.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.
 java.lang.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)
 java.lang.String getAllOptionsAsString(java.lang.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.
 java.lang.String getAttachedDataPrefixes()
          Returns the prefixes of the names of those data sgroups that will be used during structure comparison or null if all data sgroups should be checked.
protected static boolean getBoolean(java.lang.String value)
          Returns value as a boolean flag.
 int getChargeMatching()
          Get the charge matching option value
 boolean getCheckSpHyb()
          Get the sp-hybridization state option
 java.lang.String getChemTermsFilter()
          Gets the Chemical Terms filtering expression
 java.lang.String getChemTermsFilterConfig()
          Gets the configuration string for Chemical Terms filter.
 boolean getCompleteHG()
          Retrieves the information if only complete structures are matching on target homology groups.
 int getDoubleBondStereoMatchingMode()
          Get the double bond stereo matching mode.
 java.lang.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 hydrogens
 int getIsotopeMatching()
          Get option for matching isotopes
 java.lang.String getOption(java.lang.String name)
          Returns option value in string format.
protected  java.lang.String[] getOptionNames()
           
 int getRadicalMatching()
          Get option for radical matching behaviour.
 boolean getRLigandEqualityCheck()
          Returns true 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(java.lang.String searchTypeValue)
          Decodes the string representation of the search type and returns the predefined constant value defined in SearchConstants.
 SetOfSmallestRingsOption getSSRType()
          Gets the type of the set of smallest rings to use
Default value is SetOfSmallestRingsOption.SSSR
 int getStereoModel()
          Get the stereo model option.
 int getStereoSearchType()
          Get the stereo search type option.
 int getTautomerSearch()
          Indicates if tautomers of the query should be enumerated for search.
 int getTimeoutLimit()
          Deprecated. since 5.6 use getTimeoutLimitMilliseconds() instead
 int getTimeoutLimitMilliseconds()
          The search timeouts reaching this amount of time.
 int getUndefinedRAtom()
          Returns undefined R atom matching behaviour mode.
 MolComparator[] getUserComparators()
          Because of efficiency reasons one should check hasUserComparators() before calling this method!
 int getVagueBondLevel()
          Getter for vague bond level.
 boolean hasChangesInUserComparators()
          Used in initializing searches.
 boolean hasUserComparators()
          Gets whether searcher has user defined comparators.
 boolean isBridgingRAllowed()
          Returns true 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 isExactFragment()
          Deprecated. since 5.6, replaced by isFullFragment()
 boolean isExactQueryAtomMatching()
          Returns whether exact matching of query atom information is set.
 boolean isFullFragment()
          Get option whether heavy atoms can occur in target besides the returned hit fragments.
 boolean isIgnoreAlleneStereo()
          Retrieves if allene stereo is ignored during searching.
 boolean isIgnoreAxialStereo()
          Retrieves if axial stereo is ignored during searching.
 boolean isIgnoreCTExceptions()
          Get whether only syntactical exceptions are thrown for chemical terms.
 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 sensitive
 boolean isPerfectSearchType()
          Get whether search should match only if query and target are exact matches.
 boolean isPhaseShiftedMatching()
          Get option whether phase shifted polymer matches on the original.
 boolean isPolymerMatching()
          Get option whether to search consider polymer sgroups during search.
 boolean isQHomologyHandling()
          Deprecated. since 5.6, use getHomologyNarrowTranslation()
 boolean isReactionUnpairedMapMatching()
          Get whether unpaired(orphan or widow) atom maps can match any atom.
 boolean isSubgraphSearch()
          Returns the subgraph matching option.
 boolean isSuperstructureSearch()
          True if the current search type is superstructure search.
 boolean isTautomerDuplicateFiltering()
          Deprecated. since 5.5, replace with getTautomerSearch()
 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 option
 boolean isVerbose()
          For debugging purposes only.
protected  java.lang.String returnOptionString(boolean value)
           
 void setAttachedDataMatch(int value)
          Sets whether attached data (in data sgroups) should be used when comparing structures.
 void setAttachedDataPrefixes(java.lang.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(java.lang.String value)
          Sets the Chemical Terms filtering expression.
 void setChemTermsFilterConfig(java.lang.String value)
          Sets the configuration string for Chemical Terms filter.
 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 setExactFragment(boolean value)
          Deprecated. since 5.6, replaced by SearchOptions(int)
 void setExactQueryAtomMatching(boolean isExact)
          Sets whether exact query atom matching should be used or not.
 void setExactSpecialAtomMatching(java.lang.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 setFullFragment(boolean value)
          Deprecated. since 5.6, replaced by SearchOptions(int)
 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 setIgnoreAlleneStereo(boolean value)
          Sets ignoring allene stereo information during serching.
 void setIgnoreAxialStereo(boolean value)
          Sets ignoring axial stereo information during serching.
 void setIgnoreCTExceptions(boolean value)
          If set true, only syntactical exceptions will be thrown.
 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 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(java.lang.String name, java.lang.String value)
          Sets search options.
 void setOptions(java.lang.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 setQHomologyHandling(boolean value)
          Deprecated. since 5.6, use setHomologyNarrowTranslation(HomologyTranslationOption)
 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 setSearchType(int searchType)
          Deprecated. As of release 5.5, replaced by SearchOptions(int)
protected  void setSearchType0(int searchType)
          Sets different search options according to a predefined search type.
 void setSSRType(SetOfSmallestRingsOption value)
          Sets which type of set of smallest rings to use for property calculations
 void setStereoModel(int value)
          Set stereo model option.
 void setStereoSearchType(int value)
          Specifies the way stereo information is considered during searching.
 void setSubgraphSearch(boolean value)
          Specifies the matching mode for topology search.
 void setSuperstructureSearch(boolean value)
          Sets if the current search type is superstructure search.
 void setTautomerDuplicateFiltering(boolean value)
          Deprecated. As of release 5.5, replaced by setTautomerSearch(int)
 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 setTimeoutLimit(int value)
          Deprecated. since 5.6 use setTimeoutLimitMilliseconds(int) instead
 void setTimeoutLimitMilliseconds(int value)
          The search timeouts reaching this amount of time.
 void setUndefinedRAtom(int value)
          Sets the matching behaviour of an undefined R atom in the query.
 void setVagueBondLevel(int value)
          Option for less strict evaluation of query bonds (e.g. ambiguous aromaticity).
 void setValenceMatching(boolean value)
          Set valence check option.
 void setVerbose(boolean verboseP)
          For debugging purposes only.
 java.util.ArrayList<java.lang.String> toList()
           
 java.lang.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)
 java.lang.String toString(java.lang.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)
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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.


options

protected int[] options
Field to store various options of the search.

Constructor Detail

SearchOptions

@Deprecated
public SearchOptions()
Deprecated. As of relase 5.5, replaced by SearchOptions(int)

Default constructor for SearchOptions. Initializes the SearchOptions object with search type SearchConstants.DEFAULT_SEARCHTYPE

See Also:
SearchOptions(int)

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.NO_SCREEN, SearchConstants.NO_ABAS, SearchConstants.SUBSTRUCTURE (default), SearchConstants.SUPERSTRUCTURE (no query features allowed), SearchConstants.SIMILARITY, SearchConstants.FULL, SearchConstants.DUPLICATE, SearchConstants.FULL_FRAGMENT and SearchConstants.MARKUSH_MCS.

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 is false.
Since:
JChem 2.2

setExactQueryAtomMatching

public void setExactQueryAtomMatching(boolean isExact)
Sets whether exact query atom matching should be used or not. See isExactQueryAtomMatching().

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 is false.
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 is chemaxon.struc.StereoConstants.DBS_MARKED Replaces setStereoCareChecking(boolean)
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 is chemaxon.struc.StereoConstants.DBS_MARKED
Since:
JChem 2.2
See Also:
setDoubleBondStereoMatchingMode(int), StereoConstants.DBS_ALL, StereoConstants.DBS_MARKED, StereoConstants.DBS_NONE, Stereochemistry documentation

setSearchType

@Deprecated
public void setSearchType(int searchType)
Deprecated. As of release 5.5, replaced by SearchOptions(int)

Sets different search options according to a predefined search type. For full explanation see JChem Query Guide. Acceptable values: SearchConstants.NO_SCREEN, SearchConstants.NO_ABAS, SearchConstants.SUBSTRUCTURE (default), SearchConstants.SUPERSTRUCTURE (no query features allowed), SearchConstants.SIMILARITY, SearchConstants.FULL, SearchConstants.DUPLICATE, SearchConstants.FULL_FRAGMENT and SearchConstants.MARKUSH_MCS.

WARNING: This method may affect other search settings, therefore if other search options are adjusted, this method should be called first! For affected search options, see links below.

Parameters:
searchType - the predefined search type
See Also:
SearchOptions(int), setExactBondMatching(boolean), setExactQueryAtomMatching(boolean), setSubgraphSearch(boolean)

setSearchType0

protected void setSearchType0(int searchType)
Sets different search options according to a predefined search type. For full explanation see JChem Query Guide. Acceptable values: SearchConstants.NO_SCREEN, SearchConstants.NO_ABAS, SearchConstants.SUBSTRUCTURE (default), SearchConstants.SUPERSTRUCTURE (no query features allowed), SearchConstants.SIMILARITY, SearchConstants.FULL, SearchConstants.DUPLICATE, SearchConstants.FULL_FRAGMENT and SearchConstants.MARKUSH_MCS.

WARNING: This method may affect other search settings, therefore if other search options are adjusted, this method should be called first! For affected search options, see links below.

Parameters:
searchType - the predefined search type
See Also:
setExactBondMatching(boolean), setExactQueryAtomMatching(boolean), setSubgraphSearch(boolean)

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.MARKUSH_MCS, SearchConstants.SIMILARITY

isPerfectSearchType

public final boolean isPerfectSearchType()
Get whether search should match only if query and target are exact matches. Same as duplicate search.

Returns:
whether this search is a DUPLICATE search or not.
Default value depends on search type.
See Also:
SearchConstants.DUPLICATE

isSubgraphSearch

public boolean isSubgraphSearch()
Returns the subgraph matching option.

Returns:
true if substructure search, false if the full molecular graph must match, e.g. full structure search or duplicate match.
Default value depends on search type.
See Also:
setSubgraphSearch(boolean)

setSubgraphSearch

public void setSubgraphSearch(boolean value)
Specifies the matching mode for topology search.
Internal use only. Used when it is important to keep all search option settings, but it is needed to search only for a substructure. Preferred way of usage is through SearchOptions(int) constructor.

Parameters:
value - true for substructure search, false for full structure search matching
See Also:
SearchOptions(int), isSubgraphSearch()

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 is SearchConstants.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 is SearchConstants.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 is false.

setVerbose

public void setVerbose(boolean verboseP)
For debugging purposes only.

Parameters:
verboseP - if true more detailed information is sent to the output
Default value is false.

getSearchType

public static int getSearchType(java.lang.String searchTypeValue)
Decodes the string representation of the search type and returns the predefined constant value defined in SearchConstants.

Parameters:
searchTypeValue - search type represented as string
Returns:
the identifier for the given search type

setOptions

public void setOptions(java.lang.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)

    isSuperstructureSearch

    public final boolean isSuperstructureSearch()
    True if the current search type is superstructure search. This property is usually set indirectly through setSearchType.

    Returns:
    true in case of superstructure search.
    Default value depends on search type.
    See Also:
    SearchConstants.SUPERSTRUCTURE, setSuperstructureSearch(boolean)

    setSuperstructureSearch

    public void setSuperstructureSearch(boolean value)
    Sets if the current search type is superstructure search. This property is usually set indirectly through setSearchType in case of superstructure search.
    Internal use only. Used when it is important to keep all search option settings, but it is needed to search only for a superstructure. Preferred way of usage is through SearchOptions(int) constructor.

    Parameters:
    value - is true if current search should be superstructure, false otherwise
    Default value depends on search type.
    See Also:
    setSearchType(int), SearchConstants.SUPERSTRUCTURE

    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]
    If orderSensitiveSearch is true, both cases are returned, otherwise only one of them (the one found first).

    Parameters:
    value - set this to true to get results in every possible order
    Default value is false.

    isOrderSensitiveSearch

    public final boolean isOrderSensitiveSearch()
    Indicates whether the search is order sensitive

    Returns:
    if hits are returned in every possible order
    Default value is false.
    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 to true, bond types must match exactly. For example "single or double" matches only "single or double", but matches neither "single" or "double".
    Default value depends on search type.

    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 is SearchConstants.VAGUE_BOND_LEVEL1.
    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, getVagueBondLevel(), Vague bond level documenation

    getVagueBondLevel

    public final int getVagueBondLevel()
    Getter for vague bond level.

    Returns:
    the current vague bond level
    Default value is SearchConstants.VAGUE_BOND_LEVEL1.
    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 is true.
    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 is true.
    See Also:
    setCompleteHG(boolean)

    hasChangesInUserComparators

    public final boolean hasChangesInUserComparators()
    Used in initializing searches. Specifies whether changes occured 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.

    See Also:
    getUserComparators(), addUserComparator(MolComparator), deleteUserComparator(MolComparator), deleteAllUserComparators(), MolComparator

    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.

    See Also:
    MolComparator, addUserComparator(MolComparator), getUserComparators()

    getUserComparators

    public MolComparator[] getUserComparators()
    Because of efficiency reasons one should check hasUserComparators() before calling this method!

    Returns:
    MolComparator[] of user-defined MolComparators

    isDirty

    public final boolean isDirty()
    Returns the dirty flag. Dirty flag usage:
    1. When the search object initializes itself using the actual query, target and options, it clears the dirty flag(sets to false).
    2. When the search options change, the dirty flag is set automatically.
    3. 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.

    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.

    See Also:
    isDirty()

    clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException
    Makes an identical copy of this SearchObject.

    Overrides:
    clone in class java.lang.Object
    Throws:
    java.lang.CloneNotSupportedException

    clonecopy

    public void clonecopy(SearchOptions other)
    Copies all search options to other.

    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 is SearchConstants.TAUTOMER_SEARCH_DEFAULT.
    Since:
    JChem 5.4
    See Also:
    SearchConstants.TAUTOMER_SEARCH_DEFAULT, SearchConstants.TAUTOMER_SEARCH_OFF, SearchConstants.TAUTOMER_SEARCH_ON, 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 is SearchConstants.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(java.lang.String name,
                          java.lang.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'.

    Useable search parameters:

  • orderSensitive
  • tautomer
  • stereoSearchType
  • ignoreTetrahedralStereo
  • ignoreDoubleBondStereo
  • ignoreAxialStereo
  • ignoreAlleneStereo
  • ignoreSynAntiStereo
  • keepQueryOrder
  • exactAtomMatching
  • exactBondMatching
  • exactQueryAtomMatching
  • exactRadicalMatching
  • exactIsotopeMatching
  • exactChargeMatching
  • checkSpHyb
  • doubleBondStereo
  • HCountMatching
  • t
  • implicitHMatching
  • vagueBond
  • completeHG
  • charge
  • isotope
  • radical
  • valence
  • mix
  • polymer
  • endGroupMatching
  • transformMonomer
  • markush
  • stereoModel
  • undefinedRAtom
  • bridgingRAllowed
  • RLigandEqualityCheck
  • hitOrdering
  • reactionUnpairedMap
  • attachedDataMatch
  • attachedDataPrefixes
  • exactSpecialAtomMatching
  • ignoreCTExceptions
  • exhaustiveModeLimit
  • timeoutLimit
  • tdf
  • See Also:
    getOption(String)

    getOption

    public java.lang.String getOption(java.lang.String name)
    Returns option value in string format.

    Parameters:
    name - Name (case insensitive) of search option (e.g. stereoSearch).

    Useable search parameters:

  • orderSensitive
  • tautomer
  • stereoSearchType
  • keepQueryOrder
  • checkSpHyb
  • exactBondMatching
  • exactQueryAtomMatching
  • doubleBondStereo
  • HCountMatching
  • t
  • implicitHMatching
  • reactionUnpairedMap
  • vagueBond
  • completeHG
  • charge
  • isotope
  • radical
  • valence
  • mix
  • polymer
  • stereoModel
  • undefinedRAtom
  • bridgingRAllowed
  • RLigandEqualityCheck
  • hitOrdering
  • attachedDataMatch
  • attachedDataPrefixes
  • exactSpecialAtomMatching
  • ignoreCTExceptions
  • exhaustiveModeLimit
  • timeoutLimit
  • tdf
  • 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(java.lang.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:
    java.lang.IllegalArgumentException - otherwise.

    returnOptionString

    protected java.lang.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 is false.

    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 is false.

    isExactFragment

    @Deprecated
    public final boolean isExactFragment()
    Deprecated. since 5.6, replaced by isFullFragment()

    Get option whether heavy atoms can occur in target besides the returned hit fragments.

    Returns:
    true if the query only matches to full(exact) fragments of the target. (No heavy atoms outside the match and each query fragment corresponds to a target fragment.) Same as isFullFragment().
    Default value is true.

    setExactFragment

    @Deprecated
    public void setExactFragment(boolean value)
    Deprecated. since 5.6, replaced by SearchOptions(int)

    Specifies if heavy atoms can occur outside the match. Same as setFullFragment(boolean)

    Parameters:
    value - true, if the query should only match to full fragments of the target. (No heavy atoms outside the match and each query fragment corresponds to a target fragment.) Same as setFullFragment(boolean).
    Default value depends on search type.

    isFullFragment

    public final boolean isFullFragment()
    Get option whether heavy atoms can occur in target besides the returned hit fragments.

    Returns:
    true if the query only matches to full fragments of the target. (No heavy atoms outside the match and each query fragment corresponds to a target fragment.) Same as isExactFragment().
    Default value depends on search type.

    setFullFragment

    @Deprecated
    public void setFullFragment(boolean value)
    Deprecated. since 5.6, replaced by SearchOptions(int)

    Specifies if heavy atoms can occur outside the match. Same as setExactFragment(boolean)

    Parameters:
    value - true, if the query should only match to full fragments of the target. (No heavy atoms outside the match and each query fragment corresponds to a target fragment.)
    Default value is true.

    getIsotopeMatching

    public final int getIsotopeMatching()
    Get option for matching isotopes

    Returns:
    Isotope searching behaviour.
    Default is SearchConstants.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 is SearchConstants.ISOTOPE_MATCHING_DEFAULT (isotope query matches only isotope target, non-isotope query matches all)
    Default is SearchConstants.ISOTOPE_MATCHING_DEFAULT (isotope query matches only isotope target, nonisotope query matches all)
    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 is CHARGE_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 is SearchConstants#CHARGE_MATCHING_DEFAULT (charged query matches only charged target, noncharged query matches all)
    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 is true.
    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 is true.
    See Also:
    isValenceMatching()

    getRadicalMatching

    public final int getRadicalMatching()
    Get option for radical matching behaviour.

    Returns:
    Radical searching behaviour.
    Default is SearchConstants.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 is SearchConstants.RADICAL_MATCHING_DEFAULT (radical query matches only radical target, nonradical query matches all)
    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 is true.
    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 is true.
    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 is true.
    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 is true.
    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 is true.
    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 is true.

    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 is true.
    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 is true.
    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 is true.
    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 is true.
    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 is false.
    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 is false
    See Also:
    isCopolymerMatching(), Polymer search documentation

    isQHomologyHandling

    @Deprecated
    public final boolean isQHomologyHandling()
    Deprecated. since 5.6, use getHomologyNarrowTranslation()

    Get query side homology matching option.

    Returns:
    true if the query-side homology matching mode is set.
    Default value is true.
    See Also:
    Query features documentation

    setQHomologyHandling

    @Deprecated
    public void setQHomologyHandling(boolean value)
    Deprecated. since 5.6, use setHomologyNarrowTranslation(HomologyTranslationOption)

    Adjusts query side homology matching mode. If set, then pseudo atoms with homology names on the query side are handled as homology groups. If false they are handled as pseudo atoms and match only pseudo atoms with the same name.

    Parameters:
    value - true if homology handling should be set, false otherwise.
    Default value is true.
    See Also:
    Query features 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 is HomologyTranslationOption.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 is HomologyTranslationOption.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 is HomologyTranslationOption.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 is HomologyTranslationOption.MARKED
    See Also:
    getHomologyBroadTranslation()

    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 use
    Default value is SetOfSmallestRingsOption.SSSR

    Returns:
    set of smallest rings option
    See Also:
    SetOfSmallestRingsOption, setSSRType(SetOfSmallestRingsOption)

    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 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, 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 is SearchConstants.STEREO_SPECIFIC.
    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 is SearchConstants.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 and setStereoSearchType(int) only specifies double bond stereo matching.

    Parameters:
    value - the value to set, set true to ignore.
    Default value is false.

    isIgnoreTetrahedralStereo

    public final boolean isIgnoreTetrahedralStereo()
    Retrieves if tetrahedral stereo is ignored during searching.

    Returns:
    true if ignored.
    Default value is false.
    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 and setStereoSearchType(int) only specifies tetrahedral stereo matching.

    Parameters:
    value - the value to set, set true to ignore.
    Default value is false.

    isIgnoreDoubleBondStereo

    public final boolean isIgnoreDoubleBondStereo()
    Retrieves if double bond stereo is ignored during searching.

    Returns:
    true if ignored.
    Default value is false.
    See Also:
    setIgnoreDoubleBondStereo(boolean)

    setIgnoreAlleneStereo

    public final void setIgnoreAlleneStereo(boolean value)
    Sets ignoring allene stereo information during serching. This stereo option is not supported for DB searches.

    Parameters:
    value - the value to set, set true to ignore.
    Default value is true.

    isIgnoreAlleneStereo

    public final boolean isIgnoreAlleneStereo()
    Retrieves if allene stereo is ignored during searching.

    Returns:
    true if ignored.
    Default value is true.
    See Also:
    setIgnoreAlleneStereo(boolean)

    setIgnoreAxialStereo

    public final void setIgnoreAxialStereo(boolean value)
    Sets ignoring axial stereo information during serching. This stereo option is not supported for DB searches.

    Parameters:
    value - the value to set, set true to ignore.
    Default value is true.

    isIgnoreAxialStereo

    public final boolean isIgnoreAxialStereo()
    Retrieves if axial stereo is ignored during searching.

    Returns:
    true if ignored.
    Default value is true.
    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 is true.

    isIgnoreSynAntiStereo

    public final boolean isIgnoreSynAntiStereo()
    Retrieves if syn-anti stereo is ignored during searching.

    Returns:
    true if ignored.
    Default value is true.
    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 is false.
    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 is false.
    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 is SearchConstants.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 is SearchConstants.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 is true.
    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 is true.
    See Also:
    isReactionUnpairedMapMatching(), Reaction search documentation

    setChemTermsFilter

    public void setChemTermsFilter(java.lang.String value)
    Sets the Chemical Terms filtering expression.

    Parameters:
    value - the chemical terms filter expression
    Default value is null.
    See Also:
    getChemTermsFilter(), Chemical terms documentation

    getChemTermsFilter

    public final java.lang.String getChemTermsFilter()
    Gets the Chemical Terms filtering expression

    Returns:
    chemical filter expression
    Default value is null.
    See Also:
    setChemTermsFilter(String), Chemical terms documentation

    setChemTermsFilterConfig

    public void setChemTermsFilterConfig(java.lang.String value)
    Sets the configuration string for Chemical Terms filter.

    Parameters:
    value - the configuration string. Set to null for default configuration.
    Default value is null.
    See Also:
    getChemTermsFilterConfig(), Chemical terms documentation

    getChemTermsFilterConfig

    public final java.lang.String getChemTermsFilterConfig()
    Gets the configuration string for Chemical Terms filter.

    Returns:
    the configuration string
    Default value is null.
    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.

    Parameters:
    value - Matching mode value.
    Default is SearchConstants.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, getUndefinedRAtom(), Special search types documentation

    getUndefinedRAtom

    public final int getUndefinedRAtom()
    Returns undefined R atom matching behaviour mode.

    Returns:
    Matching mode value.
    Default is SearchConstants.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 when getUndefinedRAtom() 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 or
    SearchConstants.UNDEF_R_MATCHING_GROUP_H or SearchConstants.UNDEF_R_MATCHING_GROUP_H_EMPTY.

    Parameters:
    value - true if different undefined R-atoms can match the same group of atoms
    Default value is false.
    Since:
    JChem 5.3
    See Also:
    setUndefinedRAtom(int)

    isBridgingRAllowed

    public final boolean isBridgingRAllowed()
    Returns true 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 is false.
    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 is true.
    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()
    Returns true 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 is true.
    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 is SearchConstants.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 is SearchConstants.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 is SearchConstants.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 is SearchConstants.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(java.lang.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 is null (all data sgroups will be checked).
    See Also:
    setAttachedDataMatch(int), getAttachedDataPrefixes(), Query features documentation

    getAttachedDataPrefixes

    public final java.lang.String getAttachedDataPrefixes()
    Returns the prefixes of the names of those data sgroups that will be used during structure comparison or null if all data sgroups should be checked.

    Returns:
    comma separated list of name prefixes or null
    Default value is null (all data sgroups will be checked).
    See Also:
    setAttachedDataPrefixes(String), Query features documentation

    setExactSpecialAtomMatching

    public void setExactSpecialAtomMatching(java.lang.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 java.lang.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)

    isIgnoreCTExceptions

    public final boolean isIgnoreCTExceptions()
    Get whether only syntactical exceptions are thrown for chemical terms.

    Returns:
    true if Chemical Terms exceptions should be ignored during evalution
    Default value is false.

    setIgnoreCTExceptions

    public void setIgnoreCTExceptions(boolean value)
    If set true, only syntactical exceptions will be thrown. Those molecules that return exception during evaluation will be left out from hit list.

    Parameters:
    value - true if Chemical Terms exceptions should be ignored during evalution
    Default value is false.

    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()

    getTimeoutLimit

    @Deprecated
    public final int getTimeoutLimit()
    Deprecated. since 5.6 use getTimeoutLimitMilliseconds() instead

    The search timeouts reaching this number of steps.

    Returns:
    The timeout step limit.
    Default value is 10000000.
    See Also:
    setTimeoutLimit(int)

    setTimeoutLimit

    @Deprecated
    public void setTimeoutLimit(int value)
    Deprecated. since 5.6 use setTimeoutLimitMilliseconds(int) instead

    The search timeouts reaching this number of steps. Set it to -1 if you do not want the search to time out.

    Parameters:
    value - The step limit to set.
    Default value is 10000000.
    See Also:
    getTimeoutLimit()

    getTimeoutLimitMilliseconds

    public final int getTimeoutLimitMilliseconds()
    The search 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 timeouts reaching this amount of time. Set it to -1 if you do not want the search to time out.

    Parameters:
    value - The time limit to set in milliseconds.
    Default value is 120000.
    See Also:
    getTimeoutLimitMilliseconds()

    isThrowExceptionOnTimeout

    public final boolean isThrowExceptionOnTimeout()
    It search should throw exception upon timeout.

    Returns:
    true if it throws exception.
    Default value is false.
    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 is false.
    See Also:
    isThrowExceptionOnTimeout()

    setTautomerDuplicateFiltering

    @Deprecated
    public void setTautomerDuplicateFiltering(boolean value)
    Deprecated. As of release 5.5, replaced by setTautomerSearch(int)

    Set option for using the generic tautomers of the target and query when searching.

    Parameters:
    value - true if generic tautomers of query and target should be used during search. (Effective only in case of duplicate search.)
    Default value is false.
    See Also:
    setTautomerSearch(int), getTautomerSearch(), SearchConstants.TAUTOMER_SEARCH_ON, SearchConstants.TAUTOMER_SEARCH_OFF, SearchConstants.TAUTOMER_SEARCH_DEFAULT

    isTautomerDuplicateFiltering

    @Deprecated
    public final boolean isTautomerDuplicateFiltering()
    Deprecated. since 5.5, replace with getTautomerSearch()

    Get whether search should use tautomer duplicate filtering.

    Returns:
    true if generic tautomers of query and target should be used during search. (Effective only in case of duplicate search.)
    Default value is false.
    See Also:
    setTautomerSearch(int), getTautomerSearch(), SearchConstants.TAUTOMER_SEARCH_ON, SearchConstants.TAUTOMER_SEARCH_OFF, SearchConstants.TAUTOMER_SEARCH_DEFAULT

    toString

    public java.lang.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 class java.lang.Object
    Returns:
    a string in format "optionname1:optionvalue1 optionname2:optionvalue2 ..."
    See Also:
    setOptions(String), toList()

    toString

    public java.lang.String toString(java.lang.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 java.lang.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 java.lang.String getAllOptionsAsString(java.lang.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 java.util.ArrayList<java.lang.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

    protected java.lang.String[] getOptionNames()