Class StructureSearchSpecification

  • All Implemented Interfaces:
    java.io.Serializable

    public class StructureSearchSpecification
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • 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/molecules
        descriptor - null or list descriptors (in case of substructure search this should be the long FFP512)
        descriptorShortName - in case of TYPE_SIMILARITY
        similarityThreshold - 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 class java.lang.Object