Class SimilarityCalculator<T>

java.lang.Object
chemaxon.descriptors.SimilarityCalculator<T>

@PublicApi public abstract class SimilarityCalculator<T> extends Object
Descriptor similarity calculation can be performed using SimilarityCalculator. This class represents a metrics and subclasses must contain all parameters that may required. The SimilarityCalculatorFactory can be used to create an object of this type.
Since:
JChem 5.2.2.
  • Constructor Details

    • SimilarityCalculator

      public SimilarityCalculator()
  • Method Details

    • setQueryFingerprint

      public void setQueryFingerprint(T fp) throws SimilarityException
      Sets the query fingerprint
      Throws:
      SimilarityException
    • getSimilarity

      public abstract float getSimilarity(T fp) throws SimilarityException
      Gets the similarity value according to previously defined metric and its parameters. Query fingerprint must be previously setted once using setQueryFingerprint
      Parameters:
      fp - fingerprint type is defined by the subclass using generics.
      Returns:
      similariy score
      Throws:
      chemaxon.screen.SimilarityException - If query has not been setted before or target and query fingerprint has different array length.
      SimilarityException
    • getDissimilarity

      public abstract float getDissimilarity(T fp) throws SimilarityException
      Gets the dissimilarity value according to previously defined metric and its parameters. Query fingerprint must be previously setted once using setQueryFingerprint
      Parameters:
      fp - fingerprint type is defined by the subclass using generics
      Returns:
      similariy score
      Throws:
      chemaxon.screen.SimilarityException - If query has not been setted before or target and query fingerprint has different array length.
      SimilarityException