chemaxon.sss.search
Class MolSearchOptions

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

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

Class to encapsulate search parameters used by MolSearch.

Since:
5.0
Author:
pkovacs, Tamas Csizmazia, Vencel Bors
See Also:
Serialized Form

Field Summary
 
Fields inherited from class chemaxon.sss.search.SearchOptions
dirty, options, verbose
 
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
MolSearchOptions()
          Deprecated. As of release 5.5, replaced by MolSearchOptions(int)
MolSearchOptions(int searchType)
          Creates a MolSearchOptions object while setting different search options according to a predefined search type.
 
Method Summary
 java.lang.Object clone()
          Makes an identical copy of this SearchObject.
 void clonecopy(SearchOptions other)
          Copies parameters to other.
 void clonecopyOptions(SearchOptions other)
          Copies all search options except search type to other.
 int getHitIndexType()
          Returns the representation on which the hit indexes are given in case of Markush search.
 int getMarkushArom()
          Gets the Markush aromatic search behavior.
 java.lang.String getOption(java.lang.String name)
          Returns search option value in string format.
protected  java.lang.String[] getOptionNames()
          Gets the names for all search options.
 boolean isDistinctFirstAtomMatching()
          Get option ensuring that upon the findNext() call the first atom must be stepped as well.
 boolean isHitIncludesRNodes()
          Specifies the result format for R-group queries.
 boolean isMarkushEnabled()
          Specifies whether a target containing Markush features should be treated as a Markush library.
 boolean isQueryAbsoluteStereo()
          Returns whether the chiral flag is ignored or not for the query molecule.
 boolean isSubgraphSearch()
          Returns whether currently subgraph or complete graph matching is performed.
 boolean isSwitchOffAllProtectsForTDF()
          Specifies whether all protects are switched off during generic tautomer creation.
 boolean isTargetAbsoluteStereo()
          Returns whether the chiral flag is ignored or not for the target molecule.
 void setDistinctFirstAtomMatching(boolean b)
          Option ensuring that upon the findNext() call the first atom must be stepped as well.
 void setHitIncludesRNodes(boolean value)
          Set the result format for R-group queries.
 void setHitIndexType(int value)
          Set the representation to use for hit indexes in case of Markush search.
 void setMarkushArom(int value)
          Set handling of Markush aromatization information (ambiguous aromatic rings) during Markush search
 void setMarkushEnabled(boolean value)
          Sets whether targets containing Markush features should be treated as Markush libraries
 void setOption(java.lang.String name, java.lang.String value)
          Sets a search options.
 void setQueryAbsoluteStereo(boolean value)
          Sets whether the chiral flag should be ignored or not for the query molecule.
 void setSubgraphSearch(boolean value)
          Specifies whether subgraph or complete graph matching should be performed.
 void setSwitchOffAllProtectsForTDF(boolean value)
          Sets the switch off all protects for generic tautomer creation.
 void setTargetAbsoluteStereo(boolean value)
          Sets whether the chiral flag should be ignored or not for the target molecule.
 java.util.ArrayList<java.lang.String> toList()
          Get all search option names.
 
Methods inherited from class chemaxon.sss.search.SearchOptions
addUserComparator, areMonomersTransformed, clearChangesInUserComparators, deleteAllUserComparators, deleteUserComparator, getAllOptionsAsString, getAllOptionsAsString, getAttachedDataMatch, getAttachedDataPrefixes, getBoolean, getChargeMatching, getCheckSpHyb, getChemTermsFilter, getChemTermsFilterConfig, getCompleteHG, getDoubleBondStereoMatchingMode, getExactSpecialAtomMatching, getExhaustiveModeLimit, getHCountMatching, getHitOrdering, getHomologyBroadTranslation, getHomologyNarrowTranslation, getImplicitHMatching, getIsotopeMatching, getRadicalMatching, getRLigandEqualityCheck, getSearchType, getSearchType, getSSRType, getStereoModel, getStereoSearchType, getTautomerSearch, getTimeoutLimit, getTimeoutLimitMilliseconds, getUndefinedRAtom, getUserComparators, getVagueBondLevel, hasChangesInUserComparators, hasUserComparators, isBridgingRAllowed, isCopolymerMatching, isDirty, isEndgroupMatching, isExactBondMatching, isExactFragment, isExactQueryAtomMatching, isFullFragment, isIgnoreAlleneStereo, isIgnoreAxialStereo, isIgnoreCTExceptions, isIgnoreDoubleBondStereo, isIgnoreSynAntiStereo, isIgnoreTetrahedralStereo, isKeepQueryOrder, isMixSgroupMatching, isOrderSensitiveSearch, isPerfectSearchType, isPhaseShiftedMatching, isPolymerMatching, isQHomologyHandling, isReactionUnpairedMapMatching, isSuperstructureSearch, isTautomerDuplicateFiltering, isThrowExceptionOnTimeout, isUndefinedRAtomMatchingGroup, isValenceMatching, isVerbose, returnOptionString, setAttachedDataMatch, setAttachedDataPrefixes, setBridgingRAllowed, setChargeMatching, setCheckSpHyb, setChemTermsFilter, setChemTermsFilterConfig, setCompleteHG, setCopolymerMatching, setDirty, setDoubleBondStereoMatchingMode, setEndgroupMatching, setExactBondMatching, setExactFragment, setExactQueryAtomMatching, setExactSpecialAtomMatching, setExhaustiveModeLimit, setFullFragment, setHCountMatching, setHitOrdering, setHomologyBroadTranslation, setHomologyNarrowTranslation, setIgnoreAlleneStereo, setIgnoreAxialStereo, setIgnoreCTExceptions, setIgnoreDoubleBondStereo, setIgnoreSynAntiStereo, setIgnoreTetrahedralStereo, setImplicitHMatching, setIsotopeMatching, setKeepQueryOrder, setMixSgroupMatching, setMonomerTransform, setOptions, setOrderSensitiveSearch, setPhaseShiftedMatching, setPolymerMatching, setQHomologyHandling, setRadicalMatching, setReactionUnpairedMapMatching, setRLigandEqualityCheck, setSearchType, setSearchType0, setSSRType, setStereoModel, setStereoSearchType, setSuperstructureSearch, setTautomerDuplicateFiltering, setTautomerSearch, setThrowExceptionOnTimeout, setTimeoutLimit, setTimeoutLimitMilliseconds, setUndefinedRAtom, setVagueBondLevel, setValenceMatching, setVerbose, toString, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MolSearchOptions

@Deprecated
public MolSearchOptions()
Deprecated. As of release 5.5, replaced by MolSearchOptions(int)

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

See Also:
MolSearchOptions(int)

MolSearchOptions

public MolSearchOptions(int searchType)
Creates a MolSearchOptions 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

isQueryAbsoluteStereo

public boolean isQueryAbsoluteStereo()
Returns whether the chiral flag is ignored or not for the query molecule.

Returns:
true, if chiral centers in the query molecule are regarded as absolute stereo, ignoring the chiral flag. If the molecule contains any enhanced stereo labels, this flag has no effect.
Default value is true.
See Also:
setQueryAbsoluteStereo(boolean)

setQueryAbsoluteStereo

public void setQueryAbsoluteStereo(boolean value)
Sets whether the chiral flag should be ignored or not for the query molecule.

Parameters:
value - if true, chiral centers in the query molecule are regarded as absolute stereo, ignoring the chiral flag. If the molecule contains any enhanced stereo labels, this flag has no effect.
Default value is true.
See Also:
isQueryAbsoluteStereo()

isTargetAbsoluteStereo

public boolean isTargetAbsoluteStereo()
Returns whether the chiral flag is ignored or not for the target molecule.

Returns:
true, if chiral centers in the target molecule are regarded as absolute stereo, ignoring the chiral flag. If the molecule contains any enhanced stereo labels, this flag has no effect.
Default value is true
See Also:
setTargetAbsoluteStereo(boolean)

setTargetAbsoluteStereo

public void setTargetAbsoluteStereo(boolean value)
Sets whether the chiral flag should be ignored or not for the target molecule.

Parameters:
value - if true, chiral centers in the target molecule are regarded as absolute stereo, ignoring the chiral flag. If the molecule contains any enhanced stereo labels, this flag has no effect.
Default value is true.
See Also:
isTargetAbsoluteStereo()

isHitIncludesRNodes

public boolean isHitIncludesRNodes()
Specifies the result format for R-group queries. If false, the hits will contain only the matching atom indexes for non-R-group atoms in the root structure, in order (default). In this case the hit list contains less indexes, than the number of nodes in the root structure.
If set to true, the hit list will contain placeholders for the R-nodes with the value of SearchConstants.HIT_R, thus maintaining root indexes in the result.

Returns:
true if returned hit contains R-node indexes
Default value is true.
See Also:
setHitIncludesRNodes(boolean)

setHitIncludesRNodes

public void setHitIncludesRNodes(boolean value)
Set the result format for R-group queries.

Parameters:
value - if set to false, the hits will contain only the matching atom indexes for non-R-group atoms in the root structure, in order (default). In this case the hit list contains less indexes, than the number of nodes in the root structure.
If set to true, the hit list will contain placeholders for the R-nodes with the value of
Default value is true.
See Also:
isHitIncludesRNodes()

isSubgraphSearch

public boolean isSubgraphSearch()
Returns whether currently subgraph or complete graph matching is performed.

Overrides:
isSubgraphSearch in class SearchOptions
Returns:
true for substructure and full fragment search, false for full structure search and duplicate search. br>Default value is Depends on search type.
See Also:
setSubgraphSearch(boolean), MolSearchOptions(int), SearchConstants.SUBSTRUCTURE

setSubgraphSearch

public void setSubgraphSearch(boolean value)
Specifies whether subgraph or complete graph matching should be performed.
Internal use only. Used when it is important to keep all search option settings, but it is needed to search only for a substructure.

Overrides:
setSubgraphSearch in class SearchOptions
Parameters:
value - true for substructure and full fragment search, false for full structure search and duplicate search.
Default value is Depends on search type.
See Also:
isSubgraphSearch(), MolSearchOptions(int)

getHitIndexType

public int getHitIndexType()
Returns the representation on which the hit indexes are given in case of Markush search.

Returns:
of which representation the hit indexes are.
Default value is SearchConstants.MARKUSH_HIT_ORIGINAL.
See Also:
setHitIndexType(int), SearchConstants.MARKUSH_HIT_ORIGINAL, SearchConstants.MARKUSH_HIT_INNER

setHitIndexType

public void setHitIndexType(int value)
Set the representation to use for hit indexes in case of Markush search.

Parameters:
value - specifies the representation on which the hit indexes are given in case of Markush search.
Default value is SearchConstants.MARKUSH_HIT_ORIGINAL.
See Also:
SearchConstants.MARKUSH_HIT_ORIGINAL, SearchConstants.MARKUSH_HIT_INNER, getHitIndexType()

isMarkushEnabled

public boolean isMarkushEnabled()
Specifies whether a target containing Markush features should be treated as a Markush library.

Returns:
true, if a target should be treated as a Markush library when it contains Markush features
Default value is false.
Since:
5.0
See Also:
setMarkushEnabled(boolean)

setMarkushEnabled

public void setMarkushEnabled(boolean value)
Sets whether targets containing Markush features should be treated as Markush libraries

Parameters:
value - true, if a target containing Markush features should be treated as Markush library
Default value is false.
Since:
5.0
See Also:
isMarkushEnabled()

getMarkushArom

public int getMarkushArom()
Gets the Markush aromatic search behavior.

Returns:
behaviour of Markush aromatic search.
Default value is MARKUSH_AROM_FINAL_CHECK (consider Markush aromatization during Markush search and check the hit afterwards).
Since:
5.0
See Also:
SearchConstants.MARKUSH_AROM_FINAL_CHECK, SearchConstants.MARKUSH_AROM_NO_FINAL_CHECK, SearchConstants.MARKUSH_AROM_OFF, setMarkushArom(int)

setMarkushArom

public void setMarkushArom(int value)
Set handling of Markush aromatization information (ambiguous aromatic rings) during Markush search

Parameters:
value - the desired Markush aromatic search option
Default value is MARKUSH_AROM_FINAL_CHECK (consider Markush aromatization during Markush search and check the hit afterwards).
Since:
5.0
See Also:
SearchConstants.MARKUSH_AROM_FINAL_CHECK, SearchConstants.MARKUSH_AROM_NO_FINAL_CHECK, SearchConstants.MARKUSH_AROM_OFF, getMarkushArom()

setDistinctFirstAtomMatching

public void setDistinctFirstAtomMatching(boolean b)
Option ensuring that upon the findNext() call the first atom must be stepped as well. Option is considered only in case os searching a recursive SMARTS query.
The search-internal first atom is ensured to be the original first atom only if the SearchOptions.setKeepQueryOrder(boolean) is set to true. This must be set to true, or the first atom can be arbitrary atom.

Parameters:
b - if true the first atom of the query must match on different target atoms in findAll and findNext searches.
Default value is false.
See Also:
isDistinctFirstAtomMatching()

isDistinctFirstAtomMatching

public boolean isDistinctFirstAtomMatching()
Get option ensuring that upon the findNext() call the first atom must be stepped as well. Option is considered only in case os searching a recursive SMARTS query.
The search-internal first atom is ensured to be the original first atom only if the SearchOptions.setKeepQueryOrder(boolean) is set to true. This must be set to true, or the first atom can be arbitrary atom.

Returns:
true if first atom should be different
Default value is false.
See Also:
setDistinctFirstAtomMatching(boolean)

setSwitchOffAllProtectsForTDF

public void setSwitchOffAllProtectsForTDF(boolean value)
Sets the switch off all protects for generic tautomer creation. Considered only when tautomer search is on.

Parameters:
value - true if all protects should be disabled during generic tautomer creation. Default is false.
See Also:
isSwitchOffAllProtectsForTDF()

isSwitchOffAllProtectsForTDF

public final boolean isSwitchOffAllProtectsForTDF()
Specifies whether all protects are switched off during generic tautomer creation. Considered only when tautomer search is on.

Returns:
true if protect features should be disabled during generic tautomer creation
Default is false.
See Also:
setSwitchOffAllProtectsForTDF(boolean)

setOption

public void setOption(java.lang.String name,
                      java.lang.String value)
Sets a search options.

Overrides:
setOption in class SearchOptions
Parameters:
name - Option name to be set. Useable options:
  • queryAbsoluteStereo
  • targetAbsoluteStereo
  • markush
  • hitIndexType
  • distinctFirstAtomMatching
  • switchOffAllProtectsForTDF
  • value - String value of option to be set.
    See Also:
    SearchOptions.setOption(String, String), getOption(String)

    getOption

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

    Overrides:
    getOption in class SearchOptions
    Parameters:
    name - Option name to get. Useable options:
  • queryAbsoluteStereo
  • targetAbsoluteStereo
  • markush
  • hitIndexType
  • distinctFirstAtomMatching
  • switchOffAllProtectsForTDF
  • Returns:
    String value of option
    See Also:
    SearchOptions.getOption(String), setOption(String, String)

    clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException
    Description copied from class: SearchOptions
    Makes an identical copy of this SearchObject.

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

    clonecopy

    public void clonecopy(SearchOptions other)
    Copies parameters to other. It copies
    - all parameters if other is a MolSearchOptions object
    - only the parameters defined in SearchOptions if it is a SearchOptions or JchemSearchOptions object

    Overrides:
    clonecopy in class SearchOptions
    Parameters:
    other - search option to overwrite.

    clonecopyOptions

    public void clonecopyOptions(SearchOptions other)
    Description copied from class: SearchOptions
    Copies all search options except search type to other.

    Overrides:
    clonecopyOptions in class SearchOptions
    Parameters:
    other - search option object to overwrite

    toList

    public java.util.ArrayList<java.lang.String> toList()
    Get all search option names.

    Overrides:
    toList in class SearchOptions
    Returns:
    a list containing all search option names
    See Also:
    SearchOptions.setOptions(String), SearchOptions.toString()

    getOptionNames

    protected java.lang.String[] getOptionNames()
    Gets the names for all search options.

    Overrides:
    getOptionNames in class SearchOptions
    Returns:
    array containing all search option names.