chemaxon.sss.search
Class SearchOptions

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

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

Class to encapsulate common search parameters.

Since:
5.0
Author:
Szabolcs Csepregi Date: 27-Mar-2007, Tamas Csizmazia

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, CHARGE_MATCHING_DEFAULT, CHARGE_MATCHING_EXACT, CHARGE_MATCHING_IGNORE, DEFAULT_DISSIMILARITY_THRESHOLD, DEFAULT_SIMILARITY_THRESHOLD, DISSIMILARITY, EXACT, EXACT_FRAGMENT, EXACT_FRAGMENT_OFF, EXACT_FRAGMENT_ON, HCOUNT_MATCHING_AUTO, HCOUNT_MATCHING_EQUAL, HCOUNT_MATCHING_GREATER_OR_EQUAL, IMPLICIT_H_MATCHING_DEFAULT, IMPLICIT_H_MATCHING_DISABLED, IMPLICIT_H_MATCHING_ENABLED, ISOTOPE_MATCHING_DEFAULT, ISOTOPE_MATCHING_EXACT, ISOTOPE_MATCHING_IGNORE, KEEP_QUERY_ORDER, MARKUSH_AROM_FINAL_CHECK, MARKUSH_AROM_NO_FINAL_CHECK, MARKUSH_AROM_OFF, MARKUSH_DISABLED, MARKUSH_ENABLED, MARKUSH_HIT_ORIGINAL, MARKUSH_HIT_SUPERGRAPH, MATCH_COUNT_BETWEEN, MATCH_COUNT_RELATION, MIX_SGROUP_MATCHING_OFF, MIX_SGROUP_MATCHING_ON, NO_ABAS, NO_SCREEN, OPTION_CHARGE_MATCHING, OPTION_EXACT_FRAGMENT, OPTION_ISOTOPE_MATCHING, OPTION_KEEP_QUERY_ORDER, OPTION_MARKUSH_AROM, OPTION_MARKUSH_ENABLED, OPTION_MARKUSH_HIT, OPTION_MIX_SGROUP_MATCHING, OPTION_RADICAL_MATCHING, OPTION_STEREO_MODEL, OPTION_TAUTOMER_SEARCH, OPTION_VAGUE_BOND, OPTION_VALENCE_MATCHING, PERFECT, R_NODE_PLACEHOLDER, RADICAL_MATCHING_DEFAULT, RADICAL_MATCHING_EXACT, RADICAL_MATCHING_IGNORE, REARRANGE_QUERY, REGULAR_SEARCH, SEARCH_MODE_NAMES, SEARCH_OPTIONS_LENGTH, SIMILARITY, STEREO_MODEL_COMPREHENSIVE, STEREO_MODEL_DEFAULT, STEREO_MODEL_GLOBAL, STEREO_MODEL_LOCAL, SUBSTRUCTURE, SUPERSTRUCTURE, TAUTOMER_SEARCH_OFF, TAUTOMER_SEARCH_ON, VAGUE_BOND_DEFAULT, VAGUE_BOND_LEVEL1, VAGUE_BOND_LEVEL2, VAGUE_BOND_LEVEL3, VAGUE_BOND_LEVEL4, VAGUE_BOND_OFF, VALENCE_MATCHING_IGNORE, VALENCE_MATCHING_ON
 
Constructor Summary
SearchOptions()
           
 
Method Summary
 void addUserComparator(MolComparator mc)
          Adds the given user-defined comparator to the search.
 void clearChangesInUserComparators()
          Used in initializing searches.
 java.lang.Object clone()
          Makes an identical copy of this SearchObject.
 void clonecopy(SearchOptions other)
          Copies all parameters to the other object.
protected  void deepCopy(SearchOptions toOther)
          Deprecated. since 5.0.2 Please use clonecopy(SearchOptions) instead
 void deleteAllUserComparators()
           
 void deleteUserComparator(MolComparator mc)
           
protected static boolean getBoolean(java.lang.String value)
          Returns value as a boolean flag.
 int getChargeMatching()
           
 java.lang.String getChemTermsFilter()
          Gets the Chemical Terms filtering expression
 java.lang.String getChemTermsFilterConfig()
          Gets the configuration string for Chemical Terms filter.
 int getDoubleBondStereoMatchingMode()
           
 int getHCountMatching()
           
 int getImplicitHMatching()
           
 int getIsotopeMatching()
           
 int getOption(int option)
          Deprecated. Since 5.0 Please use getters instead.
  • isKeepQueryOrder()
  • isExactFragment()
  • isTautomerSearch()
  • getIsotopeMatching()
  • getChargeMatching()
  • isValenceMatching()
  • getRadicalMatching()
  • getVagueBondLevel()
  • isMixSgroupMatching()
  • getStereoModel()
  • getImplicitHMatching()
  • isReactionUnpairedMapMatching()
  •  java.lang.String getOption(java.lang.String name)
              Returns option value in string format.
     int[] getOptions()
              Deprecated. since 5.0
     int getRadicalMatching()
               
     int getSearchType()
              Returns the currently set global search operation mode.
     int getStereoModel()
               
     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()
               
     boolean isDirty()
              Returns the dirty flag.
     boolean isExactBondMatching()
              Indicates whether bond types should match exacly - looking for query bonds target.
     boolean isExactFragment()
               
     boolean isExactQueryAtomMatching()
              Returns whether exact matching of query atom information is set.
     boolean isExactStereoMatching()
              Returns the exact stereo matching option.
     boolean isKeepQueryOrder()
               
     boolean isMixSgroupMatching()
               
     boolean isOrderSensitiveSearch()
              Indicates whether the search is order sensitive
     boolean isPerfectSearchType()
               
     boolean isReactionUnpairedMapMatching()
               
     boolean isStereoSearch()
              If true, then chirality information is considered during searching, otherwise all stereo information is ignored.
    protected  boolean isSubgraphSearch()
              Returns the subgraph matching option.
     boolean isSuperstructureSearch()
              True if the current search type is superstructure search.
     boolean isTautomerSearch()
              Indicates if tautomers of the query should be enumerated for search.
     boolean isValenceMatching()
               
     boolean isVerbose()
              For debugging purposes only.
    protected  java.lang.String returnOptionString(boolean value)
               
     void setChargeMatching(int value)
               
     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 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 setExactBondMatching(boolean value)
              Specifies whether bond types should match exacly - looking for query bonds target.
     void setExactFragment(boolean value)
               
     void setExactQueryAtomMatching(boolean isExact)
              Sets whether exact query atom matching should be used or not.
     void setExactStereoMatching(boolean value)
              If true, equality is needed in stereochemistry.
     void setHCountMatching(int value)
              Sets the H count matching mode.
     void setImplicitHMatching(int value)
               
     void setIsotopeMatching(int value)
               
     void setKeepQueryOrder(boolean value)
               
     void setMixSgroupMatching(boolean value)
               
     void setOption(int option, int value)
              Deprecated. Since 5.0 Please use setters instead.
  • setKeepQueryOrder(boolean)
  • setExactFragment(boolean)
  • setTautomerSearch(boolean)
  • setIsotopeMatching(int)
  • setChargeMatching(int)
  • setValenceMatching(boolean)
  • setRadicalMatching(int)
  • setVagueBondLevel(int)
  • setMixSgroupMatching(boolean)
  • setStereoModel(int)
  • setImplicitHMatching(int)
  • setReactionUnpairedMapMatching(boolean)
  •  void setOption(java.lang.String name, java.lang.String value)
              Sets search options.
     void setOptions(int[] newOptions)
              Deprecated. since 5.0
     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 setRadicalMatching(int value)
               
     void setReactionUnpairedMapMatching(boolean value)
               
     void setSearchType(int searchType)
              Sets different search options according to a predefined search type.
     void setStereoModel(int value)
               
     void setStereoSearch(boolean value)
              If true, then chirality information is considered during searching, otherwise all stereo information is ignored.
    protected  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 setTautomerSearch(boolean value)
              Sets if tautomers of the query should be enumerated for search.
     void setVagueBondLevel(int value)
              Option for less strict evaluation of query bonds (e.g. ambiguious aromaticity).
     void setValenceMatching(boolean value)
               
     void setVerbose(boolean verboseP)
              For debugging purposes only.
     java.util.ArrayList 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
     
    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

    public SearchOptions()
    Method Detail

    isExactQueryAtomMatching

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

    Since:
    JChem 2.2

    setExactQueryAtomMatching

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

    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: Replaces setStereoCareChecking(boolean)
    Since:
    JChem 2.2

    getDoubleBondStereoMatchingMode

    public int getDoubleBondStereoMatchingMode()
    Returns:
    the matching mode relating to double bond stereo.
    Since:
    JChem 2.2
    See Also:
    setDoubleBondStereoMatchingMode(int)

    setSearchType

    public void setSearchType(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, and SearchConstants.EXACT. SearchConstants.PERFECT. SearchConstants.EXACT_FRAGMENT.

    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), setExactStereoMatching(boolean), setStereoSearch(boolean), setSubgraphSearch(boolean), setOption(int, int), SearchConstants.OPTION_CHARGE_MATCHING, SearchConstants.OPTION_ISOTOPE_MATCHING, SearchConstants.OPTION_RADICAL_MATCHING, SearchConstants.OPTION_VALENCE_MATCHING

    getSearchType

    public int getSearchType()
    Returns the currently set global search operation mode.

    Returns:
    The last set value.
    Since:
    JChem 3.2
    See Also:
    setSearchType(int)

    isPerfectSearchType

    public boolean isPerfectSearchType()
    Returns:
    whether this search is a PERFECT search or not.

    isSubgraphSearch

    protected boolean isSubgraphSearch()
    Returns the subgraph matching option.

    Returns:
    true if substructure search, false if exact structure search

    setSubgraphSearch

    protected void setSubgraphSearch(boolean value)
    Specifies the matching mode for topology search

    Parameters:
    value - true for substructure search, false for exact structure search matching

    getHCountMatching

    public int getHCountMatching()
    Returns:
    the H count matching mode. (Default is 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. Default is HCOUNT_MATCHING_AUTO.

    Parameters:
    value - possible values:
    See Also:
    SearchConstants.HCOUNT_MATCHING_AUTO, SearchConstants.HCOUNT_MATCHING_EQUAL, SearchConstants.HCOUNT_MATCHING_GREATER_OR_EQUAL

    isVerbose

    public boolean isVerbose()
    For debugging purposes only.


    setVerbose

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


    setOption

    public void setOption(int option,
                          int value)
    Deprecated. Since 5.0 Please use setters instead.
  • setKeepQueryOrder(boolean)
  • setExactFragment(boolean)
  • setTautomerSearch(boolean)
  • setIsotopeMatching(int)
  • setChargeMatching(int)
  • setValenceMatching(boolean)
  • setRadicalMatching(int)
  • setVagueBondLevel(int)
  • setMixSgroupMatching(boolean)
  • setStereoModel(int)
  • setImplicitHMatching(int)
  • setReactionUnpairedMapMatching(boolean)
  • Sets search options.

    Parameters:
    option - Option identifier to be set.
    value - Value of option to be set.
    See Also:
    SearchConstants.OPTION_KEEP_QUERY_ORDER, SearchConstants.OPTION_EXACT_FRAGMENT, SearchConstants.OPTION_TAUTOMER_SEARCH, SearchConstants.OPTION_ISOTOPE_MATCHING, SearchConstants.OPTION_CHARGE_MATCHING, SearchConstants.OPTION_VALENCE_MATCHING, SearchConstants.OPTION_RADICAL_MATCHING, SearchConstants.OPTION_VAGUE_BOND, SearchConstants.OPTION_MIX_SGROUP_MATCHING, SearchConstants.OPTION_STEREO_MODEL

    getOption

    public final int getOption(int option)
    Deprecated. Since 5.0 Please use getters instead.
  • isKeepQueryOrder()
  • isExactFragment()
  • isTautomerSearch()
  • getIsotopeMatching()
  • getChargeMatching()
  • isValenceMatching()
  • getRadicalMatching()
  • getVagueBondLevel()
  • isMixSgroupMatching()
  • getStereoModel()
  • getImplicitHMatching()
  • isReactionUnpairedMapMatching()
  • Gets a search option.

    Parameters:
    option - Option identifier to be asked for.
    Returns:
    the setting of the given option
    See Also:
    SearchConstants.OPTION_KEEP_QUERY_ORDER, SearchConstants.OPTION_EXACT_FRAGMENT, SearchConstants.OPTION_TAUTOMER_SEARCH, SearchConstants.OPTION_ISOTOPE_MATCHING, SearchConstants.OPTION_CHARGE_MATCHING, SearchConstants.OPTION_VALENCE_MATCHING, SearchConstants.OPTION_RADICAL_MATCHING, SearchConstants.OPTION_VAGUE_BOND, SearchConstants.OPTION_MIX_SGROUP_MATCHING, SearchConstants.OPTION_STEREO_MODEL

    setOptions

    public void setOptions(int[] newOptions)
    Deprecated. since 5.0

    Rapidly sets all needed search options.

    Parameters:
    newOptions - Option array to copy.

    getOptions

    public int[] getOptions()
    Deprecated. since 5.0

    Gets all needed search options.


    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 boolean isSuperstructureSearch()
    True if the current search type is superstructure search. This property is usually set indirectly through setSearchType.

    See Also:
    setSearchType(int), 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.

    See Also:
    setSearchType(int), SearchConstants.SUPERSTRUCTURE

    isExactStereoMatching

    public boolean isExactStereoMatching()
    Returns the exact stereo matching option. If true, equality is needed in stereochemistry. ("All stereo info is exactly the same.") It mainly has an effect when the query has no stereo information: it only matches non-stereo target. Similarly, a query with a wiggly tetrahedral center will only match wiggly tetrahedral center, and not specific R and S configurations. If false, non-stereo query matches both nonstereo and stereo target.

    By default, this setting is false for all search types except for PERFECT search, where it is true. This setting has no effect if stereoSearch == false.

    Returns:
    the exact-stereo setting
    See Also:
    isStereoSearch()

    setExactStereoMatching

    public void setExactStereoMatching(boolean value)
    If true, equality is needed in stereochemistry. ("All stereo info is exactly the same.") It mainly has an effect when the query has no stereo information: it only matches non-stereo target. Similarly, a query with a wiggly tetrahedral center will only match wiggly tetrahedral center, and not specific R and S configurations. If false, non-stereo query matches both nonstereo and stereo target.

    By default, this setting is false for all search types except for PERFECT search, where it is true. This setting has no effect if stereoSearch == false.

    Parameters:
    value - the exact-stereo setting
    See Also:
    setStereoSearch(boolean)

    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

    isOrderSensitiveSearch

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

    Returns:
    if hits are returned in every possible order
    See Also:
    setOrderSensitiveSearch(boolean)

    isStereoSearch

    public boolean isStereoSearch()
    If true, then chirality information is considered during searching, otherwise all stereo information is ignored. (Default: true)


    setStereoSearch

    public void setStereoSearch(boolean value)
    If true, then chirality information is considered during searching, otherwise all stereo information is ignored. (Default: true)


    isExactBondMatching

    public boolean isExactBondMatching()
    Indicates whether bond types should match exacly - looking for query bonds target.

    Returns:
    true if bond types must match exactly. Default value is false

    setExactBondMatching

    public void setExactBondMatching(boolean value)
    Specifies whether bond types should match exacly - 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 is false

    setVagueBondLevel

    public void setVagueBondLevel(int value)
    Option for less strict evaluation of query bonds (e.g. ambiguious aromaticity). Default value is VAGUE_BOND_LEVEL1

    Since:
    JChem 5.0
    See Also:
    getVagueBondLevel(), SearchConstants.VAGUE_BOND_LEVEL1, SearchConstants.VAGUE_BOND_LEVEL2, SearchConstants.VAGUE_BOND_LEVEL3, SearchConstants.VAGUE_BOND_LEVEL4

    getVagueBondLevel

    public int getVagueBondLevel()
    Getter for vague bond level.

    Returns:
    the current vague bond level
    Since:
    JChem 5.0
    See Also:
    setVagueBondLevel(int), SearchConstants.VAGUE_BOND_LEVEL1, SearchConstants.VAGUE_BOND_LEVEL2, SearchConstants.VAGUE_BOND_LEVEL3, SearchConstants.VAGUE_BOND_LEVEL4

    hasChangesInUserComparators

    public boolean hasChangesInUserComparators()
    Used in initializing searches. Returns true, if there is any changes in user-defined comparators. After initializing the search, the change flag is cleared.

    Returns:
    the value of the change flag of user-defined MolComparators.

    clearChangesInUserComparators

    public void clearChangesInUserComparators()
    Used in initializing searches. Clears the change flag of user-defined MolComparators.


    hasUserComparators

    public boolean hasUserComparators()
    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

    deleteUserComparator

    public void deleteUserComparator(MolComparator mc)

    deleteAllUserComparators

    public void deleteAllUserComparators()

    getUserComparators

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

    Returns:
    MolComparator[] of user-defined MolComparators

    isDirty

    public 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 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.

    Throws:
    java.lang.CloneNotSupportedException

    clonecopy

    public void clonecopy(SearchOptions other)
    Copies all parameters to the other object.


    deepCopy

    protected void deepCopy(SearchOptions toOther)
    Deprecated. since 5.0.2 Please use clonecopy(SearchOptions) instead

    Copies the complex data structures only from this to toOther.


    setTautomerSearch

    public void setTautomerSearch(boolean value)
    Sets if tautomers of the query should be enumerated for search. Default is false.

    Parameters:
    value - set to true to enable enumeration of the tautomers of the query for search. The default is false.
    See Also:
    SearchConstants.OPTION_TAUTOMER_SEARCH

    isTautomerSearch

    public boolean isTautomerSearch()
    Indicates if tautomers of the query should be enumerated for search. Default is false.

    Returns:
    wheather tautomers of the query are enumerated for search.
    See Also:
    setTautomerSearch(boolean), SearchConstants.OPTION_TAUTOMER_SEARCH

    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
  • exactStereoSearch
  • stereoSearch
  • keepQueryOrder
  • exactAtomMatching
  • exactQueryAtomMatching
  • exactRadicalMatching
  • exactIsotopeMatching
  • exactChargeMatching
  • doubleBondStereo
  • HCountMatching
  • t
  • implicitHMatching
  • vagueBond
  • charge
  • isotope
  • radical
  • valence
  • mix
  • markush
  • stereoModel
  • reactionUnpairedMap
  • 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
  • exactStereoSearch
  • stereoSearch
  • keepQueryOrder
  • doubleBondStereo
  • HCountMatching
  • t
  • implicitHMatching
  • reactionUnpairedMap
  • vagueBond
  • charge
  • isotope
  • radical
  • valence
  • mix
  • stereoModel
  • Returns:
    string value of the given option (true --> y, false --> n, except 'valence' 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 boolean isKeepQueryOrder()
    Returns:
    true if search rearranges query atoms for better search performance

    setKeepQueryOrder

    public void setKeepQueryOrder(boolean value)
    Parameters:
    value - true, if search should rearrange query atoms for better search performance

    isExactFragment

    public boolean isExactFragment()
    Returns:
    true if the query only matches to exact fragments of the target. (No heavy atoms outside the match and each query fragment corresponds to a target fragment.)

    setExactFragment

    public void setExactFragment(boolean value)
    Parameters:
    value - true, if the query should only match to exact fragments of the target. (No heavy atoms outside the match and each query fragment corresponds to a target fragment.)

    getIsotopeMatching

    public int getIsotopeMatching()
    Returns:
    Isotope searching behaviour. Default is 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

    setIsotopeMatching

    public void setIsotopeMatching(int value)
    Parameters:
    value - Specifies the isotope searching behaviour. Default is 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

    getChargeMatching

    public int getChargeMatching()
    Returns:
    Charge searching behaviour. Default is 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

    setChargeMatching

    public void setChargeMatching(int value)
    Parameters:
    value - Specifies the charge searching behaviour. Default is 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

    isValenceMatching

    public boolean isValenceMatching()
    Returns:
    true if valence is checked during search. Default value is true.

    setValenceMatching

    public void setValenceMatching(boolean value)
    Parameters:
    value - true, if valence should be checked during search. Default value is true.

    getRadicalMatching

    public int getRadicalMatching()
    Returns:
    Radical searching behaviour. Default is 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

    setRadicalMatching

    public void setRadicalMatching(int value)
    Parameters:
    value - Specifies the radical searching behaviour. Default is 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

    isMixSgroupMatching

    public boolean isMixSgroupMatching()
    Returns:
    true if considers COM, MIX and FOR sgroups during search Default value is true.

    setMixSgroupMatching

    public void setMixSgroupMatching(boolean value)
    Parameters:
    value - true, if COM, MIX and FOR sgroups should be considered during search. Default value is true).

    getStereoModel

    public int getStereoModel()
    Returns:
    Used stereo model. Default is STEREO_MODEL_LOCAL (it may change in the future!)
    See Also:
    SearchConstants.STEREO_MODEL_LOCAL, SearchConstants.STEREO_MODEL_COMPREHENSIVE, SearchConstants.STEREO_MODEL_GLOBAL, SearchConstants.STEREO_MODEL_DEFAULT

    setStereoModel

    public void setStereoModel(int value)
    Parameters:
    value - Specifies the used stereo model. Default is STEREO_MODEL_LOCAL (it may change in the future!)
    See Also:
    SearchConstants.STEREO_MODEL_LOCAL, SearchConstants.STEREO_MODEL_COMPREHENSIVE, SearchConstants.STEREO_MODEL_GLOBAL, SearchConstants.STEREO_MODEL_DEFAULT

    getImplicitHMatching

    public int getImplicitHMatching()
    Returns:
    Matching behaviour between explicit and implicit hydrogens. Default is 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

    setImplicitHMatching

    public void setImplicitHMatching(int value)
    Parameters:
    value - Specifies matching bahaviour between explicit and implicit hydrogens. Default is 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

    isReactionUnpairedMapMatching

    public boolean isReactionUnpairedMapMatching()
    Returns:
    true if in reaction search unpaired (orphan and widow) atom maps can match any atom map. Default value is true.

    setReactionUnpairedMapMatching

    public void setReactionUnpairedMapMatching(boolean value)
    Parameters:
    value - true, if in reaction search unpaired (orphan and widow) atom maps can match any atom map. Default value is true.

    setChemTermsFilter

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

    See Also:
    getChemTermsFilter()

    getChemTermsFilter

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

    See Also:
    setChemTermsFilter(String)

    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.
    See Also:
    getChemTermsFilterConfig()

    getChemTermsFilterConfig

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

    Returns:
    the configuration string
    See Also:
    setChemTermsFilterConfig(String)

    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

    Returns:
    a string in format "optionname1:optionvalue1 optionname2:optionvalue2 ..."
    See Also:
    setOptions(String), toList()

    toList

    public java.util.ArrayList 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()