schrodinger.application.canvas.clustergui module

Canvas clustering functionality that uses GUI libraries

There are classes to perform custering and to support graphical interfaces to the clustering options.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.canvas.clustergui.CanvasFingerprintClusterGUI(logger)[source]

Bases: schrodinger.application.canvas.cluster.CanvasFingerprintCluster

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

CREATE_RADIOBUTTON_NAMES = ['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 cluster', 'Cluster index and size properties for each entry']
DUPLICATE = 0
MOVE = 1
REPRESENTATIVE = 2
ENTRY = 3
__init__(logger)[source]

Initialize the instance of the cluster class

getTab(command=None, linkage=True, cluster=True, results=True, apply=True, msg=None)[source]

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.

Return type

QWidget

Returns

widget containing the clustering gui

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

getClusterGUI(command, msg=None)[source]

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.

Return type

swidgets.SGroupBox (QGroupBox)

Returns

groupbox containing the cluster widgets

getLinkageGUI()[source]

Returns a GUI component which displays the cluster linkage options

Return type

swidgets.SGroupBox (QGroupBox)

Returns

groupbox containing the linkage widgets

getResultsGUI()[source]

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

setNumClusters(num)[source]

Set the number of clusters in the Apply Clustering Section

getApplyGUI()[source]

Return the controls used to apply the clustering to selected entries in the project table

doApplyClustering()[source]

Once the clustering has been performed for the selected entries this method will apply it

updateResults()[source]

Once clustering has been performed this method should be called to update the clustering results GUI:

close()[source]

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

showStatisticsPlot()[source]

Display a plot of clustering statistics

showDendrogramPlot()[source]

Display the clustering dendgoram

showDistanceMatrixPlot()[source]

Display the distance matrix

setDistanceMatrixCallback(cb)[source]

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

getClusteringStatistics(id)[source]
LINKAGE_TYPES = ['Single', 'Complete', 'Average', 'Centroid', 'McQuitty', 'Ward', 'Weighted Centroid', 'Flexible Beta', 'Schrodinger']
clusterDM(dm_file_name)

Cluster the distance matrix file given in dm_file_name, using similarity settings encapsulated in dp_sim. The value returned is the cluster strain. The dm_file_name should point to a CSV file containing the matrix

clusterFP(fp_file, fp_gen, fp_sim)

Cluster the fingerprints contained in fp_file. The bitsize will be taken from the CanvasFingerpintGenerator(). The similarity metric will be taken from the CanvasFingerprintSimilarity object fp_sim This function returns the ‘strain’ reported by the clustering

debug(output)

Wrapper for debug logging, just to simplify logging

generateDM(dm_file_name, fp_file, fp_gen, fp_sim)

Generate a distance matrix of the specified filename from the finger print file fp_file. The fp_gen and fp_sim objects encapsulate the current fingerprint and similarity settings

getAverageDistanceFromCentroid(item)

For a given item in the most recent cluster grouping return the average distance to the centroid for any item in the cluster

getBestNumberOfClusters()

The cluster statistics file contains information about each clustering level. This function returns the number of clusters at which the Kelley function has a minimum

getClusterContents()

Once grouping has been done this method may be called to return a dictionary where the keys represent the cluster number and the values are a list of ID (usually position in the file or entry ids)

getClusterOrderMap(num_clusters)

Returns a dictionary where the keys are the item labels and the values represent the index it would have in the grouping which places the items in cluster order

getClusterTime()

Returns the time required for clustering

getClusterVariance(item)

For a given item return the variance of the cluster which that item belongs to.

getClusteringMap()

Once grouping has been done this method may be called to return a dictionary where the keys represent the original fingerprint IDs (usually the position of the structure in the file or the entry ID) and the values are the cluster this structure belongs to

getCurrentLinkage()

Returns the current linkage definition

getDendrogramData()

Returns a tuple with 1) a list of line positions, each in the form [x1,x2][y1,y2] each one of which defines a line segment to be plotted in a dendrogram 2) a list of x-axis tick positions 3) a list of x-axis tick labels

getDescription()

Returns a string representing a summary of the current linkage settings

getDistanceMatrixFile()

Returns the name of the distance matrix file used in the most recent clustering

getDistanceToCentroid(item)

For a given item in the most recent cluster grouping return the distance to the centroid of the cluster which contains this item

getGroupTime()

Returns the time required for group creation

getIsFarthestFromCentroid(item)

For a given item in the most recent cluster grouping return a boolean value which indicates whether the item is nearest the centroid

getIsNearestToCentroid(item)

For a given item in the most recent cluster grouping return a boolean value which indicates whether the item is nearest the centroid

getKelleyPenaltyList()

Returns the Kelley Penalty value at each clustering level

getMatrixTime()

Returns the time required for distance matrix generation

getMaxDistanceFromCentroid(item)

For a given item in the most recent cluster grouping return the maximum distance to the centroid for any item in the cluster

getMergeDistanceList()

Returns the merge distance value at each clustering level

getNumberOfClustersList()

Returns the number of clusters at each level

getRSquaredList()

Returns the r-squared value at each clustering level

getSemiPartialRSquaredList()

Returns the semi-partial R-squared value at each clustering level

getSeparationRatioList()

Returns the separation ratio - calculated from the merge distance of

group(num_clusters)

Perform a grouping operation based on an existing clustering run. If the clustering has not actually been performed yet then an exception will be raised.

setLinkage(linkage)

Set the current linkage based on the linkage name

class schrodinger.application.canvas.clustergui.ClusterStatisticsPlotDialog(canvas_cluster)[source]

Bases: schrodinger.ui.qt.appframework.AppFramework

A class which displays a dialog with a plot of the statistics for the most recent clustering

num_clusters_selected
PLOT_TYPES = ['Kelley Penalty', 'R-Squared', 'Semipartial R-Squared', 'Merge Distance', 'Separation Ratio']
__init__(canvas_cluster)[source]

Create an instance of the dialog. Objects passed are the parent and the CanvasFingerprintCluster object which will have the statistics

Parameters

canvas_cluster (CanvasFingerprintCluster object) – object that contains the clustering statistics

redraw()[source]

Redraw the plot with the current settings

setPlotType(plot_type)[source]

Called when the plot type option menu is changed

show()[source]

Show the plot dialog

close()[source]

Dismiss the window

click(event)[source]

Click in plot handler

AllowNestedDocks = 2
AllowTabbedDocks = 4
AnimatedDocks = 1
class DockOption

Bases: int

class DockOptions

Bases: sip.simplewrapper

QMainWindow.DockOptions(Union[QMainWindow.DockOptions, QMainWindow.DockOption]) QMainWindow.DockOptions(QMainWindow.DockOptions)

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

DrawChildren = 2
DrawWindowBackground = 1
ForceTabbedDocks = 8
GroupedDragging = 32
IgnoreMask = 4
class PaintDeviceMetric

Bases: int

PdmDepth = 6
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDpiX = 7
PdmDpiY = 8
PdmHeight = 2
PdmHeightMM = 4
PdmNumColors = 5
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmWidth = 1
PdmWidthMM = 3
class RenderFlag

Bases: int

class RenderFlags

Bases: sip.simplewrapper

QWidget.RenderFlags(Union[QWidget.RenderFlags, QWidget.RenderFlag]) QWidget.RenderFlags(QWidget.RenderFlags)

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

VerticalTabs = 16
acceptDrops(self) → bool
accessibleDescription(self) → str
accessibleName(self) → str
actionEvent(self, QActionEvent)
actions(self) → List[QAction]
activateWindow(self)
addAction(self, QAction)
addActions(self, Iterable[QAction])
addButtonToBottomLayout(text, command)

Adds a button to the bottom bar, to go to the right of Job Start buttons. Useful when you need a button on the bottom which is not standard job launching.

Buttons are added from left to right in the order that this function is called..

:param text text that goes on the button :type text str

:param command the slot that the button will run :param callable

Return type

str

Returns

name of button, to be used in setButtonEnabled

addCentralWidget(w)

Add a widget to the central area of the AppFramework dialog

addDockWidget(self, Qt.DockWidgetArea, QDockWidget)

addDockWidget(self, Qt.DockWidgetArea, QDockWidget, Qt.Orientation)

addToolBar(self, Qt.ToolBarArea, QToolBar)

addToolBar(self, QToolBar) addToolBar(self, str) -> QToolBar

addToolBarBreak(self, area: Qt.ToolBarArea = Qt.TopToolBarArea)
adjustSize(self)
askOverwrite(files=None, parent=None)

Display a dialog asking the user whether to overwrite existing files. Returns True if user chose to overwrite, False otherwise.

Optionally specify a list of files that will be overwritten if the user presses the Overwrite button.

askOverwriteIfNecessary(files)

If any of the files in the <files> list exists, will bring up a dialog box asking the user whether they want to overwrite them. Returns True if the user chose to overwrite or if specified files do not exist. Returns False if the user cancelled.

autoFillBackground(self) → bool
backgroundRole(self) → QPalette.ColorRole
baseSize(self) → QSize
blockSignals(self, bool) → bool
centralWidget(self) → QWidget
changeEvent(self, QEvent)
childAt(self, QPoint) → QWidget

childAt(self, int, int) -> QWidget

childEvent(self, QChildEvent)
children(self) → List[QObject]
childrenRect(self) → QRect
childrenRegion(self) → QRegion
clearFocus(self)
clearMask(self)
closeEvent(event)

Called by QApplication when the user clicked on the “x” button to close the window. Will call the user-specified close command (if specified).

closePanel()

Hide panel, if in Maestro. Otherwise close it.

colorCount(self) → int
connectNotify(self, QMetaMethod)
contentsMargins(self) → QMargins
contentsRect(self) → QRect
contextMenuEvent(self, QContextMenuEvent)
contextMenuPolicy(self) → Qt.ContextMenuPolicy
corner(self, Qt.Corner) → Qt.DockWidgetArea
create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createMenus(d)

Setup for making individual menus, create MainMenuBar.

createPopupMenu(self) → QMenu
createWindowContainer(QWindow, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = 0) → QWidget
cursor(self) → QCursor
customContextMenuRequested

customContextMenuRequested(self, QPoint) [signal]

customEvent(self, QEvent)
deleteLater(self)
depth(self) → int
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
destroyed

destroyed(self, object: QObject = None) [signal]

devType(self) → int
devicePixelRatio(self) → int
devicePixelRatioF(self) → float
devicePixelRatioFScale() → float
disconnect(self)
disconnectNotify(self, QMetaMethod)
dockOptions(self) → QMainWindow.DockOptions
dockWidgetArea(self, QDockWidget) → Qt.DockWidgetArea
documentMode(self) → bool
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → List[QByteArray]
effectiveWinId(self) → sip.voidptr
ensurePolished(self)
enterEvent(self, QEvent)
error(text, preferences=None, key=None)

Display an error dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.

Parameters
  • text (str) – The information to display in the dialog

  • preferences – obsolete; ignored.

  • key (str) – The key to store the preference under. If specified, a “Do not show again” checkbox will be rendered in the dialog box.

Return type

None

event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
exec_()

Calls exec_() method of the application.

find(sip.voidptr) → QWidget
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject

findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject

findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]

findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]

focusInEvent(self, QFocusEvent)
focusNextChild(self) → bool
focusNextPrevChild(self, bool) → bool
focusOutEvent(self, QFocusEvent)
focusPolicy(self) → Qt.FocusPolicy
focusPreviousChild(self) → bool
focusProxy(self) → QWidget
focusWidget(self) → QWidget
font(self) → QFont
fontInfo(self) → QFontInfo
fontMetrics(self) → QFontMetrics
foregroundRole(self) → QPalette.ColorRole
frameGeometry(self) → QRect
frameSize(self) → QSize
geometry(self) → QRect
getApp()

Return QApplication instance which this panel is running under. If in Maestro, returns Maestro’s global QApplication instance.

getContentsMargins(self) → Tuple[int, int, int, int]
getInputFile()

Return the selected input file path (Python string).

If the panel has no input frame, raises RuntimeError. If FILE source is not allowed, raises RuntimeError.

getInputSource()

Return the selected input source. Available values (module constants):

  • WORKSPACE

  • SELECTED_ENTRIES

  • INCLUDED_ENTRIES

  • INCLUDED_ENTRY

  • FILE

If the panel has no input frame, raises RuntimeError.

getOpenFileName(caption='Select a file', initial_dir=None, support_mae=True, support_sd=True, support_pdb=True)

Brings up an open file dialog box for selecting structure files. By default reads Maestro, SD, and PDB formats. Returns file path that is readable by StructureReader. Is user pressed cancel, empty string is returned.

grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) → QPixmap
grabGesture(self, Qt.GestureType, flags: Union[Qt.GestureFlags, Qt.GestureFlag] = Qt.GestureFlags())
grabKeyboard(self)
grabMouse(self)

grabMouse(self, Union[QCursor, Qt.CursorShape])

grabShortcut(self, Union[QKeySequence, QKeySequence.StandardKey, str, int], context: Qt.ShortcutContext = Qt.WindowShortcut) → int
graphicsEffect(self) → QGraphicsEffect
graphicsProxyWidget(self) → QGraphicsProxyWidget
hasFocus(self) → bool
hasHeightForWidth(self) → bool
hasMouseTracking(self) → bool
hasTabletTracking(self) → bool
height(self) → int
heightForWidth(self, int) → int
heightMM(self) → int
help()

Display the help dialog (or a warning dialog if no help can be found). This function requires help_topic to have been given when the class was initialized.

hide(self)
hideEvent(self, QHideEvent)
iconSize(self) → QSize
iconSizeChanged

iconSizeChanged(self, QSize) [signal]

info(text, preferences=None, key=None)

Display an information dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.

Parameters
  • text (str) – The information to display in the dialog

  • preferences – obsolete; ignored.

  • key (str) – The key to store the preference under. If specified, a “Do not show again” checkbox will be rendered in the dialog box.

Return type

None

inherits(self, str) → bool
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
inputMethodHints(self) → Qt.InputMethodHints
inputMethodQuery(self, Qt.InputMethodQuery) → Any
ClusterStatisticsPlotDialog.insertAction(self, QAction, QAction)
insertActions(self, QAction, Iterable[QAction])
ClusterStatisticsPlotDialog.insertToolBar(self, QToolBar, QToolBar)
insertToolBarBreak(self, QToolBar)
installEventFilter(self, QObject)
interior()

Return the interior frame where client widgets should be parented from

isActiveWindow(self) → bool
isAncestorOf(self, QWidget) → bool
isAnimated(self) → bool
isDockNestingEnabled(self) → bool
isDockableInMaestro()

Returns True if the PyQt panel can be docked into Maestro mainwindow. Otherwise returns false. This function should be called only after parsing the ‘dockable’ argument inside the constructor.

isEnabled(self) → bool
isEnabledTo(self, QWidget) → bool
isFullScreen(self) → bool
isHidden(self) → bool
isLeftToRight(self) → bool
isMaximized(self) → bool
isMinimized(self) → bool
isModal(self) → bool
isRightToLeft(self) → bool
isSeparator(self, QPoint) → bool
isSignalConnected(self, QMetaMethod) → bool
isVisible(self) → bool
isVisibleTo(self, QWidget) → bool
isWidgetType(self) → bool
isWindow(self) → bool
isWindowModified(self) → bool
isWindowType(self) → bool
jobCompleted
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
keyboardGrabber() → QWidget
killTimer(self, int)
launchJobCmd(cmd)

Launches job control command. Automatically tracked by the job status button (no need to call monitorJob method afterwards). NOTE: Unlike similar method in AF2, this method does not add -HOST etc options.

layout(self) → QLayout
layoutDirection(self) → Qt.LayoutDirection
leaveEvent(self, QEvent)
locale(self) → QLocale
logicalDpiX(self) → int
logicalDpiY(self) → int
lower(self)
mapFrom(self, QWidget, QPoint) → QPoint
mapFromGlobal(self, QPoint) → QPoint
mapFromParent(self, QPoint) → QPoint
mapTo(self, QWidget, QPoint) → QPoint
mapToGlobal(self, QPoint) → QPoint
mapToParent(self, QPoint) → QPoint
mask(self) → QRegion
maximumHeight(self) → int
maximumSize(self) → QSize
maximumWidth(self) → int
menuBar(self) → QMenuBar
menuWidget(self) → QWidget
metaObject(self) → QMetaObject
metric(self, QPaintDevice.PaintDeviceMetric) → int
minimumHeight(self) → int
minimumSize(self) → QSize
minimumSizeHint(self) → QSize
minimumWidth(self) → int
monitorJob(jobid, showpanel=False)

Monitor the given jobid and show the monitor panel; if in maestro.

Parameters
  • jobid – jobid of the job to monitor

  • showpanel – whether to bring up the Monitor panel. By default, the panel will open if the “Open Monitor panel” preference is set.

Example, after launching the job, use the jobid to issue the command:

<AppFramework_instance>.monitorJob(<jobid>)
mouseDoubleClickEvent(self, QMouseEvent)
mouseGrabber() → QWidget
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
move(self, QPoint)

move(self, int, int)

moveEvent(self, QMoveEvent)
moveToThread(self, QThread)
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) → Tuple[bool, int]
nativeParentWidget(self) → QWidget
nextInFocusChain(self) → QWidget
normalGeometry(self) → QRect
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

overrideWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
overrideWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
paintEngine(self) → QPaintEngine
paintEvent(self, QPaintEvent)
paintingActive(self) → bool
palette(self) → QPalette
parent(self) → QObject
parentWidget(self) → QWidget
physicalDpiX(self) → int
physicalDpiY(self) → int
pos(self) → QPoint
previousInFocusChain(self) → QWidget
processEvents()

Allow the QApplication’s or Maestro’s main event loop to process pending events.

property(self, str) → Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

question(msg, button1='OK', button2='Cancel', title='Question')

Display a prompt dialog window with specified text. Returns True if first button (default OK) is pressed, False otherwise.

quitPanel()

Quit the panel (even if in Maestro)

Note that the calling script needs to unset the variable that holds this panel instance in order to truly delete the panel. For example, this method should be subclassed as follows:

def quitPanel(self):

global mypanel # Where mypanel is the variable holding this object appframework.AppFramework.quitPanel(self) mypanel = None

raise_(self)
receivers(self, PYQT_SIGNAL) → int
rect(self) → QRect
releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, int)
removeAction(self, QAction)
removeDockWidget(self, QDockWidget)
removeEventFilter(self, QObject)
removeToolBar(self, QToolBar)
removeToolBarBreak(self, QToolBar)
render(self, QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))

render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren))

repaint(self)

repaint(self, int, int, int, int) repaint(self, QRect) repaint(self, QRegion)

resize(self, QSize)

resize(self, int, int)

resizeDocks(self, Iterable[QDockWidget], Iterable[int], Qt.Orientation)
resizeEvent(self, QResizeEvent)
restoreCursor(app_wide=True)

Restore the application level cursor to the default. If ‘app_wide’ is True then if will be restored for the entire application, if it’s False, it will be just for this panel.

restoreDockWidget(self, QDockWidget) → bool
restoreGeometry(self, Union[QByteArray, bytes, bytearray]) → bool
restoreState(self, Union[QByteArray, bytes, bytearray], version: int = 0) → bool
saveGeometry(self) → QByteArray
saveState(self, version: int = 0) → QByteArray
ClusterStatisticsPlotDialog.scroll(self, int, int)

scroll(self, int, int, QRect)

sender(self) → QObject
senderSignalIndex(self) → int
setAcceptDrops(self, bool)
setAccessibleDescription(self, str)
setAccessibleName(self, str)
setAnimated(self, bool)
setAttribute(self, Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, bool)
setBackgroundRole(self, QPalette.ColorRole)
ClusterStatisticsPlotDialog.setBaseSize(self, int, int)

setBaseSize(self, QSize)

setButtonEnabled(button, enabled)

Enable / disable the specified button, e.g.,

self.setButtonEnabled(‘start’, False)

Raises a RuntimeError if the button doesn’t exist.

setButtonState(button, state)

Set the state of the specified button, e.g.,

self.setButtonState(‘start’, ‘disabled’)

The standard state is ‘normal’. Raises a RuntimeError if the button doesn’t exist or if the requested state can’t be set.

Obsolete. Please use setButtonEnabled() method instead.

setCentralWidget(self, QWidget)
ClusterStatisticsPlotDialog.setContentsMargins(self, int, int, int, int)

setContentsMargins(self, QMargins)

setContextMenuPolicy(self, Qt.ContextMenuPolicy)
setCorner(self, Qt.Corner, Qt.DockWidgetArea)
setCursor(self, Union[QCursor, Qt.CursorShape])
setDisabled(self, bool)
setDockNestingEnabled(self, bool)
setDockOptions(self, Union[QMainWindow.DockOptions, QMainWindow.DockOption])
setDocumentMode(self, bool)
setEnabled(self, bool)
setFixedHeight(self, int)
setFixedSize(self, QSize)

setFixedSize(self, int, int)

setFixedWidth(self, int)
setFocus(self)

setFocus(self, Qt.FocusReason)

setFocusPolicy(self, Qt.FocusPolicy)
setFocusProxy(self, QWidget)
setFont(self, QFont)
setForegroundRole(self, QPalette.ColorRole)
setGeometry(self, QRect)

setGeometry(self, int, int, int, int)

setGraphicsEffect(self, QGraphicsEffect)
setHidden(self, bool)
setIconSize(self, QSize)
setInputMethodHints(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])
setJobname(jobname)
setLayout(self, QLayout)
setLayoutDirection(self, Qt.LayoutDirection)
setLocale(self, QLocale)
setMask(self, QBitmap)

setMask(self, QRegion)

setMaximumHeight(self, int)
ClusterStatisticsPlotDialog.setMaximumSize(self, int, int)

setMaximumSize(self, QSize)

setMaximumWidth(self, int)
setMenuBar(self, QMenuBar)
setMenuWidget(self, QWidget)
setMinimumHeight(self, int)
ClusterStatisticsPlotDialog.setMinimumSize(self, int, int)

setMinimumSize(self, QSize)

setMinimumWidth(self, int)
setMouseTracking(self, bool)
setObjectName(self, str)
setPalette(self, QPalette)
setParent(self, QWidget)

setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType])

setProgress(step, total_steps)

Set the progress bar value (bottom of the panel) to <step> out of <total_steps>

Set both to 0 to hide the progress bar.

setProgressError(error)

Set the color of the progress bar to red (error=True) or normal color (error=False).

setProperty(self, str, Any) → bool
setShortcutAutoRepeat(self, int, enabled: bool = True)
setShortcutEnabled(self, int, enabled: bool = True)
ClusterStatisticsPlotDialog.setSizeIncrement(self, int, int)

setSizeIncrement(self, QSize)

setSizePolicy(self, QSizePolicy)

setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy)

setStatusBar(self, QStatusBar)
setStatusTip(self, str)
setStyle(self, QStyle)
setStyleSheet(self, str)
ClusterStatisticsPlotDialog.setTabOrder(QWidget, QWidget)
setTabPosition(self, Union[Qt.DockWidgetAreas, Qt.DockWidgetArea], QTabWidget.TabPosition)
setTabShape(self, QTabWidget.TabShape)
setTabletTracking(self, bool)
setToolButtonStyle(self, Qt.ToolButtonStyle)
setToolTip(self, str)
setToolTipDuration(self, int)
setUnifiedTitleAndToolBarOnMac(self, bool)
setUpdatesEnabled(self, bool)
setVisible(self, bool)
setWaitCursor(app_wide=True)

Set the cursor to the wait cursor. This will be an hourglass, clock or similar. Call restoreCursor() to return to the default cursor. If ‘app_wide’ is True then it will apply to the entire application (including Maestro if running there). If it’s False then it will apply only to this panel.

setWhatsThis(self, str)
setWindowFilePath(self, str)
setWindowFlag(self, Qt.WindowType, on: bool = True)
setWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
setWindowIcon(self, QIcon)
setWindowIconText(self, str)
setWindowModality(self, Qt.WindowModality)
setWindowModified(self, bool)
setWindowOpacity(self, float)
setWindowRole(self, str)
setWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
setWindowTitle(self, str)
setupJobParameters()

Setups up the job parameters from the state of the input frame. Do not call directly from your script.

Returns True if success, False on error (after displaying an error message).

sharedPainter(self) → QPainter
showEvent(show_event)

Override the normal processing when the panel is shown.

showFullScreen(self)
showMaximized(self)
showMinimized(self)
showNormal(self)
signalsBlocked(self) → bool
size(self) → QSize
sizeHint(self) → QSize
sizeIncrement(self) → QSize
sizePolicy(self) → QSizePolicy
splitDockWidget(self, QDockWidget, QDockWidget, Qt.Orientation)
stackUnder(self, QWidget)
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
start_wrapper_timeout = 3000
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
statusBar(self) → QStatusBar
statusTip(self) → str
style(self) → QStyle
styleSheet(self) → str
tabPosition(self, Qt.DockWidgetArea) → QTabWidget.TabPosition
tabShape(self) → QTabWidget.TabShape
tabifiedDockWidgetActivated

tabifiedDockWidgetActivated(self, QDockWidget) [signal]

tabifiedDockWidgets(self, QDockWidget) → List[QDockWidget]
ClusterStatisticsPlotDialog.tabifyDockWidget(self, QDockWidget, QDockWidget)
tabletEvent(self, QTabletEvent)
takeCentralWidget(self) → QWidget
testAttribute(self, Qt.WidgetAttribute) → bool
thread(self) → QThread
timerEvent(self, QTimerEvent)
toolBarArea(self, QToolBar) → Qt.ToolBarArea
toolBarBreak(self, QToolBar) → bool
toolButtonStyle(self) → Qt.ToolButtonStyle
toolButtonStyleChanged

toolButtonStyleChanged(self, Qt.ToolButtonStyle) [signal]

toolTip(self) → str
toolTipDuration(self) → int
tr(self, str, disambiguation: str = None, n: int = - 1) → str
trackJobProgress(job)

Display a progress dialog showing the progress of this job. (Any previously tracked job will no longer be tracked)

job - a jobcontrol.Job object.

underMouse(self) → bool
ungrabGesture(self, Qt.GestureType)
unifiedTitleAndToolBarOnMac(self) → bool
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

updateGeometry(self)
updateJobname()

Update jobname in parameters from main window.

updateMicroFocus(self)
updateStatusBar()

Updates the status bar.

updatesEnabled(self) → bool
visibleRegion(self) → QRegion
warning(text, preferences=None, key=None)

Display a warning dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.

Parameters
  • text (str) – The information to display in the dialog

  • preferences – obsolete; ignored.

  • key (str) – The key to store the preference under. If specified, a “Do not show again” checkbox will be rendered in the dialog box.

Return type

None

whatsThis(self) → str
wheelEvent(self, QWheelEvent)
width(self) → int
widthMM(self) → int
winId(self) → sip.voidptr
window(self) → QWidget
windowFilePath(self) → str
windowFlags(self) → Qt.WindowFlags
windowHandle(self) → QWindow
windowIcon(self) → QIcon
windowIconChanged

windowIconChanged(self, QIcon) [signal]

windowIconText(self) → str
windowIconTextChanged

windowIconTextChanged(self, str) [signal]

windowModality(self) → Qt.WindowModality
windowOpacity(self) → float
windowRole(self) → str
windowState(self) → Qt.WindowStates
windowTitle(self) → str
windowTitleChanged

windowTitleChanged(self, str) [signal]

windowType(self) → Qt.WindowType
x(self) → int
y(self) → int
class schrodinger.application.canvas.clustergui.DendrogramPlotDialog(canvas_cluster=None)[source]

Bases: schrodinger.ui.qt.appframework.AppFramework

A class which displays a dialog with a plot of the dendrogram from the most recent clustering

num_clusters_selected
__init__(canvas_cluster=None)[source]

Create an instance of the dialog. Either canvas_cluster should be specified (CanvasFingerprintCluster object with data)

Parameters

canvas_cluster (CanvasFingerprintCluster object) – object that contains the clustering statistics

show()[source]

Show the plot dialog

close()[source]

Dismiss the window

redraw()[source]

Redraw the plot

click(event)[source]

Click in plot handler

AllowNestedDocks = 2
AllowTabbedDocks = 4
AnimatedDocks = 1
class DockOption

Bases: int

class DockOptions

Bases: sip.simplewrapper

QMainWindow.DockOptions(Union[QMainWindow.DockOptions, QMainWindow.DockOption]) QMainWindow.DockOptions(QMainWindow.DockOptions)

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

DrawChildren = 2
DrawWindowBackground = 1
ForceTabbedDocks = 8
GroupedDragging = 32
IgnoreMask = 4
class PaintDeviceMetric

Bases: int

PdmDepth = 6
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDpiX = 7
PdmDpiY = 8
PdmHeight = 2
PdmHeightMM = 4
PdmNumColors = 5
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmWidth = 1
PdmWidthMM = 3
class RenderFlag

Bases: int

class RenderFlags

Bases: sip.simplewrapper

QWidget.RenderFlags(Union[QWidget.RenderFlags, QWidget.RenderFlag]) QWidget.RenderFlags(QWidget.RenderFlags)

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

VerticalTabs = 16
acceptDrops(self) → bool
accessibleDescription(self) → str
accessibleName(self) → str
actionEvent(self, QActionEvent)
actions(self) → List[QAction]
activateWindow(self)
addAction(self, QAction)
addActions(self, Iterable[QAction])
addButtonToBottomLayout(text, command)

Adds a button to the bottom bar, to go to the right of Job Start buttons. Useful when you need a button on the bottom which is not standard job launching.

Buttons are added from left to right in the order that this function is called..

:param text text that goes on the button :type text str

:param command the slot that the button will run :param callable

Return type

str

Returns

name of button, to be used in setButtonEnabled

addCentralWidget(w)

Add a widget to the central area of the AppFramework dialog

addDockWidget(self, Qt.DockWidgetArea, QDockWidget)

addDockWidget(self, Qt.DockWidgetArea, QDockWidget, Qt.Orientation)

addToolBar(self, Qt.ToolBarArea, QToolBar)

addToolBar(self, QToolBar) addToolBar(self, str) -> QToolBar

addToolBarBreak(self, area: Qt.ToolBarArea = Qt.TopToolBarArea)
adjustSize(self)
askOverwrite(files=None, parent=None)

Display a dialog asking the user whether to overwrite existing files. Returns True if user chose to overwrite, False otherwise.

Optionally specify a list of files that will be overwritten if the user presses the Overwrite button.

askOverwriteIfNecessary(files)

If any of the files in the <files> list exists, will bring up a dialog box asking the user whether they want to overwrite them. Returns True if the user chose to overwrite or if specified files do not exist. Returns False if the user cancelled.

autoFillBackground(self) → bool
backgroundRole(self) → QPalette.ColorRole
baseSize(self) → QSize
blockSignals(self, bool) → bool
centralWidget(self) → QWidget
changeEvent(self, QEvent)
childAt(self, QPoint) → QWidget

childAt(self, int, int) -> QWidget

childEvent(self, QChildEvent)
children(self) → List[QObject]
childrenRect(self) → QRect
childrenRegion(self) → QRegion
clearFocus(self)
clearMask(self)
closeEvent(event)

Called by QApplication when the user clicked on the “x” button to close the window. Will call the user-specified close command (if specified).

closePanel()

Hide panel, if in Maestro. Otherwise close it.

colorCount(self) → int
connectNotify(self, QMetaMethod)
contentsMargins(self) → QMargins
contentsRect(self) → QRect
contextMenuEvent(self, QContextMenuEvent)
contextMenuPolicy(self) → Qt.ContextMenuPolicy
corner(self, Qt.Corner) → Qt.DockWidgetArea
create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createMenus(d)

Setup for making individual menus, create MainMenuBar.

createPopupMenu(self) → QMenu
createWindowContainer(QWindow, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = 0) → QWidget
cursor(self) → QCursor
customContextMenuRequested

customContextMenuRequested(self, QPoint) [signal]

customEvent(self, QEvent)
deleteLater(self)
depth(self) → int
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
destroyed

destroyed(self, object: QObject = None) [signal]

devType(self) → int
devicePixelRatio(self) → int
devicePixelRatioF(self) → float
devicePixelRatioFScale() → float
disconnect(self)
disconnectNotify(self, QMetaMethod)
dockOptions(self) → QMainWindow.DockOptions
dockWidgetArea(self, QDockWidget) → Qt.DockWidgetArea
documentMode(self) → bool
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → List[QByteArray]
effectiveWinId(self) → sip.voidptr
ensurePolished(self)
enterEvent(self, QEvent)
error(text, preferences=None, key=None)

Display an error dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.

Parameters
  • text (str) – The information to display in the dialog

  • preferences – obsolete; ignored.

  • key (str) – The key to store the preference under. If specified, a “Do not show again” checkbox will be rendered in the dialog box.

Return type

None

event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
exec_()

Calls exec_() method of the application.

find(sip.voidptr) → QWidget
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject

findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject

findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]

findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]

focusInEvent(self, QFocusEvent)
focusNextChild(self) → bool
focusNextPrevChild(self, bool) → bool
focusOutEvent(self, QFocusEvent)
focusPolicy(self) → Qt.FocusPolicy
focusPreviousChild(self) → bool
focusProxy(self) → QWidget
focusWidget(self) → QWidget
font(self) → QFont
fontInfo(self) → QFontInfo
fontMetrics(self) → QFontMetrics
foregroundRole(self) → QPalette.ColorRole
frameGeometry(self) → QRect
frameSize(self) → QSize
geometry(self) → QRect
getApp()

Return QApplication instance which this panel is running under. If in Maestro, returns Maestro’s global QApplication instance.

getContentsMargins(self) → Tuple[int, int, int, int]
getInputFile()

Return the selected input file path (Python string).

If the panel has no input frame, raises RuntimeError. If FILE source is not allowed, raises RuntimeError.

getInputSource()

Return the selected input source. Available values (module constants):

  • WORKSPACE

  • SELECTED_ENTRIES

  • INCLUDED_ENTRIES

  • INCLUDED_ENTRY

  • FILE

If the panel has no input frame, raises RuntimeError.

getOpenFileName(caption='Select a file', initial_dir=None, support_mae=True, support_sd=True, support_pdb=True)

Brings up an open file dialog box for selecting structure files. By default reads Maestro, SD, and PDB formats. Returns file path that is readable by StructureReader. Is user pressed cancel, empty string is returned.

grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) → QPixmap
grabGesture(self, Qt.GestureType, flags: Union[Qt.GestureFlags, Qt.GestureFlag] = Qt.GestureFlags())
grabKeyboard(self)
grabMouse(self)

grabMouse(self, Union[QCursor, Qt.CursorShape])

grabShortcut(self, Union[QKeySequence, QKeySequence.StandardKey, str, int], context: Qt.ShortcutContext = Qt.WindowShortcut) → int
graphicsEffect(self) → QGraphicsEffect
graphicsProxyWidget(self) → QGraphicsProxyWidget
hasFocus(self) → bool
hasHeightForWidth(self) → bool
hasMouseTracking(self) → bool
hasTabletTracking(self) → bool
height(self) → int
heightForWidth(self, int) → int
heightMM(self) → int
help()

Display the help dialog (or a warning dialog if no help can be found). This function requires help_topic to have been given when the class was initialized.

hide(self)
hideEvent(self, QHideEvent)
iconSize(self) → QSize
iconSizeChanged

iconSizeChanged(self, QSize) [signal]

info(text, preferences=None, key=None)

Display an information dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.

Parameters
  • text (str) – The information to display in the dialog

  • preferences – obsolete; ignored.

  • key (str) – The key to store the preference under. If specified, a “Do not show again” checkbox will be rendered in the dialog box.

Return type

None

inherits(self, str) → bool
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
inputMethodHints(self) → Qt.InputMethodHints
inputMethodQuery(self, Qt.InputMethodQuery) → Any
DendrogramPlotDialog.insertAction(self, QAction, QAction)
insertActions(self, QAction, Iterable[QAction])
DendrogramPlotDialog.insertToolBar(self, QToolBar, QToolBar)
insertToolBarBreak(self, QToolBar)
installEventFilter(self, QObject)
interior()

Return the interior frame where client widgets should be parented from

isActiveWindow(self) → bool
isAncestorOf(self, QWidget) → bool
isAnimated(self) → bool
isDockNestingEnabled(self) → bool
isDockableInMaestro()

Returns True if the PyQt panel can be docked into Maestro mainwindow. Otherwise returns false. This function should be called only after parsing the ‘dockable’ argument inside the constructor.

isEnabled(self) → bool
isEnabledTo(self, QWidget) → bool
isFullScreen(self) → bool
isHidden(self) → bool
isLeftToRight(self) → bool
isMaximized(self) → bool
isMinimized(self) → bool
isModal(self) → bool
isRightToLeft(self) → bool
isSeparator(self, QPoint) → bool
isSignalConnected(self, QMetaMethod) → bool
isVisible(self) → bool
isVisibleTo(self, QWidget) → bool
isWidgetType(self) → bool
isWindow(self) → bool
isWindowModified(self) → bool
isWindowType(self) → bool
jobCompleted
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
keyboardGrabber() → QWidget
killTimer(self, int)
launchJobCmd(cmd)

Launches job control command. Automatically tracked by the job status button (no need to call monitorJob method afterwards). NOTE: Unlike similar method in AF2, this method does not add -HOST etc options.

layout(self) → QLayout
layoutDirection(self) → Qt.LayoutDirection
leaveEvent(self, QEvent)
locale(self) → QLocale
logicalDpiX(self) → int
logicalDpiY(self) → int
lower(self)
mapFrom(self, QWidget, QPoint) → QPoint
mapFromGlobal(self, QPoint) → QPoint
mapFromParent(self, QPoint) → QPoint
mapTo(self, QWidget, QPoint) → QPoint
mapToGlobal(self, QPoint) → QPoint
mapToParent(self, QPoint) → QPoint
mask(self) → QRegion
maximumHeight(self) → int
maximumSize(self) → QSize
maximumWidth(self) → int
menuBar(self) → QMenuBar
menuWidget(self) → QWidget
metaObject(self) → QMetaObject
metric(self, QPaintDevice.PaintDeviceMetric) → int
minimumHeight(self) → int
minimumSize(self) → QSize
minimumSizeHint(self) → QSize
minimumWidth(self) → int
monitorJob(jobid, showpanel=False)

Monitor the given jobid and show the monitor panel; if in maestro.

Parameters
  • jobid – jobid of the job to monitor

  • showpanel – whether to bring up the Monitor panel. By default, the panel will open if the “Open Monitor panel” preference is set.

Example, after launching the job, use the jobid to issue the command:

<AppFramework_instance>.monitorJob(<jobid>)
mouseDoubleClickEvent(self, QMouseEvent)
mouseGrabber() → QWidget
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
move(self, QPoint)

move(self, int, int)

moveEvent(self, QMoveEvent)
moveToThread(self, QThread)
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) → Tuple[bool, int]
nativeParentWidget(self) → QWidget
nextInFocusChain(self) → QWidget
normalGeometry(self) → QRect
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

overrideWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
overrideWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
paintEngine(self) → QPaintEngine
paintEvent(self, QPaintEvent)
paintingActive(self) → bool
palette(self) → QPalette
parent(self) → QObject
parentWidget(self) → QWidget
physicalDpiX(self) → int
physicalDpiY(self) → int
pos(self) → QPoint
previousInFocusChain(self) → QWidget
processEvents()

Allow the QApplication’s or Maestro’s main event loop to process pending events.

property(self, str) → Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

question(msg, button1='OK', button2='Cancel', title='Question')

Display a prompt dialog window with specified text. Returns True if first button (default OK) is pressed, False otherwise.

quitPanel()

Quit the panel (even if in Maestro)

Note that the calling script needs to unset the variable that holds this panel instance in order to truly delete the panel. For example, this method should be subclassed as follows:

def quitPanel(self):

global mypanel # Where mypanel is the variable holding this object appframework.AppFramework.quitPanel(self) mypanel = None

raise_(self)
receivers(self, PYQT_SIGNAL) → int
rect(self) → QRect
releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, int)
removeAction(self, QAction)
removeDockWidget(self, QDockWidget)
removeEventFilter(self, QObject)
removeToolBar(self, QToolBar)
removeToolBarBreak(self, QToolBar)
render(self, QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))

render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren))

repaint(self)

repaint(self, int, int, int, int) repaint(self, QRect) repaint(self, QRegion)

resize(self, QSize)

resize(self, int, int)

resizeDocks(self, Iterable[QDockWidget], Iterable[int], Qt.Orientation)
resizeEvent(self, QResizeEvent)
restoreCursor(app_wide=True)

Restore the application level cursor to the default. If ‘app_wide’ is True then if will be restored for the entire application, if it’s False, it will be just for this panel.

restoreDockWidget(self, QDockWidget) → bool
restoreGeometry(self, Union[QByteArray, bytes, bytearray]) → bool
restoreState(self, Union[QByteArray, bytes, bytearray], version: int = 0) → bool
saveGeometry(self) → QByteArray
saveState(self, version: int = 0) → QByteArray
DendrogramPlotDialog.scroll(self, int, int)

scroll(self, int, int, QRect)

sender(self) → QObject
senderSignalIndex(self) → int
setAcceptDrops(self, bool)
setAccessibleDescription(self, str)
setAccessibleName(self, str)
setAnimated(self, bool)
setAttribute(self, Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, bool)
setBackgroundRole(self, QPalette.ColorRole)
DendrogramPlotDialog.setBaseSize(self, int, int)

setBaseSize(self, QSize)

setButtonEnabled(button, enabled)

Enable / disable the specified button, e.g.,

self.setButtonEnabled(‘start’, False)

Raises a RuntimeError if the button doesn’t exist.

setButtonState(button, state)

Set the state of the specified button, e.g.,

self.setButtonState(‘start’, ‘disabled’)

The standard state is ‘normal’. Raises a RuntimeError if the button doesn’t exist or if the requested state can’t be set.

Obsolete. Please use setButtonEnabled() method instead.

setCentralWidget(self, QWidget)
DendrogramPlotDialog.setContentsMargins(self, int, int, int, int)

setContentsMargins(self, QMargins)

setContextMenuPolicy(self, Qt.ContextMenuPolicy)
setCorner(self, Qt.Corner, Qt.DockWidgetArea)
setCursor(self, Union[QCursor, Qt.CursorShape])
setDisabled(self, bool)
setDockNestingEnabled(self, bool)
setDockOptions(self, Union[QMainWindow.DockOptions, QMainWindow.DockOption])
setDocumentMode(self, bool)
setEnabled(self, bool)
setFixedHeight(self, int)
setFixedSize(self, QSize)

setFixedSize(self, int, int)

setFixedWidth(self, int)
setFocus(self)

setFocus(self, Qt.FocusReason)

setFocusPolicy(self, Qt.FocusPolicy)
setFocusProxy(self, QWidget)
setFont(self, QFont)
setForegroundRole(self, QPalette.ColorRole)
setGeometry(self, QRect)

setGeometry(self, int, int, int, int)

setGraphicsEffect(self, QGraphicsEffect)
setHidden(self, bool)
setIconSize(self, QSize)
setInputMethodHints(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])
setJobname(jobname)
setLayout(self, QLayout)
setLayoutDirection(self, Qt.LayoutDirection)
setLocale(self, QLocale)
setMask(self, QBitmap)

setMask(self, QRegion)

setMaximumHeight(self, int)
DendrogramPlotDialog.setMaximumSize(self, int, int)

setMaximumSize(self, QSize)

setMaximumWidth(self, int)
setMenuBar(self, QMenuBar)
setMenuWidget(self, QWidget)
setMinimumHeight(self, int)
DendrogramPlotDialog.setMinimumSize(self, int, int)

setMinimumSize(self, QSize)

setMinimumWidth(self, int)
setMouseTracking(self, bool)
setObjectName(self, str)
setPalette(self, QPalette)
setParent(self, QWidget)

setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType])

setProgress(step, total_steps)

Set the progress bar value (bottom of the panel) to <step> out of <total_steps>

Set both to 0 to hide the progress bar.

setProgressError(error)

Set the color of the progress bar to red (error=True) or normal color (error=False).

setProperty(self, str, Any) → bool
setShortcutAutoRepeat(self, int, enabled: bool = True)
setShortcutEnabled(self, int, enabled: bool = True)
DendrogramPlotDialog.setSizeIncrement(self, int, int)

setSizeIncrement(self, QSize)

setSizePolicy(self, QSizePolicy)

setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy)

setStatusBar(self, QStatusBar)
setStatusTip(self, str)
setStyle(self, QStyle)
setStyleSheet(self, str)
DendrogramPlotDialog.setTabOrder(QWidget, QWidget)
setTabPosition(self, Union[Qt.DockWidgetAreas, Qt.DockWidgetArea], QTabWidget.TabPosition)
setTabShape(self, QTabWidget.TabShape)
setTabletTracking(self, bool)
setToolButtonStyle(self, Qt.ToolButtonStyle)
setToolTip(self, str)
setToolTipDuration(self, int)
setUnifiedTitleAndToolBarOnMac(self, bool)
setUpdatesEnabled(self, bool)
setVisible(self, bool)
setWaitCursor(app_wide=True)

Set the cursor to the wait cursor. This will be an hourglass, clock or similar. Call restoreCursor() to return to the default cursor. If ‘app_wide’ is True then it will apply to the entire application (including Maestro if running there). If it’s False then it will apply only to this panel.

setWhatsThis(self, str)
setWindowFilePath(self, str)
setWindowFlag(self, Qt.WindowType, on: bool = True)
setWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
setWindowIcon(self, QIcon)
setWindowIconText(self, str)
setWindowModality(self, Qt.WindowModality)
setWindowModified(self, bool)
setWindowOpacity(self, float)
setWindowRole(self, str)
setWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
setWindowTitle(self, str)
setupJobParameters()

Setups up the job parameters from the state of the input frame. Do not call directly from your script.

Returns True if success, False on error (after displaying an error message).

sharedPainter(self) → QPainter
showEvent(show_event)

Override the normal processing when the panel is shown.

showFullScreen(self)
showMaximized(self)
showMinimized(self)
showNormal(self)
signalsBlocked(self) → bool
size(self) → QSize
sizeHint(self) → QSize
sizeIncrement(self) → QSize
sizePolicy(self) → QSizePolicy
splitDockWidget(self, QDockWidget, QDockWidget, Qt.Orientation)
stackUnder(self, QWidget)
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
start_wrapper_timeout = 3000
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
statusBar(self) → QStatusBar
statusTip(self) → str
style(self) → QStyle
styleSheet(self) → str
tabPosition(self, Qt.DockWidgetArea) → QTabWidget.TabPosition
tabShape(self) → QTabWidget.TabShape
tabifiedDockWidgetActivated

tabifiedDockWidgetActivated(self, QDockWidget) [signal]

tabifiedDockWidgets(self, QDockWidget) → List[QDockWidget]
DendrogramPlotDialog.tabifyDockWidget(self, QDockWidget, QDockWidget)
tabletEvent(self, QTabletEvent)
takeCentralWidget(self) → QWidget
testAttribute(self, Qt.WidgetAttribute) → bool
thread(self) → QThread
timerEvent(self, QTimerEvent)
toolBarArea(self, QToolBar) → Qt.ToolBarArea
toolBarBreak(self, QToolBar) → bool
toolButtonStyle(self) → Qt.ToolButtonStyle
toolButtonStyleChanged

toolButtonStyleChanged(self, Qt.ToolButtonStyle) [signal]

toolTip(self) → str
toolTipDuration(self) → int
tr(self, str, disambiguation: str = None, n: int = - 1) → str
trackJobProgress(job)

Display a progress dialog showing the progress of this job. (Any previously tracked job will no longer be tracked)

job - a jobcontrol.Job object.

underMouse(self) → bool
ungrabGesture(self, Qt.GestureType)
unifiedTitleAndToolBarOnMac(self) → bool
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

updateGeometry(self)
updateJobname()

Update jobname in parameters from main window.

updateMicroFocus(self)
updateStatusBar()

Updates the status bar.

updatesEnabled(self) → bool
visibleRegion(self) → QRegion
warning(text, preferences=None, key=None)

Display a warning dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.

Parameters
  • text (str) – The information to display in the dialog

  • preferences – obsolete; ignored.

  • key (str) – The key to store the preference under. If specified, a “Do not show again” checkbox will be rendered in the dialog box.

Return type

None

whatsThis(self) → str
wheelEvent(self, QWheelEvent)
width(self) → int
widthMM(self) → int
winId(self) → sip.voidptr
window(self) → QWidget
windowFilePath(self) → str
windowFlags(self) → Qt.WindowFlags
windowHandle(self) → QWindow
windowIcon(self) → QIcon
windowIconChanged

windowIconChanged(self, QIcon) [signal]

windowIconText(self) → str
windowIconTextChanged

windowIconTextChanged(self, str) [signal]

windowModality(self) → Qt.WindowModality
windowOpacity(self) → float
windowRole(self) → str
windowState(self) → Qt.WindowStates
windowTitle(self) → str
windowTitleChanged

windowTitleChanged(self, str) [signal]

windowType(self) → Qt.WindowType
x(self) → int
y(self) → int
class schrodinger.application.canvas.clustergui.DistanceMatrixPlotDialog(canvas_cluster, num_clusters_edit=None, distance_matrix_callback=None, structures=True, num_clusters=None)[source]

Bases: schrodinger.ui.qt.appframework.AppFramework

A class which displays a dialog with a plot of the distance matrix associated with the most recent clustering

PLOT_TYPES = ['Cluster Order', 'Original Order']
__init__(canvas_cluster, num_clusters_edit=None, distance_matrix_callback=None, structures=True, num_clusters=None)[source]

Create an instance of the dialog.

Parameters
  • canvas_cluster (CanvasFingerprintCluster object) – object that contains the clustering statistics

  • num_clusters_edit (QLineEdit) – the widget that contains the number of clusters

  • distance_matrix_callback (function) – function called with the IDs of the structures which are clicked

  • structures (bool) – True if the distance matrix should show structures when the user clicks on the plot, False if not

setPlotType(plot_type)[source]

Called when the plot type combobox is changed

Parameters

plot_type (string) – the new plot type

setColormap(color_map)[source]

Called when the color map combobox is changed

Parameters

color_map (string) – the new color map

redraw()[source]

Force a redraw with refetching of the distance map data

draw()[source]

Called when the plot type option menu is changed

show()[source]

Show the plot dialog

close()[source]

Dismiss the window

click(event)[source]

Click in plot handler

drawStructure(canv, eid, title_label)[source]

Draw the structure from the project with entry id ‘eid’ in the Canvas ‘canv’

AllowNestedDocks = 2
AllowTabbedDocks = 4
AnimatedDocks = 1
class DockOption

Bases: int

class DockOptions

Bases: sip.simplewrapper

QMainWindow.DockOptions(Union[QMainWindow.DockOptions, QMainWindow.DockOption]) QMainWindow.DockOptions(QMainWindow.DockOptions)

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

DrawChildren = 2
DrawWindowBackground = 1
ForceTabbedDocks = 8
GroupedDragging = 32
IgnoreMask = 4
class PaintDeviceMetric

Bases: int

PdmDepth = 6
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDpiX = 7
PdmDpiY = 8
PdmHeight = 2
PdmHeightMM = 4
PdmNumColors = 5
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmWidth = 1
PdmWidthMM = 3
class RenderFlag

Bases: int

class RenderFlags

Bases: sip.simplewrapper

QWidget.RenderFlags(Union[QWidget.RenderFlags, QWidget.RenderFlag]) QWidget.RenderFlags(QWidget.RenderFlags)

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

VerticalTabs = 16
acceptDrops(self) → bool
accessibleDescription(self) → str
accessibleName(self) → str
actionEvent(self, QActionEvent)
actions(self) → List[QAction]
activateWindow(self)
addAction(self, QAction)
addActions(self, Iterable[QAction])
addButtonToBottomLayout(text, command)

Adds a button to the bottom bar, to go to the right of Job Start buttons. Useful when you need a button on the bottom which is not standard job launching.

Buttons are added from left to right in the order that this function is called..

:param text text that goes on the button :type text str

:param command the slot that the button will run :param callable

Return type

str

Returns

name of button, to be used in setButtonEnabled

addCentralWidget(w)

Add a widget to the central area of the AppFramework dialog

addDockWidget(self, Qt.DockWidgetArea, QDockWidget)

addDockWidget(self, Qt.DockWidgetArea, QDockWidget, Qt.Orientation)

addToolBar(self, Qt.ToolBarArea, QToolBar)

addToolBar(self, QToolBar) addToolBar(self, str) -> QToolBar

addToolBarBreak(self, area: Qt.ToolBarArea = Qt.TopToolBarArea)
adjustSize(self)
askOverwrite(files=None, parent=None)

Display a dialog asking the user whether to overwrite existing files. Returns True if user chose to overwrite, False otherwise.

Optionally specify a list of files that will be overwritten if the user presses the Overwrite button.

askOverwriteIfNecessary(files)

If any of the files in the <files> list exists, will bring up a dialog box asking the user whether they want to overwrite them. Returns True if the user chose to overwrite or if specified files do not exist. Returns False if the user cancelled.

autoFillBackground(self) → bool
backgroundRole(self) → QPalette.ColorRole
baseSize(self) → QSize
blockSignals(self, bool) → bool
centralWidget(self) → QWidget
changeEvent(self, QEvent)
childAt(self, QPoint) → QWidget

childAt(self, int, int) -> QWidget

childEvent(self, QChildEvent)
children(self) → List[QObject]
childrenRect(self) → QRect
childrenRegion(self) → QRegion
clearFocus(self)
clearMask(self)
closeEvent(event)

Called by QApplication when the user clicked on the “x” button to close the window. Will call the user-specified close command (if specified).

closePanel()

Hide panel, if in Maestro. Otherwise close it.

colorCount(self) → int
connectNotify(self, QMetaMethod)
contentsMargins(self) → QMargins
contentsRect(self) → QRect
contextMenuEvent(self, QContextMenuEvent)
contextMenuPolicy(self) → Qt.ContextMenuPolicy
corner(self, Qt.Corner) → Qt.DockWidgetArea
create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createMenus(d)

Setup for making individual menus, create MainMenuBar.

createPopupMenu(self) → QMenu
createWindowContainer(QWindow, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = 0) → QWidget
cursor(self) → QCursor
customContextMenuRequested

customContextMenuRequested(self, QPoint) [signal]

customEvent(self, QEvent)
deleteLater(self)
depth(self) → int
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
destroyed

destroyed(self, object: QObject = None) [signal]

devType(self) → int
devicePixelRatio(self) → int
devicePixelRatioF(self) → float
devicePixelRatioFScale() → float
disconnect(self)
disconnectNotify(self, QMetaMethod)
dockOptions(self) → QMainWindow.DockOptions
dockWidgetArea(self, QDockWidget) → Qt.DockWidgetArea
documentMode(self) → bool
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → List[QByteArray]
effectiveWinId(self) → sip.voidptr
ensurePolished(self)
enterEvent(self, QEvent)
error(text, preferences=None, key=None)

Display an error dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.

Parameters
  • text (str) – The information to display in the dialog

  • preferences – obsolete; ignored.

  • key (str) – The key to store the preference under. If specified, a “Do not show again” checkbox will be rendered in the dialog box.

Return type

None

event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
exec_()

Calls exec_() method of the application.

find(sip.voidptr) → QWidget
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject

findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject

findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]

findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]

focusInEvent(self, QFocusEvent)
focusNextChild(self) → bool
focusNextPrevChild(self, bool) → bool
focusOutEvent(self, QFocusEvent)
focusPolicy(self) → Qt.FocusPolicy
focusPreviousChild(self) → bool
focusProxy(self) → QWidget
focusWidget(self) → QWidget
font(self) → QFont
fontInfo(self) → QFontInfo
fontMetrics(self) → QFontMetrics
foregroundRole(self) → QPalette.ColorRole
frameGeometry(self) → QRect
frameSize(self) → QSize
geometry(self) → QRect
getApp()

Return QApplication instance which this panel is running under. If in Maestro, returns Maestro’s global QApplication instance.

getContentsMargins(self) → Tuple[int, int, int, int]
getInputFile()

Return the selected input file path (Python string).

If the panel has no input frame, raises RuntimeError. If FILE source is not allowed, raises RuntimeError.

getInputSource()

Return the selected input source. Available values (module constants):

  • WORKSPACE

  • SELECTED_ENTRIES

  • INCLUDED_ENTRIES

  • INCLUDED_ENTRY

  • FILE

If the panel has no input frame, raises RuntimeError.

getOpenFileName(caption='Select a file', initial_dir=None, support_mae=True, support_sd=True, support_pdb=True)

Brings up an open file dialog box for selecting structure files. By default reads Maestro, SD, and PDB formats. Returns file path that is readable by StructureReader. Is user pressed cancel, empty string is returned.

grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) → QPixmap
grabGesture(self, Qt.GestureType, flags: Union[Qt.GestureFlags, Qt.GestureFlag] = Qt.GestureFlags())
grabKeyboard(self)
grabMouse(self)

grabMouse(self, Union[QCursor, Qt.CursorShape])

grabShortcut(self, Union[QKeySequence, QKeySequence.StandardKey, str, int], context: Qt.ShortcutContext = Qt.WindowShortcut) → int
graphicsEffect(self) → QGraphicsEffect
graphicsProxyWidget(self) → QGraphicsProxyWidget
hasFocus(self) → bool
hasHeightForWidth(self) → bool
hasMouseTracking(self) → bool
hasTabletTracking(self) → bool
height(self) → int
heightForWidth(self, int) → int
heightMM(self) → int
help()

Display the help dialog (or a warning dialog if no help can be found). This function requires help_topic to have been given when the class was initialized.

hide(self)
hideEvent(self, QHideEvent)
iconSize(self) → QSize
iconSizeChanged

iconSizeChanged(self, QSize) [signal]

info(text, preferences=None, key=None)

Display an information dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.

Parameters
  • text (str) – The information to display in the dialog

  • preferences – obsolete; ignored.

  • key (str) – The key to store the preference under. If specified, a “Do not show again” checkbox will be rendered in the dialog box.

Return type

None

inherits(self, str) → bool
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
inputMethodHints(self) → Qt.InputMethodHints
inputMethodQuery(self, Qt.InputMethodQuery) → Any
DistanceMatrixPlotDialog.insertAction(self, QAction, QAction)
insertActions(self, QAction, Iterable[QAction])
DistanceMatrixPlotDialog.insertToolBar(self, QToolBar, QToolBar)
insertToolBarBreak(self, QToolBar)
installEventFilter(self, QObject)
interior()

Return the interior frame where client widgets should be parented from

isActiveWindow(self) → bool
isAncestorOf(self, QWidget) → bool
isAnimated(self) → bool
isDockNestingEnabled(self) → bool
isDockableInMaestro()

Returns True if the PyQt panel can be docked into Maestro mainwindow. Otherwise returns false. This function should be called only after parsing the ‘dockable’ argument inside the constructor.

isEnabled(self) → bool
isEnabledTo(self, QWidget) → bool
isFullScreen(self) → bool
isHidden(self) → bool
isLeftToRight(self) → bool
isMaximized(self) → bool
isMinimized(self) → bool
isModal(self) → bool
isRightToLeft(self) → bool
isSeparator(self, QPoint) → bool
isSignalConnected(self, QMetaMethod) → bool
isVisible(self) → bool
isVisibleTo(self, QWidget) → bool
isWidgetType(self) → bool
isWindow(self) → bool
isWindowModified(self) → bool
isWindowType(self) → bool
jobCompleted
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
keyboardGrabber() → QWidget
killTimer(self, int)
launchJobCmd(cmd)

Launches job control command. Automatically tracked by the job status button (no need to call monitorJob method afterwards). NOTE: Unlike similar method in AF2, this method does not add -HOST etc options.

layout(self) → QLayout
layoutDirection(self) → Qt.LayoutDirection
leaveEvent(self, QEvent)
locale(self) → QLocale
logicalDpiX(self) → int
logicalDpiY(self) → int
lower(self)
mapFrom(self, QWidget, QPoint) → QPoint
mapFromGlobal(self, QPoint) → QPoint
mapFromParent(self, QPoint) → QPoint
mapTo(self, QWidget, QPoint) → QPoint
mapToGlobal(self, QPoint) → QPoint
mapToParent(self, QPoint) → QPoint
mask(self) → QRegion
maximumHeight(self) → int
maximumSize(self) → QSize
maximumWidth(self) → int
menuBar(self) → QMenuBar
menuWidget(self) → QWidget
metaObject(self) → QMetaObject
metric(self, QPaintDevice.PaintDeviceMetric) → int
minimumHeight(self) → int
minimumSize(self) → QSize
minimumSizeHint(self) → QSize
minimumWidth(self) → int
monitorJob(jobid, showpanel=False)

Monitor the given jobid and show the monitor panel; if in maestro.

Parameters
  • jobid – jobid of the job to monitor

  • showpanel – whether to bring up the Monitor panel. By default, the panel will open if the “Open Monitor panel” preference is set.

Example, after launching the job, use the jobid to issue the command:

<AppFramework_instance>.monitorJob(<jobid>)
mouseDoubleClickEvent(self, QMouseEvent)
mouseGrabber() → QWidget
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
move(self, QPoint)

move(self, int, int)

moveEvent(self, QMoveEvent)
moveToThread(self, QThread)
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) → Tuple[bool, int]
nativeParentWidget(self) → QWidget
nextInFocusChain(self) → QWidget
normalGeometry(self) → QRect
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

overrideWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
overrideWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
paintEngine(self) → QPaintEngine
paintEvent(self, QPaintEvent)
paintingActive(self) → bool
palette(self) → QPalette
parent(self) → QObject
parentWidget(self) → QWidget
physicalDpiX(self) → int
physicalDpiY(self) → int
pos(self) → QPoint
previousInFocusChain(self) → QWidget
processEvents()

Allow the QApplication’s or Maestro’s main event loop to process pending events.

property(self, str) → Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

question(msg, button1='OK', button2='Cancel', title='Question')

Display a prompt dialog window with specified text. Returns True if first button (default OK) is pressed, False otherwise.

quitPanel()

Quit the panel (even if in Maestro)

Note that the calling script needs to unset the variable that holds this panel instance in order to truly delete the panel. For example, this method should be subclassed as follows:

def quitPanel(self):

global mypanel # Where mypanel is the variable holding this object appframework.AppFramework.quitPanel(self) mypanel = None

raise_(self)
receivers(self, PYQT_SIGNAL) → int
rect(self) → QRect
releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, int)
removeAction(self, QAction)
removeDockWidget(self, QDockWidget)
removeEventFilter(self, QObject)
removeToolBar(self, QToolBar)
removeToolBarBreak(self, QToolBar)
render(self, QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))

render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren))

repaint(self)

repaint(self, int, int, int, int) repaint(self, QRect) repaint(self, QRegion)

resize(self, QSize)

resize(self, int, int)

resizeDocks(self, Iterable[QDockWidget], Iterable[int], Qt.Orientation)
resizeEvent(self, QResizeEvent)
restoreCursor(app_wide=True)

Restore the application level cursor to the default. If ‘app_wide’ is True then if will be restored for the entire application, if it’s False, it will be just for this panel.

restoreDockWidget(self, QDockWidget) → bool
restoreGeometry(self, Union[QByteArray, bytes, bytearray]) → bool
restoreState(self, Union[QByteArray, bytes, bytearray], version: int = 0) → bool
saveGeometry(self) → QByteArray
saveState(self, version: int = 0) → QByteArray
DistanceMatrixPlotDialog.scroll(self, int, int)

scroll(self, int, int, QRect)

sender(self) → QObject
senderSignalIndex(self) → int
setAcceptDrops(self, bool)
setAccessibleDescription(self, str)
setAccessibleName(self, str)
setAnimated(self, bool)
setAttribute(self, Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, bool)
setBackgroundRole(self, QPalette.ColorRole)
DistanceMatrixPlotDialog.setBaseSize(self, int, int)

setBaseSize(self, QSize)

setButtonEnabled(button, enabled)

Enable / disable the specified button, e.g.,

self.setButtonEnabled(‘start’, False)

Raises a RuntimeError if the button doesn’t exist.

setButtonState(button, state)

Set the state of the specified button, e.g.,

self.setButtonState(‘start’, ‘disabled’)

The standard state is ‘normal’. Raises a RuntimeError if the button doesn’t exist or if the requested state can’t be set.

Obsolete. Please use setButtonEnabled() method instead.

setCentralWidget(self, QWidget)
DistanceMatrixPlotDialog.setContentsMargins(self, int, int, int, int)

setContentsMargins(self, QMargins)

setContextMenuPolicy(self, Qt.ContextMenuPolicy)
setCorner(self, Qt.Corner, Qt.DockWidgetArea)
setCursor(self, Union[QCursor, Qt.CursorShape])
setDisabled(self, bool)
setDockNestingEnabled(self, bool)
setDockOptions(self, Union[QMainWindow.DockOptions, QMainWindow.DockOption])
setDocumentMode(self, bool)
setEnabled(self, bool)
setFixedHeight(self, int)
setFixedSize(self, QSize)

setFixedSize(self, int, int)

setFixedWidth(self, int)
setFocus(self)

setFocus(self, Qt.FocusReason)

setFocusPolicy(self, Qt.FocusPolicy)
setFocusProxy(self, QWidget)
setFont(self, QFont)
setForegroundRole(self, QPalette.ColorRole)
setGeometry(self, QRect)

setGeometry(self, int, int, int, int)

setGraphicsEffect(self, QGraphicsEffect)
setHidden(self, bool)
setIconSize(self, QSize)
setInputMethodHints(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])
setJobname(jobname)
setLayout(self, QLayout)
setLayoutDirection(self, Qt.LayoutDirection)
setLocale(self, QLocale)
setMask(self, QBitmap)

setMask(self, QRegion)

setMaximumHeight(self, int)
DistanceMatrixPlotDialog.setMaximumSize(self, int, int)

setMaximumSize(self, QSize)

setMaximumWidth(self, int)
setMenuBar(self, QMenuBar)
setMenuWidget(self, QWidget)
setMinimumHeight(self, int)
DistanceMatrixPlotDialog.setMinimumSize(self, int, int)

setMinimumSize(self, QSize)

setMinimumWidth(self, int)
setMouseTracking(self, bool)
setObjectName(self, str)
setPalette(self, QPalette)
setParent(self, QWidget)

setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType])

setProgress(step, total_steps)

Set the progress bar value (bottom of the panel) to <step> out of <total_steps>

Set both to 0 to hide the progress bar.

setProgressError(error)

Set the color of the progress bar to red (error=True) or normal color (error=False).

setProperty(self, str, Any) → bool
setShortcutAutoRepeat(self, int, enabled: bool = True)
setShortcutEnabled(self, int, enabled: bool = True)
DistanceMatrixPlotDialog.setSizeIncrement(self, int, int)

setSizeIncrement(self, QSize)

setSizePolicy(self, QSizePolicy)

setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy)

setStatusBar(self, QStatusBar)
setStatusTip(self, str)
setStyle(self, QStyle)
setStyleSheet(self, str)
DistanceMatrixPlotDialog.setTabOrder(QWidget, QWidget)
setTabPosition(self, Union[Qt.DockWidgetAreas, Qt.DockWidgetArea], QTabWidget.TabPosition)
setTabShape(self, QTabWidget.TabShape)
setTabletTracking(self, bool)
setToolButtonStyle(self, Qt.ToolButtonStyle)
setToolTip(self, str)
setToolTipDuration(self, int)
setUnifiedTitleAndToolBarOnMac(self, bool)
setUpdatesEnabled(self, bool)
setVisible(self, bool)
setWaitCursor(app_wide=True)

Set the cursor to the wait cursor. This will be an hourglass, clock or similar. Call restoreCursor() to return to the default cursor. If ‘app_wide’ is True then it will apply to the entire application (including Maestro if running there). If it’s False then it will apply only to this panel.

setWhatsThis(self, str)
setWindowFilePath(self, str)
setWindowFlag(self, Qt.WindowType, on: bool = True)
setWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
setWindowIcon(self, QIcon)
setWindowIconText(self, str)
setWindowModality(self, Qt.WindowModality)
setWindowModified(self, bool)
setWindowOpacity(self, float)
setWindowRole(self, str)
setWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
setWindowTitle(self, str)
setupJobParameters()

Setups up the job parameters from the state of the input frame. Do not call directly from your script.

Returns True if success, False on error (after displaying an error message).

sharedPainter(self) → QPainter
showEvent(show_event)

Override the normal processing when the panel is shown.

showFullScreen(self)
showMaximized(self)
showMinimized(self)
showNormal(self)
signalsBlocked(self) → bool
size(self) → QSize
sizeHint(self) → QSize
sizeIncrement(self) → QSize
sizePolicy(self) → QSizePolicy
splitDockWidget(self, QDockWidget, QDockWidget, Qt.Orientation)
stackUnder(self, QWidget)
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
start_wrapper_timeout = 3000
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
statusBar(self) → QStatusBar
statusTip(self) → str
style(self) → QStyle
styleSheet(self) → str
tabPosition(self, Qt.DockWidgetArea) → QTabWidget.TabPosition
tabShape(self) → QTabWidget.TabShape
tabifiedDockWidgetActivated

tabifiedDockWidgetActivated(self, QDockWidget) [signal]

tabifiedDockWidgets(self, QDockWidget) → List[QDockWidget]
DistanceMatrixPlotDialog.tabifyDockWidget(self, QDockWidget, QDockWidget)
tabletEvent(self, QTabletEvent)
takeCentralWidget(self) → QWidget
testAttribute(self, Qt.WidgetAttribute) → bool
thread(self) → QThread
timerEvent(self, QTimerEvent)
toolBarArea(self, QToolBar) → Qt.ToolBarArea
toolBarBreak(self, QToolBar) → bool
toolButtonStyle(self) → Qt.ToolButtonStyle
toolButtonStyleChanged

toolButtonStyleChanged(self, Qt.ToolButtonStyle) [signal]

toolTip(self) → str
toolTipDuration(self) → int
tr(self, str, disambiguation: str = None, n: int = - 1) → str
trackJobProgress(job)

Display a progress dialog showing the progress of this job. (Any previously tracked job will no longer be tracked)

job - a jobcontrol.Job object.

underMouse(self) → bool
ungrabGesture(self, Qt.GestureType)
unifiedTitleAndToolBarOnMac(self) → bool
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)

update(self, QRect) update(self, QRegion) update(self, int, int, int, int)

updateGeometry(self)
updateJobname()

Update jobname in parameters from main window.

updateMicroFocus(self)
updateStatusBar()

Updates the status bar.

updatesEnabled(self) → bool
visibleRegion(self) → QRegion
warning(text, preferences=None, key=None)

Display a warning dialog with the specified text. If preferences and key are both supplied, then the dialog will contain a “Don’t show this again” checkbox. Future invocations of this dialog with the same preferences and key values will obey the user’s show preference.

Parameters
  • text (str) – The information to display in the dialog

  • preferences – obsolete; ignored.

  • key (str) – The key to store the preference under. If specified, a “Do not show again” checkbox will be rendered in the dialog box.

Return type

None

whatsThis(self) → str
wheelEvent(self, QWheelEvent)
width(self) → int
widthMM(self) → int
winId(self) → sip.voidptr
window(self) → QWidget
windowFilePath(self) → str
windowFlags(self) → Qt.WindowFlags
windowHandle(self) → QWindow
windowIcon(self) → QIcon
windowIconChanged

windowIconChanged(self, QIcon) [signal]

windowIconText(self) → str
windowIconTextChanged

windowIconTextChanged(self, str) [signal]

windowModality(self) → Qt.WindowModality
windowOpacity(self) → float
windowRole(self) → str
windowState(self) → Qt.WindowStates
windowTitle(self) → str
windowTitleChanged

windowTitleChanged(self, str) [signal]

windowType(self) → Qt.WindowType
x(self) → int
y(self) → int