Package com.actelion.research.chem
Class StructureSearchSpecification
- java.lang.Object
-
- com.actelion.research.chem.StructureSearchSpecification
-
- All Implemented Interfaces:
java.io.Serializable
public class StructureSearchSpecification extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
MODE_LARGEST_FRAGMENT_ONLY
static int
TYPE_BACKBONE_NO_STEREO
static int
TYPE_EXACT_NO_STEREO
static int
TYPE_EXACT_STRICT
static int
TYPE_NO_STRUCTURE
static int
TYPE_SIMILARITY
static int
TYPE_SUBSTRUCTURE
static int
TYPE_TAUTOMER
static int
TYPE_TAUTOMER_NO_STEREO
-
Constructor Summary
Constructors Constructor Description StructureSearchSpecification(int searchType, byte[][] idcode, java.lang.Object[] descriptor, java.lang.String descriptorShortName, float similarityThreshold)
Creates a complete specification for a substructure or similarity search with one or more query fragments or molecules.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getDescriptor(int index)
Depending on the mode isLargestFragmentOnly() the descriptor is expected to be represent the whole structure or the largest fragment.java.lang.String
getDescriptorShortName()
byte[]
getIDCode(int index)
Returns the (or one of the) query structures encodes as idcode.float
getSimilarityThreshold()
int
getStructureCount()
Returns the search type as integer including mode flags.boolean
isBackboneSearch()
A backbone search is a hash code comparison from encoding stereo and unsaturation depleted structures.boolean
isExactSearch()
An exact search is a comparison of idcodes of standardized molecules with full stereo features.boolean
isLargestFragmentOnly()
This setting is relevant for all search types except the substructure search.boolean
isNoStereoSearch()
A noStereo search is a hash code comparison from encoding stereo depleted structures.boolean
isNoStereoTautomerSearch()
A no-stereo-tautomer search is a hash code comparison from encoding stereo depleted generic tautomer structures.boolean
isNoStructureSearch()
boolean
isSimilaritySearch()
boolean
isSubstructureSearch()
boolean
isTautomerSearch()
A tautomer search is a hash code comparison from encoding generic tautomer structures.void
removeDescriptors()
void
setLargestFragmentOnly(boolean b)
java.lang.String
toString()
java.lang.String
validate()
Checks, whether this specification is correctly defining a search.
-
-
-
Field Detail
-
TYPE_NO_STRUCTURE
public static final int TYPE_NO_STRUCTURE
- See Also:
- Constant Field Values
-
TYPE_SUBSTRUCTURE
public static final int TYPE_SUBSTRUCTURE
- See Also:
- Constant Field Values
-
TYPE_SIMILARITY
public static final int TYPE_SIMILARITY
- See Also:
- Constant Field Values
-
TYPE_EXACT_STRICT
public static final int TYPE_EXACT_STRICT
- See Also:
- Constant Field Values
-
TYPE_EXACT_NO_STEREO
public static final int TYPE_EXACT_NO_STEREO
- See Also:
- Constant Field Values
-
TYPE_TAUTOMER
public static final int TYPE_TAUTOMER
- See Also:
- Constant Field Values
-
TYPE_TAUTOMER_NO_STEREO
public static final int TYPE_TAUTOMER_NO_STEREO
- See Also:
- Constant Field Values
-
TYPE_BACKBONE_NO_STEREO
public static final int TYPE_BACKBONE_NO_STEREO
- See Also:
- Constant Field Values
-
MODE_LARGEST_FRAGMENT_ONLY
public static final int MODE_LARGEST_FRAGMENT_ONLY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StructureSearchSpecification
public StructureSearchSpecification(int searchType, byte[][] idcode, java.lang.Object[] descriptor, java.lang.String descriptorShortName, float similarityThreshold)
Creates a complete specification for a substructure or similarity search with one or more query fragments or molecules.- Parameters:
searchType
- one of TYPE_... + optionally MODE_...idcode
- list of query fragments/moleculesdescriptor
- null or list descriptors (in case of substructure search this should be the long FFP512)descriptorShortName
- in case of TYPE_SIMILARITYsimilarityThreshold
- in case of TYPE_SIMILARITY
-
-
Method Detail
-
getStructureCount
public int getStructureCount()
Returns the search type as integer including mode flags. In case of TYPE_SIMILARITY use getDescriptorShortName() and getSimilarityThreshold() for a full search specification.- Returns:
- one of TYPE_... and possibly MODE_LARGEST_FRAGMENT_ONLY public int getSearchType() { return mSearchType; }
-
getIDCode
public byte[] getIDCode(int index)
Returns the (or one of the) query structures encodes as idcode.- Parameters:
index
-- Returns:
-
getDescriptor
public java.lang.Object getDescriptor(int index)
Depending on the mode isLargestFragmentOnly() the descriptor is expected to be represent the whole structure or the largest fragment.- Parameters:
index
-- Returns:
-
isSimilaritySearch
public boolean isSimilaritySearch()
-
isNoStructureSearch
public boolean isNoStructureSearch()
- Returns:
- whether this search does not include a structure search component is uses exclusively external criteria
-
isSubstructureSearch
public boolean isSubstructureSearch()
-
isExactSearch
public boolean isExactSearch()
An exact search is a comparison of idcodes of standardized molecules with full stereo features.- Returns:
-
isNoStereoSearch
public boolean isNoStereoSearch()
A noStereo search is a hash code comparison from encoding stereo depleted structures.- Returns:
-
isTautomerSearch
public boolean isTautomerSearch()
A tautomer search is a hash code comparison from encoding generic tautomer structures.- Returns:
-
isNoStereoTautomerSearch
public boolean isNoStereoTautomerSearch()
A no-stereo-tautomer search is a hash code comparison from encoding stereo depleted generic tautomer structures.- Returns:
-
isBackboneSearch
public boolean isBackboneSearch()
A backbone search is a hash code comparison from encoding stereo and unsaturation depleted structures.- Returns:
-
isLargestFragmentOnly
public boolean isLargestFragmentOnly()
This setting is relevant for all search types except the substructure search.- Returns:
-
removeDescriptors
public void removeDescriptors()
-
setLargestFragmentOnly
public void setLargestFragmentOnly(boolean b)
-
getDescriptorShortName
public java.lang.String getDescriptorShortName()
-
getSimilarityThreshold
public float getSimilarityThreshold()
-
validate
public java.lang.String validate()
Checks, whether this specification is correctly defining a search. If something is missing or inconsistent, an error message describing the problem is returned.- Returns:
- null or error message
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-