Class ShapeDescriptor

  • All Implemented Interfaces:
    chemaxon.license.Licensable, Cloneable

    @PublicAPI
    @Beta
    public class ShapeDescriptor
    extends MolecularDescriptor
    implements chemaxon.license.Licensable
    Shape descriptor implements a 3D alignment based similarity calculation. At descriptor generation a specific molecule representation is stored and additional data is calculated. The similarity calculation itself compares two of such representations using (flexible) 3D structural overlay.
    • Constructor Detail

      • ShapeDescriptor

        public ShapeDescriptor()
      • ShapeDescriptor

        public ShapeDescriptor​(ShapeParameters params)
        Creates a new instance of ShapeDescriptor according to the parameters given.
        Parameters:
        params - parameter settings
      • ShapeDescriptor

        public ShapeDescriptor​(String params)
        Creates a new instance of ShapeDescriptor according to the parameters given.s
        Parameters:
        params - parameter settings
      • ShapeDescriptor

        public ShapeDescriptor​(ShapeDescriptor sh)
        Copy constructor. An identical copy of the ShapeDescriptor passed is created. The old and the new instances share the same ShapeDescriptorParameters object.
        Parameters:
        sh - fingerprint to be copied
    • Method Detail

      • getDefaultThreshold

        public float getDefaultThreshold​(int metricIndex)
        Gets a metric dependent default threshold value. Ideally, this value should be based on statistics, though the actual value is not too critical, since these are only used in user interfaces to simplify the use of applications for beginners. Do not use this method. Required only for the compatibility with the screening framework.
        Overrides:
        getDefaultThreshold in class MolecularDescriptor
        Parameters:
        metricIndex - index of a parameterized metric
      • getDefaultDissimilarityMetricThresholds

        public float[] getDefaultDissimilarityMetricThresholds()
        Gets the default dissimilarity threshold values for all dissimilarity metrics defined. Do not use this method. Required only for the compatibility with the screening framework.
        Specified by:
        getDefaultDissimilarityMetricThresholds in class MolecularDescriptor
        Returns:
        array of dissimilarity threshold values
      • setLicenseEnvironment

        public void setLicenseEnvironment​(String env)
        Specified by:
        setLicenseEnvironment in interface chemaxon.license.Licensable
      • isLicensed

        public boolean isLicensed()
        Specified by:
        isLicensed in interface chemaxon.license.Licensable
      • setShapeData

        public void setShapeData​(chemaxon.marvin.alignment.ShapeData shapeData)
      • getName

        public String getName()
        Gets the name of the ShapeDescriptor fingerprint object. This name is not the same as the class name: nicer, and more meaningful for end-users too.
        Overrides:
        getName in class MolecularDescriptor
        Returns:
        the nice, external name for ShapeDescriptor class objects
      • getShortName

        public String getShortName()
        Gets the short name of the fingerprint.
        Overrides:
        getShortName in class MolecularDescriptor
        Returns:
        the short name used in text outputs (tables etc.)
      • getParametersClassName

        public String getParametersClassName()
        Gets the name of the parameters class corresponding to the descriptor.
        Overrides:
        getParametersClassName in class MolecularDescriptor
        Returns:
        the name of the parameters class
      • clear

        public void clear()
        Clears the fingerprint, all values are set to zero.
      • toData

        public byte[] toData()
        Description copied from class: MolecularDescriptor
        Converts the internal (memory) representation of a MolecularDescriptor instance into an external format that can be stored in a database.
        Specified by:
        toData in class MolecularDescriptor
        Returns:
        binary representation of the descriptor
      • fromData

        public void fromData​(byte[] dbRepr)
        Description copied from class: MolecularDescriptor
        Builds a MolecularDescriptor object from its external (database) representation.
        Specified by:
        fromData in class MolecularDescriptor
        Parameters:
        dbRepr - an array generated by toData()
      • toString

        public String toString()
        Description copied from class: MolecularDescriptor
        Creates the string representation of a MolecularDescriptor object. This string value is stored in SDfiles, though the use of this string is not limited to this purpose. Typically, this string is compact, for instance zero values are not necessarily printed.
        Specified by:
        toString in class MolecularDescriptor
        Returns:
        a formatted string of the descriptor
      • toDecimalString

        public String toDecimalString()
        Description copied from class: MolecularDescriptor
        Creates the string representation of a MolecularDescriptor object. This string value contains all values of the descriptor (including all zeros), values are separated by tabs.
        Specified by:
        toDecimalString in class MolecularDescriptor
        Returns:
        a formatted string of the descriptor
      • toFloatArray

        public float[] toFloatArray()
        Description copied from class: MolecularDescriptor
        Creates the float array representation of a MolecularDescriptor object. This array contains all values of the descriptor (including all zeros) in the elements of the array.
        Specified by:
        toFloatArray in class MolecularDescriptor
        Returns:
        a formatted float array of the descriptor
      • fromFloatArray

        public void fromFloatArray​(float[] descr)
        Description copied from class: MolecularDescriptor
        Builds a molecular descriptor from its float array representation. Typically used when a hypothesis is created.
        Specified by:
        fromFloatArray in class MolecularDescriptor
        Parameters:
        descr - descriptor represented in a float array (e.g. generated by toFloatArray())
      • getDissimilarityMetrics

        public String[] getDissimilarityMetrics()
        Description copied from class: MolecularDescriptor
        Gets the dissimilarity metric names in an array.
        This method must be overloaded by derived classes in order to get the metrics array depending on the dynamic type. (This is needed because the metrics[] array is a class variable, but class variables are shared among all derived classes.)
        Specified by:
        getDissimilarityMetrics in class MolecularDescriptor
        Returns:
        the metrics array
      • getDissimilarity

        public float getDissimilarity​(MolecularDescriptor other)
        Description copied from class: MolecularDescriptor
        Calculates the dissimilarity ratio between two MolecularDescriptor objects using the default metric. Default metric is set in the corresponding MDParameters object. In the case of asymmetric distances swapping the two descriptors can make a big difference.
        Specified by:
        getDissimilarity in class MolecularDescriptor
        Parameters:
        other - the query descriptor with initialized Similarity3d object.
        Returns:
        the dissimilarity
      • getShapeSimilarity

        public float getShapeSimilarity​(MolecularDescriptor other)
        Parameters:
        other - the query descriptor with initialized Similarity3d obj.
        Returns:
        the shape similarity (s) where 0\<= s \<=1
      • getAliasNames

        public List<String> getAliasNames()