Package schrodinger :: Package application :: Package canvas :: Module clustergui :: Class CanvasFingerprintClusterGUI
[hide private]
[frames] | no frames]

Class CanvasFingerprintClusterGUI

                      object --+    
                               |    
cluster.CanvasFingerprintCluster --+
                                   |
                                  CanvasFingerprintClusterGUI

A subclass of the canvas fingerprint clusterer which is to be used from a program with a TKInter interface. This class has methods for creating a component which displays the clustering linkage options

Instance Methods [hide private]
 
__init__(self, logger)
Initialize the instance of the cluster class
QWidget
getTab(self, command=None, linkage=True, cluster=True, results=True, apply=True, msg=None)
Creates a tab that can be used in a QTabWidget for calculating clustering.
swidgets.SGroupBox (QGroupBox)
getClusterGUI(self, command, msg=None)
Returns a GUI Group Box which displays the Cluster Calculation button
swidgets.SGroupBox (QGroupBox)
getLinkageGUI(self)
Returns a GUI component which displays the cluster linkage options
 
getResultsGUI(self)
Returns a GUI which displays the clustering results in terms of the strain and best number of clusters and provides access to plots for the dendrogram and cluster statistics.
 
setNumClusters(self, num)
Set the number of clusters in the Apply Clustering Section
 
getApplyGUI(self)
Return the controls used to apply the clustering to selected entries in the project table
 
doApplyClustering(self)
Once the clustering has been performed for the selected entries this method will apply it
 
updateResults(self)
Once clustering has been performed this method should be called to update the clustering results GUI:
 
close(self)
Perform the tasks necessary when closing the panel.
 
showStatisticsPlot(self)
Display a plot of clustering statistics
 
showDendrogramPlot(self)
Display the clustering dendgoram
 
showDistanceMatrixPlot(self)
Display the distance matrix
 
setDistanceMatrixCallback(self, cb)
Set a callback to be called when the mouse is clicked in the distance matrix plot.

Inherited from cluster.CanvasFingerprintCluster: __del__, clusterDM, clusterFP, debug, generateDM, getAverageDistanceFromCentroid, getBestNumberOfClusters, getClusterContents, getClusterOrderMap, getClusterTime, getClusterVariance, getClusteringMap, getCurrentLinkage, getDendrogramData, getDescription, getDistanceMatrixFile, getDistanceToCentroid, getGroupTime, getIsFarthestFromCentroid, getIsNearestToCentroid, getKelleyPenaltyList, getMatrixTime, getMaxDistanceFromCentroid, getMergeDistanceList, getNumberOfClustersList, getRSquaredList, getSemiPartialRSquaredList, getSeparationRatioList, group, setLinkage

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

Class Variables [hide private]
  CREATE_RADIOBUTTON_NAMES = ['Duplicate entries to a new group ...
  DUPLICATE = 0
hash(x)
  ENTRY = 3
hash(x)
  MOVE = 1
  REPRESENTATIVE = 2

Inherited from cluster.CanvasFingerprintCluster: LINKAGE_TYPES

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, logger)
(Constructor)

 

Initialize the instance of the cluster class

Overrides: object.__init__
(inherited documentation)

getTab(self, command=None, linkage=True, cluster=True, results=True, apply=True, msg=None)

 

Creates a tab that can be used in a QTabWidget for calculating clustering. The tab has the following sections: Linkage, Cluster, Clustering Results, Apply Clustering

Parameters:
  • command (callable object) - function to be called when the Calculate Clustering button is pressed.
  • linkage (bool) - True if this section should be included (default)
  • cluster (bool) - True if this section should be included (default)
  • results (bool) - True if this section should be included (default)
  • apply (bool) - True if this section should be included (default)
  • msg (str) - The message that appears right above the Calculate Clustering button.
Returns: QWidget
widget containing the clustering gui

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

getClusterGUI(self, command, msg=None)

 

Returns a GUI Group Box which displays the Cluster Calculation button

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

getLinkageGUI(self)

 

Returns a GUI component which displays the cluster linkage options

Returns: swidgets.SGroupBox (QGroupBox)
groupbox containing the linkage widgets

getResultsGUI(self)

 

Returns a GUI which displays the clustering results in terms of the strain and best number of clusters and provides access to plots for the dendrogram and cluster statistics. This will be deactivated until the update() method is called at which time it will be activated and refreshed with the results from the most recent clustering

close(self)

 

Perform the tasks necessary when closing the panel. This will include closing all the open plot windows

setDistanceMatrixCallback(self, cb)

 

Set a callback to be called when the mouse is clicked in the distance matrix plot. This should expect to receive two entry IDs


Class Variable Details [hide private]

CREATE_RADIOBUTTON_NAMES

Value:
['Duplicate entries to a new group for each cluster',
 'Move entries to a new group for each cluster',
 'A group containing the structures nearest the centroid in each clust\
er',
 'Cluster index and size properties for each entry']