schrodinger.ui.qt.appframework module

This module provides GUI classes that mimic Maestro panels and dialogs. The main class is AppFramework for running Python applications with a Maestro look-and-feel. It provides a menu, standard buttons (Start, Write, Reset), a Start dialog, a Write dialog, a input source selector, and methods for adding all the relevant job parameters to a single object (used by the user when creating input files and launching jobs). The StartDialog and WriteDialog actually can be used independently of AppFramework, in case a user doesn’t require a full Maestro-like panel. There also is an AppDialog class for a Maestro-like dialog (i.e., with buttons packed in the lower right corner).

PyQt Note: You can specify the QtDesigner-generated form via the <ui> argument. Widgets defined within that form are automatically included in the window. The form should be read from the _ui.py file as follows:

import <my_script_ui>
ui = my_script_ui.Ui_Form()

AppFramework places key job information (e.g., the jobname and host from the StartDialog) into a JobParameters object that is stored as the ‘jobparam’ attribute. When the user’s start or write method is called, retrieve the needed job information from that object.

AppFramework provides a method for application-specific job data to be placed into the JobParameters object. Suppose the user’s GUI is modular, with several frames responsible for various parameters of the job. Any object that has a ‘setup’ method can be registered with the AppFramework object, and this method will be called as part of the setup cascade that occurs when the Start or Write button is pressed. To register an object, append the object to the AppFramework’s ‘setup’ list. The JobParameters object will be passed to the registered object via the ‘setup’ method. The ‘setup’ method should return True if the setup cascade should continue (i.e., there are no problems).

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.ui.qt.appframework.get_next_jobname(prefix, starting_num=1)

Given a job name prefix, choose the next available job name based on the names of existing files in the CWD.

Parameters:starting_num (int) – The smallest number to append to the job name
Returns:The completed job name
Return type:str
schrodinger.ui.qt.appframework.make_desres_layout(product_text='', flip=False, vertical=False, third_party_name='Desmond', third_party_dev='Developed by D. E. Shaw Research')

Generate a QLayout containing the Desres logo and Schrodinger product info

Parameters:
  • product_text (str) – Name of Schrodinger product to add opposite the DESRES logo
  • flip (bool) – whether to reverse the two logos left/right
  • vertical (bool) – whether to display the logos stacked vertically or side by side horizontally
  • third_party_name (str) – The name of the third party product
  • third_party_dev (str) – The developer of the third party product
schrodinger.ui.qt.appframework.make_desres_about_button(parent)

Generate the about button with copyright information for DESRES panels.

Parameters:parent (QWidget) – The parent widget (the panel)
class schrodinger.ui.qt.appframework.CustomProgressBar(parentwidget)

Bases: PyQt5.QtWidgets.QProgressBar

Class for a custom progress bar (at the bottom of some panels). Brings up the monitor panel if clicked (and if monitoring a job).

__init__(parentwidget)

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

setError(error)

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

mousePressEvent(self, QMouseEvent)
BottomToTop = 1
class Direction

Bases: int

__init__ = <method-wrapper '__init__' of sip.enumtype object at 0x1ebe2d8>
DrawChildren = 2
DrawWindowBackground = 1
IgnoreMask = 4
class PaintDeviceMetric

Bases: int

__init__ = <method-wrapper '__init__' of sip.enumtype object at 0x1f8e7f8>
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

__init__ = <method-wrapper '__init__' of sip.enumtype object at 0x1f79678>
class RenderFlags

Bases: sip.simplewrapper

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

__init__

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

TopToBottom = 0
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])
adjustSize(self)
alignment(self) → Qt.Alignment
autoFillBackground(self) → bool
backgroundRole(self) → QPalette.ColorRole
baseSize(self) → QSize
blockSignals(self, bool) → bool
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)
close(self) → bool
closeEvent(self, QCloseEvent)
colorCount(self) → int
connectNotify(self, QMetaMethod)
contentsMargins(self) → QMargins
contentsRect(self) → QRect
contextMenuEvent(self, QContextMenuEvent)
contextMenuPolicy(self) → Qt.ContextMenuPolicy
create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
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)
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)
event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
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
format(self) → str
frameGeometry(self) → QRect
frameSize(self) → QSize
geometry(self) → QRect
getContentsMargins(self) → Tuple[int, int, int, int]
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
hide(self)
hideEvent(self, QHideEvent)
inherits(self, str) → bool
initPainter(self, QPainter)
initStyleOption(self, QStyleOptionProgressBar)
inputMethodEvent(self, QInputMethodEvent)
inputMethodHints(self) → Qt.InputMethodHints
inputMethodQuery(self, Qt.InputMethodQuery) → Any
insertAction(self, QAction, QAction)
insertActions(self, QAction, Iterable[QAction])
installEventFilter(self, QObject)
isActiveWindow(self) → bool
isAncestorOf(self, QWidget) → bool
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
isSignalConnected(self, QMetaMethod) → bool
isTextVisible(self) → bool
isVisible(self) → bool
isVisibleTo(self, QWidget) → bool
isWidgetType(self) → bool
isWindow(self) → bool
isWindowModified(self) → bool
isWindowType(self) → bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
keyboardGrabber() → QWidget
killTimer(self, int)
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
maximum(self) → int
maximumHeight(self) → int
maximumSize(self) → QSize
maximumWidth(self) → int
metaObject(self) → QMetaObject
metric(self, QPaintDevice.PaintDeviceMetric) → int
minimum(self) → int
minimumHeight(self) → int
minimumSize(self) → QSize
minimumSizeHint(self) → QSize
minimumWidth(self) → int
mouseDoubleClickEvent(self, QMouseEvent)
mouseGrabber() → QWidget
mouseMoveEvent(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]

orientation(self) → Qt.Orientation
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
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.

raise_(self)
receivers(self, PYQT_SIGNAL) → int
rect(self) → QRect
releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, int)
removeAction(self, QAction)
removeEventFilter(self, QObject)
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)

reset(self)
resetFormat(self)
resize(self, QSize)

resize(self, int, int)

resizeEvent(self, QResizeEvent)
restoreGeometry(self, Union[QByteArray, bytes, bytearray]) → bool
saveGeometry(self) → QByteArray
scroll(self, int, int)

scroll(self, int, int, QRect)

sender(self) → QObject
senderSignalIndex(self) → int
setAcceptDrops(self, bool)
setAccessibleDescription(self, str)
setAccessibleName(self, str)
setAlignment(self, Union[Qt.Alignment, Qt.AlignmentFlag])
setAttribute(self, Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, bool)
setBackgroundRole(self, QPalette.ColorRole)
setBaseSize(self, int, int)

setBaseSize(self, QSize)

setContentsMargins(self, int, int, int, int)

setContentsMargins(self, QMargins)

setContextMenuPolicy(self, Qt.ContextMenuPolicy)
setCursor(self, Union[QCursor, Qt.CursorShape])
setDisabled(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)
setFormat(self, str)
setGeometry(self, QRect)

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

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

setMask(self, QRegion)

setMaximum(self, int)
setMaximumHeight(self, int)
setMaximumSize(self, int, int)

setMaximumSize(self, QSize)

setMaximumWidth(self, int)
setMinimum(self, int)
setMinimumHeight(self, int)
setMinimumSize(self, int, int)

setMinimumSize(self, QSize)

setMinimumWidth(self, int)
setMouseTracking(self, bool)
setObjectName(self, str)
setOrientation(self, Qt.Orientation)
setPalette(self, QPalette)
setParent(self, QWidget)

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

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

setSizeIncrement(self, QSize)

setSizePolicy(self, QSizePolicy)

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

setStatusTip(self, str)
setStyle(self, QStyle)
setStyleSheet(self, str)
setTabOrder(QWidget, QWidget)
setTabletTracking(self, bool)
setTextDirection(self, QProgressBar.Direction)
setTextVisible(self, bool)
setToolTip(self, str)
setToolTipDuration(self, int)
setUpdatesEnabled(self, bool)
setValue(self, int)
setVisible(self, bool)
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)
sharedPainter(self) → QPainter
show(self)
showEvent(self, QShowEvent)
showFullScreen(self)
showMaximized(self)
showMinimized(self)
showNormal(self)
signalsBlocked(self) → bool
size(self) → QSize
sizeHint(self) → QSize
sizeIncrement(self) → QSize
sizePolicy(self) → QSizePolicy
stackUnder(self, QWidget)
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
statusTip(self) → str
style(self) → QStyle
styleSheet(self) → str
tabletEvent(self, QTabletEvent)
testAttribute(self, Qt.WidgetAttribute) → bool
text(self) → str
thread(self) → QThread
timerEvent(self, QTimerEvent)
toolTip(self) → str
toolTipDuration(self) → int
tr(self, str, disambiguation: str = None, n: int = -1) → str
underMouse(self) → bool
ungrabGesture(self, Qt.GestureType)
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)

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

updateGeometry(self)
updateMicroFocus(self)
updatesEnabled(self) → bool
value(self) → int
valueChanged

valueChanged(self, int) [signal]

visibleRegion(self) → QRegion
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
schrodinger.ui.qt.appframework.question(msg, button1='OK', button2='Cancel', parent=0, title='Question')

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

schrodinger.ui.qt.appframework.filter_string_from_supported(support_mae=False, support_sd=False, support_pdb=False, support_cms=False)

Return a Qt filter string for these formats.

Parameters:
  • support_mae (bool) – Whether to support maestro (strict) format.
  • support_sd (bool) – Whether to support SD format.
  • support_pdb (bool) – Whether to support PDB format.
  • support_cms (bool) – Whether to support Desmond CMS files.
Returns:

Qt filter string

Return type:

str

class schrodinger.ui.qt.appframework.AppDockWidget(master, object_name, dockarea)

Bases: schrodinger.ui.maestro_ui.MM_QDockWidget

A DockWidget that calls the parent class’s closeEvent when closing

__init__(master, object_name, dockarea)

Create an AppDockWidget instance

Parameters:master (QWidget) – The parent widget whose closeEvent method will get called when the QDockWidget closes
closeEvent(event)

Called by PyQt when the dock widget is closing. Calls the parent window’s closeEvent.

Parameters:event (QCloseEvent) – The QCloseEvent generated by the widget closing
AllDockWidgetFeatures = 7
DockWidgetClosable = 1
class DockWidgetFeature

Bases: int

__init__ = <method-wrapper '__init__' of sip.enumtype object at 0x2c6b198>
class DockWidgetFeatures

Bases: sip.simplewrapper

QDockWidget.DockWidgetFeatures(Union[QDockWidget.DockWidgetFeatures, QDockWidget.DockWidgetFeature]) QDockWidget.DockWidgetFeatures(QDockWidget.DockWidgetFeatures)

__init__

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

DockWidgetFloatable = 4
DockWidgetMovable = 2
DockWidgetVerticalTitleBar = 8
DrawChildren = 2
DrawWindowBackground = 1
IgnoreMask = 4
NoDockWidgetFeatures = 0
class PaintDeviceMetric

Bases: int

__init__ = <method-wrapper '__init__' of sip.enumtype object at 0x1f8e7f8>
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

__init__ = <method-wrapper '__init__' of sip.enumtype object at 0x1f79678>
class RenderFlags

Bases: sip.simplewrapper

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

__init__

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

acceptDrops(self) → bool
accessibleDescription(self) → str
accessibleName(self) → str
actionEvent()
actions(self) → List[QAction]
activateWindow(self)
addAction(self, QAction)
addActions(self, Iterable[QAction])
adjustSize(self)
allowedAreas(self) → Qt.DockWidgetAreas
allowedAreasChanged

allowedAreasChanged(self, Union[Qt.DockWidgetAreas, Qt.DockWidgetArea]) [signal]

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

childAt(self, int, int) -> QWidget

childEvent()
children(self) → List[QObject]
childrenRect(self) → QRect
childrenRegion(self) → QRegion
clearFocus(self)
clearMask(self)
close(self) → bool
colorCount(self) → int
connectNotify()
contentsMargins(self) → QMargins
contentsRect(self) → QRect
contextMenuEvent()
contextMenuPolicy(self) → Qt.ContextMenuPolicy
create()
createWindowContainer(QWindow, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = 0) → QWidget
cursor(self) → QCursor
customContextMenuRequested

customContextMenuRequested(self, QPoint) [signal]

customEvent()
deleteLater(self)
depth(self) → int
destroy()
destroyed

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

devType(self) → int
devicePixelRatio(self) → int
devicePixelRatioF(self) → float
devicePixelRatioFScale() → float
disconnect(self)
disconnectNotify()
dockLocationChanged

dockLocationChanged(self, Qt.DockWidgetArea) [signal]

dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → List[QByteArray]
effectiveWinId(self) → sip.voidptr
ensurePolished(self)
enterEvent()
event()
eventFilter(self, QObject, QEvent) → bool
features(self) → QDockWidget.DockWidgetFeatures
featuresChanged

featuresChanged(self, Union[QDockWidget.DockWidgetFeatures, QDockWidget.DockWidgetFeature]) [signal]

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()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPolicy(self) → Qt.FocusPolicy
focusPreviousChild()
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
getContentsMargins(self) → Tuple[int, int, int, int]
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
hide(self)
hideEvent()
inherits(self, str) → bool
initPainter()
initStyleOption()
inputMethodEvent()
inputMethodHints(self) → Qt.InputMethodHints
inputMethodQuery(self, Qt.InputMethodQuery) → Any
insertAction(self, QAction, QAction)
insertActions(self, QAction, Iterable[QAction])
installEventFilter(self, QObject)
isActiveWindow(self) → bool
isAncestorOf(self, QWidget) → bool
isAreaAllowed(self, Qt.DockWidgetArea) → bool
isEnabled(self) → bool
isEnabledTo(self, QWidget) → bool
isFloating(self) → bool
isFullScreen(self) → bool
isHidden(self) → bool
isLeftToRight(self) → bool
isMaximized(self) → bool
isMinimized(self) → bool
isModal(self) → bool
isRightToLeft(self) → bool
isSignalConnected()
isVisible(self) → bool
isVisibleTo(self, QWidget) → bool
isWidgetType(self) → bool
isWindow(self) → bool
isWindowModified(self) → bool
isWindowType(self) → bool
keyPressEvent()
keyReleaseEvent()
keyboardGrabber() → QWidget
killTimer(self, int)
layout(self) → QLayout
layoutDirection(self) → Qt.LayoutDirection
leaveEvent()
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
metaObject(self) → QMetaObject
metric()
minimumHeight(self) → int
minimumSize(self) → QSize
minimumSizeHint(self) → QSize
minimumWidth(self) → int
mouseDoubleClickEvent()
mouseGrabber() → QWidget
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
move(self, QPoint)

move(self, int, int)

moveEvent()
moveToThread(self, QThread)
nativeEvent()
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()
paintingActive(self) → bool
palette(self) → QPalette
parent(self) → QObject
parentWidget(self) → QWidget
physicalDpiX(self) → int
physicalDpiY(self) → int
pos(self) → QPoint
previousInFocusChain(self) → QWidget
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.

pythonPanelAboutToBeClosed
raise_(self)
receivers()
reconfigureDockWidget
rect(self) → QRect
releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, int)
removeAction(self, QAction)
removeEventFilter(self, QObject)
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)

resizeEvent()
restoreGeometry(self, Union[QByteArray, bytes, bytearray]) → bool
saveGeometry(self) → QByteArray
scroll(self, int, int)

scroll(self, int, int, QRect)

sender()
senderSignalIndex()
setAcceptDrops(self, bool)
setAccessibleDescription(self, str)
setAccessibleName(self, str)
setAllowedAreas(self, Union[Qt.DockWidgetAreas, Qt.DockWidgetArea])
setAttribute(self, Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, bool)
setBackgroundRole(self, QPalette.ColorRole)
setBaseSize(self, int, int)

setBaseSize(self, QSize)

setContentsMargins(self, int, int, int, int)

setContentsMargins(self, QMargins)

setContextMenuPolicy(self, Qt.ContextMenuPolicy)
setCursor(self, Union[QCursor, Qt.CursorShape])
setDisabled(self, bool)
setEnabled(self, bool)
setFeatures(self, Union[QDockWidget.DockWidgetFeatures, QDockWidget.DockWidgetFeature])
setFixedHeight(self, int)
setFixedSize(self, QSize)

setFixedSize(self, int, int)

setFixedWidth(self, int)
setFloating(self, bool)
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)
setInputMethodHints(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])
setLayout(self, QLayout)
setLayoutDirection(self, Qt.LayoutDirection)
setLocale(self, QLocale)
setMask(self, QBitmap)

setMask(self, QRegion)

setMaximumHeight(self, int)
setMaximumSize(self, int, int)

setMaximumSize(self, QSize)

setMaximumWidth(self, int)
setMinimumHeight(self, int)
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])

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

setSizeIncrement(self, QSize)

setSizePolicy(self, QSizePolicy)

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

setStatusTip(self, str)
setStyle(self, QStyle)
setStyleSheet(self, str)
setTabOrder(QWidget, QWidget)
setTabletTracking(self, bool)
setTitleBarWidget(self, QWidget)
setToolTip(self, str)
setToolTipDuration(self, int)
setUpdatesEnabled(self, bool)
setVisible(self, bool)
setWhatsThis(self, str)
setWidget(self, QWidget)
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)
setupDockWidget
sharedPainter()
show(self)
showEvent()
showFullScreen(self)
showMaximized(self)
showMinimized(self)
showNormal(self)
signalsBlocked(self) → bool
size(self) → QSize
sizeHint(self) → QSize
sizeIncrement(self) → QSize
sizePolicy(self) → QSizePolicy
stackUnder(self, QWidget)
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
statusTip(self) → str
style(self) → QStyle
styleSheet(self) → str
tabletEvent()
testAttribute(self, Qt.WidgetAttribute) → bool
thread(self) → QThread
timerEvent()
titleBarWidget(self) → QWidget
toggleViewAction(self) → QAction
toolTip(self) → str
toolTipDuration(self) → int
topLevelChanged

topLevelChanged(self, bool) [signal]

tr(self, str, disambiguation: str = None, n: int = -1) → str
underMouse(self) → bool
ungrabGesture(self, Qt.GestureType)
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)

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

updateGeometry(self)
updateMicroFocus()
updatesEnabled(self) → bool
visibilityChanged

visibilityChanged(self, bool) [signal]

visibleRegion(self) → QRegion
whatsThis(self) → str
wheelEvent()
widget(self) → QWidget
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.ui.qt.appframework.AppFramework(ui=None, title=None, subwindow=False, dockable=False, dockarea=2, buttons=None, dialogs=None, inputframe=None, menu=None, periodic_callback=None, config_dialog_class=<class 'schrodinger.ui.qt.config_dialog.ConfigDialog'>, help_topic=None, show_desres_icon=False, product_text='', flip=False)

Bases: PyQt5.QtWidgets.QMainWindow

The AppFramework class is basically a hull for applications.

With its own instance of a DialogParameters class, Application manages Schrodinger dialogs like start, read, and write so that the programmer is free to worry about other things. The dialogs can be manipulated at anytime to fit the needs of the programmer (please see the DialogParameters class below).

The Application class also comes with an instance of the JobParameters class (jobparam). This object is intended to be used to store all GUI settings. Please see the JobParameters class below for more information on proper usage.

In addition to these features, the AppFramework class can take arguments for Main Menu creation.

Supposing I wanted a menu of the form:

File      Edit              Help
^Save     ^Options          ^About
^Close    ^^First Option
          ^^Second Option

When I create my AppFramework instance, I would pass the following keyword, value pair:

menu = {
    1: ["File", "Edit", "Help"],
    "File": {
                "Save": {"command": <command_here>},
                "Close": {"command": <command_here>},
             },
    "Edit": {"Options": {
        "First Option": {"command": <command_here>},
        "Second Option": {"command": <command_here>},
         },
            },
    "Help": {
            "About": {"command": <command_here>},
            },
    }

The dictionary key 1 (int form, not string form) is the key for an ordering list. Because dictionaries are not ordered, this is needed to specify your prefered order.

AppFramework also manages the Bottom Button Bar. One more keyword for the AppFramework instance is “buttons”, and would appear like:

buttons = {"start": {"command": <command_here>},
                     "dialog": <boolean_show_dialog?>},
           "read": {"command": <command_here>},
           "write": {"command": <command_here>,
                     "dialog": <boolean_show_dialog?>},
           "reset": {"command": <command_here>},
           "close": {"command": <command_here>},
           "help": {"command": <command_here>},
           }

The six supported buttons are “start”, “read”, “write”, “reset”, “close”, and “help”. Any button name for which you supply a command will be created and placed in the correct location.

Non-default button names can be used by supplying a ‘text’ keyword.

You can also specify a command for start, read, and write buttons that will be called when the button is pressed before displaying the dialog with the ‘precommand’ keyword. For example, you may want to check an input before allowing the start dialog to appear. These functions should return 0 unless the dialog should not be displayed (nor the specified start/read/write function called). Any function that returns a non-zero value will halt the dialog process, and return to the GUI.

If “checkcommand” is specified, then this function will be called when the user clicks on the Start/Write button (before closing the dialog), and if the function returns a non-zero value, the dialog will not close. The only argument that is given is a job name. This callback is typically used to check for existing files based on the user-specified jobname. IMPORTANT: If the function returns 0, and <jobname>.maegz exists, AppFramework will overwrite the file without asking the user. It is up to your application to make sure the user is okay with that file being overwritten.

Before the user supplied command is called, if there is an associated dialog, the AppFramework presents the dialog, saves the input in the jobparam object mentioned above. Then AppFramework calls the command.

Button configuration options are:

  • command - Required callback function.
  • precommand - Optional command called prior to displaying dialog. Available for Start, Read, and Write dialogs.
  • dialog - If False, the Start or Write dialog is not displayed.
  • text - If used, overrides the text of the button.

Finally, there is an Input Frame that can be used. Please see that class below for information on proper use.

Parameters:
  • subwindow (bool) – If subwindow is True, this panel will not try to start a new QApplication instance even if running outside of Maestro (useful for subwindows when a main window is already running).
  • dockable (bool) – If True this instance will be dockable in Maestro.
  • dockarea (Qt QFlags (See constants at top of this module)) – By default this is to the right, but you can specify any of the DOCK_AREA constants specified in this module.
  • periodic_callback (callable) – If specified, this function will be called periodically, a few times a second (frequency is not guaranteed).
  • config_dialog_class (ConfigDialog class or subclass of ConfigDialog) – This allows you to pass in custom dialogs to be used to configure your panel.
  • help_topic (str) – If given, a help button will be created and connected to the specified topic. Note that if help_topic is given, then buttons[‘help’][‘command’] will be ignored.
  • show_desres_icon (bool) – A large amount of panels are contractually bound to show a DE Shaw Research icon, turning this to True will automatically add it to the bottom of the panel.
  • product_text (str) – In panels where DE Shaw Research requires an icon (see above), we also sometimes need to specify that parts of the technology present were developed by Schrodinger. This option will only be used if show_desres_icon==True.
jobCompleted
__init__(ui=None, title=None, subwindow=False, dockable=False, dockarea=2, buttons=None, dialogs=None, inputframe=None, menu=None, periodic_callback=None, config_dialog_class=<class 'schrodinger.ui.qt.config_dialog.ConfigDialog'>, help_topic=None, show_desres_icon=False, product_text='', flip=False)

See class docstring.

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.

interior()

Return the interior frame where client widgets should be parented from

addCentralWidget(w)

Add a widget to the central area of the AppFramework dialog

exec_()

Calls exec_() method of the application.

show(also_raise=True, also_activate=True)

Redefine the show() method to deiconize if necessary and also raise_() the panel if ‘also_raise’ is specified as True.

Parameters:
  • also_raise (bool) – If True (default), the raise_ method will also be called on the window. If False it is not. This is important on some Window managers to ensure the window is placed on top of other windows.
  • also_activate (bool) – If True (default), the activateWindow method will also be called on the window. If False it is not. This is important on some Window managers to ensure the window is placed on top of other windows.
createMenus(d)

Setup for making individual menus, create MainMenuBar.

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
updateJobname()

Update jobname in parameters from main window.

start_wrapper_timeout = 3000
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.

setButtonEnabled(button, enabled)

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

self.setButtonEnabled(‘start’, False)

Raises a RuntimeError if the button doesn’t exist.

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).

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.

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.

launchJobCmd(cmd)

Launches job control command, and tracks in in the mini-monitor panel (no need to call monitorJob method afterwards). NOTE: Unlike similar method in AF2, this method does not add -HOST etc options.

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>)
processEvents()

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

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

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

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

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.

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.

updateStatusBar()

Updates the status bar.

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.

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.

getApp()

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

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.

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
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.

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.

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).

showEvent(show_event)

Override the normal processing when the panel is shown.

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.

setJobname(jobname)
AllowNestedDocks = 2
AllowTabbedDocks = 4
AnimatedDocks = 1
class DockOption

Bases: int

__init__ = <method-wrapper '__init__' of sip.enumtype object at 0x1eb6148>
class DockOptions

Bases: sip.simplewrapper

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

__init__

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

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

Bases: int

__init__ = <method-wrapper '__init__' of sip.enumtype object at 0x1f8e7f8>
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

__init__ = <method-wrapper '__init__' of sip.enumtype object at 0x1f79678>
class RenderFlags

Bases: sip.simplewrapper

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

__init__

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])
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)
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)
close(self) → bool
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)
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)
event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
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
getContentsMargins(self) → Tuple[int, int, int, int]
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
hide(self)
hideEvent(self, QHideEvent)
iconSize(self) → QSize
iconSizeChanged

iconSizeChanged(self, QSize) [signal]

inherits(self, str) → bool
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
inputMethodHints(self) → Qt.InputMethodHints
inputMethodQuery(self, Qt.InputMethodQuery) → Any
insertAction(self, QAction, QAction)
insertActions(self, QAction, Iterable[QAction])
insertToolBar(self, QToolBar, QToolBar)
insertToolBarBreak(self, QToolBar)
installEventFilter(self, QObject)
isActiveWindow(self) → bool
isAncestorOf(self, QWidget) → bool
isAnimated(self) → bool
isDockNestingEnabled(self) → bool
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
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
keyboardGrabber() → QWidget
killTimer(self, int)
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
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
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.

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)
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
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)
setBaseSize(self, int, int)

setBaseSize(self, QSize)

setCentralWidget(self, QWidget)
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])
setLayout(self, QLayout)
setLayoutDirection(self, Qt.LayoutDirection)
setLocale(self, QLocale)
setMask(self, QBitmap)

setMask(self, QRegion)

setMaximumHeight(self, int)
setMaximumSize(self, int, int)

setMaximumSize(self, QSize)

setMaximumWidth(self, int)
setMenuBar(self, QMenuBar)
setMenuWidget(self, QWidget)
setMinimumHeight(self, int)
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])

setProperty(self, str, Any) → bool
setShortcutAutoRepeat(self, int, enabled: bool = True)
setShortcutEnabled(self, int, enabled: bool = True)
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)
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)
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)
sharedPainter(self) → QPainter
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
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]
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
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)
updateMicroFocus(self)
updatesEnabled(self) → bool
visibleRegion(self) → QRegion
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.ui.qt.appframework.ReadDialog(parent, **kwargs)

Bases: object

Dialog allowing user to specify a file to read in. This dialog has some options which are covered in the DialogParameters class below.

Any keyword arguments (e.g., from the DialogParameters for ‘read’) passed to this class are passed to the askopenfilename used as a file browser/selector.

__init__(parent, **kwargs)

See class docstring.

dialog()

Pop up a file browser. Returns the name of the file and also stores it in the parent JobParameters object as ‘readfilename’.

class schrodinger.ui.qt.appframework.WriteDialog(parent, jobname='', title='', checkcommand=None, **kw)

Bases: object

Toplevel Qt widget that mimics the Write dialog.

The jobname is returned by activate()

__init__(parent, jobname='', title='', checkcommand=None, **kw)

The ‘jobname’ will be the starting value of the job name field. The ‘title’ will be used as the title of the window.

If pre_close_command is specified, it will be run when the user presses the Write button. The dialog is only closed if that function returns 0.

writePressed()

Called when the Write button is pressed. Closes the dialog only if the jobname is valid.

warning(text)

Display a warning window with the specified text.

activate()

Display the dialog and return user-selected job name.