Package schrodinger :: Package application :: Package canvas :: Module similarity :: Class CanvasFingerprintSimilarity
[hide private]
[frames] | no frames]

Class CanvasFingerprintSimilarity

object --+
         |
        CanvasFingerprintSimilarity
Known Subclasses:

A class which encapsulates the Canvas fingerprint similarity tools. This includes recording and implementing the available similarity metrics. Currently the metrics are implemented at the Python level as this demonstrates how the fingerprint manipulations are performed however ultimately these will be replaced with wrappers to the underlying Canvaslibs tools which should be more efficient

Instance Methods [hide private]
 
__init__(self, logger)
Initialize the similarity class
 
debug(self, output)
Wrapper for debug logging, just to simplify logging
 
getDescription(self)
Returns a string representing a summary of the current similarity settings
 
setMetric(self, metric_name)
Set the current metric based on the metric name
 
getMetric(self)
Returns the currently set metric
 
calculateSimilarity(self, fp1, fp2)
Calculate the similarity between the two fingerprints and return the value.
 
setAlpha(self, alpha)
Set the value of Alpha as used in the tversky similarity
 
setBeta(self, beta)
Set the value of Alpha as used in the tversky similarity
 
getAlpha(self)
Get the value of Alpha as used in the tversky similarity
 
getBeta(self)
Get the value of Alpha as used in the tversky similarity
 
getMetricStyle(self)
Return a value corresponding to the current metric style.
 
_getABC(self, fp1, fp2)
Most similarity methods use three quantities calculated from the input fingerprints.
 
simHamming(self, fp1, fp2)
 
simModifiedTanimoto(self, fp1, fp2)
 
simPatternDifference(self, fp1, fp2)
 
simShape(self, fp1, fp2)
 
simSize(self, fp1, fp2)
 
simVariance(self, fp1, fp2)
 
simEuclidean(self, fp1, fp2)
 
simTanimoto(self, fp1, fp2)
 
simTversky(self, fp1, fp2)
 
simSoergel(self, fp1, fp2)
 
simMcConnaughey(self, fp1, fp2)
 
simDice(self, fp1, fp2)
 
simCosine(self, fp1, fp2)
 
simSimpson(self, fp1, fp2)
 
simPetke(self, fp1, fp2)
 
simKulczynski(self, fp1, fp2)
 
simBuser(self, fp1, fp2)
 
simHamann(self, fp1, fp2)
 
simMatching(self, fp1, fp2)
 
simPearson(self, fp1, fp2)
 
simRogersTanimoto(self, fp1, fp2)
 
simYule(self, fp1, fp2)
 
simDixon(self, fp1, fp2)
 
simMinMax(self, fp1, fp2)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  SIMILARITY_METRICS = ['Tanimoto', 'Modified Tanimoto', 'Hammin...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, logger)
(Constructor)

 

Initialize the similarity class

Overrides: object.__init__

calculateSimilarity(self, fp1, fp2)

 

Calculate the similarity between the two fingerprints and return the value. The similarity is calculated using the similarity method which is current for this object (as set by setMetric())

getMetricStyle(self)

 

Return a value corresponding to the current metric style. This is used in difference matrix construction as part of clustering

_getABC(self, fp1, fp2)

 

Most similarity methods use three quantities calculated from the input fingerprints. This private method calculates these so as to avoid duplicated code everywhere. The a, b and c are returned as a tuple of floats


Class Variable Details [hide private]

SIMILARITY_METRICS

Value:
['Tanimoto',
 'Modified Tanimoto',
 'Hamming',
 'Soergel',
 'McConnaughey',
 'Dice',
 'Cosine',
 'Simpson',
...