Package schrodinger :: Package application :: Package canvas :: Module similaritygui :: Class CanvasFingerprintSimilarityGUI
[hide private]
[frames] | no frames]

Class CanvasFingerprintSimilarityGUI

                            object --+    
                                     |    
similarity.CanvasFingerprintSimilarity --+
                                         |
                                        CanvasFingerprintSimilarityGUI

A subclass of the canvas fingerprint similarity manager which is to be used from a program with a TKInter interface. This class has methods for creating a component which displays all the similarity metrics options and takes care of managing the internal state

Instance Methods [hide private]
 
getGUI(self)
Returns a GUI component which displays the similarity options
 
setMetricCB(self, metric)
A callback for setting the similarity metric - takes care of enabling the alpha and beta boxes.
 
update(self)
Update the internal state to reflect the GUI (used mainly for alpha and beta values
swidgets.SGroupBox (QGroupBox object)
getCalculationGUI(self, command, msg=None)
Create the GUI section that has the calculate button
QWidget
getTab(self, command=None, settings=True, calculation=True, msg=None)
Creates a tab that can be used in a QTabWidget for calculating similarity.
bool
sortEntryCheck(self)
Check if entries should be sorted or not (based on the toggle state of the Sort selected entries checkbox on the Similarity Tab.

Inherited from similarity.CanvasFingerprintSimilarity: __init__, calculateSimilarity, debug, getAlpha, getBeta, getDescription, getMetric, getMetricStyle, setAlpha, setBeta, setMetric, simBuser, simCosine, simDice, simDixon, simEuclidean, simHamann, simHamming, simKulczynski, simMatching, simMcConnaughey, simMinMax, simModifiedTanimoto, simPatternDifference, simPearson, simPetke, simRogersTanimoto, simShape, simSimpson, simSize, simSoergel, simTanimoto, simTversky, simVariance, simYule

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

Class Variables [hide private]

Inherited from similarity.CanvasFingerprintSimilarity: SIMILARITY_METRICS

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setMetricCB(self, metric)

 

A callback for setting the similarity metric - takes care of enabling the alpha and beta boxes. Also makes sure that the program is ready to calculate similarity via the chosen metric.

Parameters:
  • metric (str) - the name of the similarity metric to use

getCalculationGUI(self, command, msg=None)

 

Create the GUI section that has the calculate button

Parameters:
  • command (callable object) - function to be called when the Calculate Similarity button is pressed.
  • msg (str) - The message that appears right above the button
Returns: swidgets.SGroupBox (QGroupBox object)
a groupbox with the calculation widgets

getTab(self, command=None, settings=True, calculation=True, msg=None)

 

Creates a tab that can be used in a QTabWidget for calculating similarity. The tab has a CanvasFingerprintSimilarityGUI section and a Similarity Calculation section (set up here).

Parameters:
  • command (callable object) - function to be called when the Calculate Similarity button is pressed.
  • settings (bool) - True if the settings section is included, False if not
  • calculation (bool) - True if the calculation section is included, False if not
  • msg (str) - The message that appears right above the button in the Calculation section
Returns: QWidget
widget containing the clustering gui

Usage: QTabWidget.addTab(fp_sim.getTab(doSimilarity))

sortEntryCheck(self)

 

Check if entries should be sorted or not (based on the toggle state of the Sort selected entries checkbox on the Similarity Tab.

Returns: bool
True if the Sort checkbox is checked, False if it is not or it doesn't exist