schrodinger.ui.qt.config_dialog module¶
This module provides classes for config dialogs (for use with AppFramework). These are dialogs that allow the user to specify parameters for launching a job (jobname, host, #cpus, etc).
- class schrodinger.ui.qt.config_dialog.RequestedAction(value)¶
Bases:
enum.Enum
An enumeration.
- DoNothing = 1¶
- Run = 2¶
- Write = 3¶
- class schrodinger.ui.qt.config_dialog.GpuHostProductMode(value)¶
Bases:
enum.Enum
An enumeration.
- NoGpus = 1¶
- Single = 2¶
- Multiple = 3¶
- SingleOnlyGpu = 4¶
- MultipleOnlyGpu = 5¶
- SingleCpuMultipleGpu = 6¶
- schrodinger.ui.qt.config_dialog.gui_validate_local_gpus()¶
Check for unsupported GPUs and if found, show a messagebox to the user. User may choose to permanently dismiss this via a “Don’t show again” checkbox.
The global bool gpu_validation_done is used to prevent validation from being performed more than once in a single session.
This function is safe to call outside the GUI, and will be a no-op.
- schrodinger.ui.qt.config_dialog.get_num_nprocs(cd_params)¶
Get the number of processes requested by the user
- Parameters
cd_params (
schrodinger.ui.qt.appframework.StartDialogParams
) – The current Config Dialog settings- Return type
int or None
- Returns
The number of CPUs requested by the user if they are using the CPUs option, or the number of simultaneous subjobs if they are using the MP subjobs option. Or None if neither of these are specified.
- class schrodinger.ui.qt.config_dialog.HostProduct(host_menu, cpus_sb, cpus_units_label, gpus_mode, num_processor_widget)¶
Bases:
object
A collection of widgets (e.g. host menu, processor spinbox, labels) for a host product and functionality to update the widgets as needed.
- __init__(host_menu, cpus_sb, cpus_units_label, gpus_mode, num_processor_widget)¶
- Parameters
host_menu (QtWidgets.QComboBox) – Host menu for this host product
cpus_sb (NumProcsSpinBox or None) – CPU entry field for this host product
cpus_units_label (QtWidgets.QLabel or None) – Processors units label for this host product
gpus_mode (int) – GPU mode for this host product. Should be one of GpuHostProductMode.NoGpus, GpuHostProductMode.Single, GpuHostProductMode.Multiple, GpuHostProductMode.SingleOnlyGpu or GpuHostProductMode.MultipleOnlyGpu
num_processor_widget (QtWidgets.QWidget or None) – Widget containing number of processor selection components
- class schrodinger.ui.qt.config_dialog.NumProcsSpinBox(parent=None, min=1, max=10000, default=1)¶
Bases:
PyQt6.QtWidgets.QSpinBox
Spin box specifically for setting number of processors.
- __init__(parent=None, min=1, max=10000, default=1)¶
- Parameters
parent (
QtWidgets.QWidget
) – Parent widgetmin (int) – Min value for this spinbox
max (int) – Max value for this spinbox
default (int) – Default value for this spinbox
- AdaptiveDecimalStepType = 1¶
- class ButtonSymbols(value)¶
Bases:
enum.Enum
An enumeration.
- UpDownArrows = 0¶
- PlusMinus = 1¶
- NoButtons = 2¶
- CorrectToNearestValue = 1¶
- CorrectToPreviousValue = 0¶
- class CorrectionMode(value)¶
Bases:
enum.Enum
An enumeration.
- CorrectToPreviousValue = 0¶
- CorrectToNearestValue = 1¶
- DefaultStepType = 0¶
- DrawChildren = 2¶
- DrawWindowBackground = 1¶
- IgnoreMask = 4¶
- NoButtons = 2¶
- class PaintDeviceMetric(value)¶
Bases:
enum.Enum
An enumeration.
- PdmWidth = 1¶
- PdmHeight = 2¶
- PdmWidthMM = 3¶
- PdmHeightMM = 4¶
- PdmNumColors = 5¶
- PdmDepth = 6¶
- PdmDpiX = 7¶
- PdmDpiY = 8¶
- PdmPhysicalDpiX = 9¶
- PdmPhysicalDpiY = 10¶
- PdmDevicePixelRatio = 11¶
- PdmDevicePixelRatioScaled = 12¶
- PdmDepth = 6¶
- PdmDevicePixelRatio = 11¶
- PdmDevicePixelRatioScaled = 12¶
- PdmDpiX = 7¶
- PdmDpiY = 8¶
- PdmHeight = 2¶
- PdmHeightMM = 4¶
- PdmNumColors = 5¶
- PdmPhysicalDpiX = 9¶
- PdmPhysicalDpiY = 10¶
- PdmWidth = 1¶
- PdmWidthMM = 3¶
- PlusMinus = 1¶
- class RenderFlag(value)¶
Bases:
enum.Flag
An enumeration.
- DrawWindowBackground = 1¶
- DrawChildren = 2¶
- IgnoreMask = 4¶
- StepDownEnabled = 2¶
- class StepEnabledFlag(value)¶
Bases:
enum.Flag
An enumeration.
- StepNone = 0¶
- StepUpEnabled = 1¶
- StepDownEnabled = 2¶
- StepNone = 0¶
- class StepType(value)¶
Bases:
enum.Enum
An enumeration.
- DefaultStepType = 0¶
- AdaptiveDecimalStepType = 1¶
- StepUpEnabled = 1¶
- UpDownArrows = 0¶
- acceptDrops(self) bool ¶
- accessibleDescription(self) str ¶
- accessibleName(self) str ¶
- actionEvent(self, a0: QActionEvent)¶
- actions(self) List[QAction] ¶
- activateWindow(self)¶
- addAction(self, action: QAction)¶
- addActions(self, actions: Iterable[QAction])¶
- adjustSize(self)¶
- alignment(self) Qt.AlignmentFlag ¶
- autoFillBackground(self) bool ¶
- backgroundRole(self) QPalette.ColorRole ¶
- baseSize(self) QSize ¶
- blockSignals(self, b: bool) bool ¶
- buttonSymbols(self) QAbstractSpinBox.ButtonSymbols ¶
- changeEvent(self, e: QEvent)¶
- childAt(self, p: QPoint) QWidget ¶
- childAt(self, ax: int, ay: int) QWidget
- childEvent(self, a0: QChildEvent)¶
- children(self) List[QObject] ¶
- childrenRect(self) QRect ¶
- childrenRegion(self) QRegion ¶
- cleanText(self) str ¶
- clear(self)¶
- clearFocus(self)¶
- clearMask(self)¶
- close(self) bool ¶
- closeEvent(self, e: QCloseEvent)¶
- colorCount(self) int ¶
- connectNotify(self, signal: QMetaMethod)¶
- contentsMargins(self) QMargins ¶
- contentsRect(self) QRect ¶
- contextMenuEvent(self, e: QContextMenuEvent)¶
- contextMenuPolicy(self) Qt.ContextMenuPolicy ¶
- correctionMode(self) QAbstractSpinBox.CorrectionMode ¶
- create(self, window: PyQt6.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
- createWindowContainer(window: QWindow, parent: typing.Optional[QWidget] = None, flags: Qt.WindowType = Qt.WindowFlags()) QWidget ¶
- cursor(self) QCursor ¶
- customContextMenuRequested¶
customContextMenuRequested(self, pos: QPoint) [signal]
- customEvent(self, a0: QEvent)¶
- deleteLater(self)¶
- depth(self) int ¶
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- destroyed¶
destroyed(self, object: typing.Optional[QObject] = None) [signal]
- devType(self) int ¶
- devicePixelRatio(self) float ¶
- devicePixelRatioF(self) float ¶
- devicePixelRatioFScale() float ¶
- disconnect(a0: QMetaObject.Connection) bool ¶
- disconnect(self) None
- disconnectNotify(self, signal: QMetaMethod)¶
- displayIntegerBase(self) int ¶
- dragEnterEvent(self, a0: QDragEnterEvent)¶
- dragLeaveEvent(self, a0: QDragLeaveEvent)¶
- dragMoveEvent(self, a0: QDragMoveEvent)¶
- dropEvent(self, a0: QDropEvent)¶
- dumpObjectInfo(self)¶
- dumpObjectTree(self)¶
- dynamicPropertyNames(self) List[QByteArray] ¶
- editingFinished¶
editingFinished(self) [signal]
- effectiveWinId(self) PyQt6.sip.voidptr ¶
- ensurePolished(self)¶
- enterEvent(self, event: QEnterEvent)¶
- event(self, e: QEvent) bool ¶
- eventFilter(self, a0: QObject, a1: QEvent) bool ¶
- find(a0: PyQt6.sip.voidptr) QWidget ¶
- findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject ¶
- findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
- findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject] ¶
- findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- fixup(self, str: str) str ¶
- focusInEvent(self, e: QFocusEvent)¶
- focusNextChild(self) bool ¶
- focusNextPrevChild(self, next: bool) bool ¶
- focusOutEvent(self, e: 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 ¶
- grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) QPixmap ¶
- grabGesture(self, type: Qt.GestureType, flags: Qt.GestureFlag = Qt.GestureFlags())¶
- grabKeyboard(self)¶
- grabMouse(self)¶
- grabMouse(self, a0: Union[QCursor, Qt.CursorShape]) None
- grabShortcut(self, key: Union[QKeySequence, QKeySequence.StandardKey, str, int], context: Qt.ShortcutContext = Qt.WindowShortcut) int ¶
- graphicsEffect(self) QGraphicsEffect ¶
- graphicsProxyWidget(self) QGraphicsProxyWidget ¶
- hasAcceptableInput(self) bool ¶
- hasFocus(self) bool ¶
- hasFrame(self) bool ¶
- hasHeightForWidth(self) bool ¶
- hasMouseTracking(self) bool ¶
- hasTabletTracking(self) bool ¶
- height(self) int ¶
- heightForWidth(self, a0: int) int ¶
- heightMM(self) int ¶
- hide(self)¶
- hideEvent(self, e: QHideEvent)¶
- inherits(self, classname: str) bool ¶
- initPainter(self, painter: QPainter)¶
- initStyleOption(self, option: QStyleOptionSpinBox)¶
- inputMethodEvent(self, a0: QInputMethodEvent)¶
- inputMethodHints(self) Qt.InputMethodHint ¶
- inputMethodQuery(self, a0: Qt.InputMethodQuery) Any ¶
- insertAction(self, before: QAction, action: QAction)¶
- insertActions(self, before: QAction, actions: Iterable[QAction])¶
- installEventFilter(self, a0: QObject)¶
- interpretText(self)¶
- isAccelerated(self) bool ¶
- isActiveWindow(self) bool ¶
- isAncestorOf(self, child: QWidget) bool ¶
- isEnabled(self) bool ¶
- isEnabledTo(self, a0: QWidget) bool ¶
- isFullScreen(self) bool ¶
- isGroupSeparatorShown(self) bool ¶
- isHidden(self) bool ¶
- isLeftToRight(self) bool ¶
- isMaximized(self) bool ¶
- isMinimized(self) bool ¶
- isModal(self) bool ¶
- isReadOnly(self) bool ¶
- isRightToLeft(self) bool ¶
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- isVisible(self) bool ¶
- isVisibleTo(self, a0: QWidget) bool ¶
- isWidgetType(self) bool ¶
- isWindow(self) bool ¶
- isWindowModified(self) bool ¶
- isWindowType(self) bool ¶
- keyPressEvent(self, e: QKeyEvent)¶
- keyReleaseEvent(self, e: QKeyEvent)¶
- keyboardGrabber() QWidget ¶
- keyboardTracking(self) bool ¶
- killTimer(self, id: int)¶
- layout(self) QLayout ¶
- layoutDirection(self) Qt.LayoutDirection ¶
- leaveEvent(self, a0: QEvent)¶
- lineEdit(self) QLineEdit ¶
- locale(self) QLocale ¶
- logicalDpiX(self) int ¶
- logicalDpiY(self) int ¶
- lower(self)¶
- mapFrom(self, a0: QWidget, a1: QPoint) QPoint ¶
- mapFrom(self, a0: QWidget, a1: QPointF) QPointF
- mapFromGlobal(self, a0: QPoint) QPoint ¶
- mapFromGlobal(self, a0: QPointF) QPointF
- mapFromParent(self, a0: QPoint) QPoint ¶
- mapFromParent(self, a0: QPointF) QPointF
- mapTo(self, a0: QWidget, a1: QPoint) QPoint ¶
- mapTo(self, a0: QWidget, a1: QPointF) QPointF
- mapToGlobal(self, a0: QPoint) QPoint ¶
- mapToGlobal(self, a0: QPointF) QPointF
- mapToParent(self, a0: QPoint) QPoint ¶
- mapToParent(self, a0: QPointF) QPointF
- mask(self) QRegion ¶
- maximum(self) int ¶
- maximumHeight(self) int ¶
- maximumSize(self) QSize ¶
- maximumWidth(self) int ¶
- metaObject(self) QMetaObject ¶
- metric(self, a0: QPaintDevice.PaintDeviceMetric) int ¶
- minimum(self) int ¶
- minimumHeight(self) int ¶
- minimumSize(self) QSize ¶
- minimumSizeHint(self) QSize ¶
- minimumWidth(self) int ¶
- mouseDoubleClickEvent(self, a0: QMouseEvent)¶
- mouseGrabber() QWidget ¶
- mouseMoveEvent(self, e: QMouseEvent)¶
- mousePressEvent(self, e: QMouseEvent)¶
- mouseReleaseEvent(self, e: QMouseEvent)¶
- move(self, a0: QPoint)¶
- move(self, ax: int, ay: int) None
- moveEvent(self, a0: QMoveEvent)¶
- moveToThread(self, thread: QThread)¶
- nativeEvent(self, eventType: QByteArray, message: PyQt6.sip.voidptr) Tuple[bool, PyQt6.sip.voidptr] ¶
- nativeParentWidget(self) QWidget ¶
- nextInFocusChain(self) QWidget ¶
- normalGeometry(self) QRect ¶
- objectName(self) str ¶
- objectNameChanged¶
objectNameChanged(self, objectName: str) [signal]
- overrideWindowFlags(self, type: Qt.WindowType)¶
- overrideWindowState(self, state: Qt.WindowState)¶
- paintEngine(self) QPaintEngine ¶
- paintEvent(self, e: QPaintEvent)¶
- paintingActive(self) bool ¶
- palette(self) QPalette ¶
- parent(self) QObject ¶
- parentWidget(self) QWidget ¶
- physicalDpiX(self) int ¶
- physicalDpiY(self) int ¶
- pos(self) QPoint ¶
- prefix(self) str ¶
- previousInFocusChain(self) QWidget ¶
- property(self, name: 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, signal: PYQT_SIGNAL) int ¶
- rect(self) QRect ¶
- releaseKeyboard(self)¶
- releaseMouse(self)¶
- releaseShortcut(self, id: int)¶
- removeAction(self, action: QAction)¶
- removeEventFilter(self, a0: QObject)¶
- render(self, target: QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))¶
- render(self, painter: QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren)) None
- repaint(self)¶
- repaint(self, x: int, y: int, w: int, h: int) None
- repaint(self, a0: QRect) None
- repaint(self, a0: QRegion) None
- resize(self, a0: QSize)¶
- resize(self, w: int, h: int) None
- resizeEvent(self, e: QResizeEvent)¶
- restoreGeometry(self, geometry: QByteArray) bool ¶
- saveGeometry(self) QByteArray ¶
- screen(self) QScreen ¶
- scroll(self, dx: int, dy: int)¶
- scroll(self, dx: int, dy: int, a2: QRect) None
- selectAll(self)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setAccelerated(self, on: bool)¶
- setAcceptDrops(self, on: bool)¶
- setAccessibleDescription(self, description: str)¶
- setAccessibleName(self, name: str)¶
- setAlignment(self, flag: Qt.AlignmentFlag)¶
- setAttribute(self, attribute: Qt.WidgetAttribute, on: bool = True)¶
- setAutoFillBackground(self, enabled: bool)¶
- setBackgroundRole(self, a0: QPalette.ColorRole)¶
- setBaseSize(self, basew: int, baseh: int)¶
- setBaseSize(self, s: QSize) None
- setButtonSymbols(self, bs: QAbstractSpinBox.ButtonSymbols)¶
- setContentsMargins(self, left: int, top: int, right: int, bottom: int)¶
- setContentsMargins(self, margins: QMargins) None
- setContextMenuPolicy(self, policy: Qt.ContextMenuPolicy)¶
- setCorrectionMode(self, cm: QAbstractSpinBox.CorrectionMode)¶
- setCursor(self, a0: Union[QCursor, Qt.CursorShape])¶
- setDisabled(self, a0: bool)¶
- setDisplayIntegerBase(self, base: int)¶
- setEnabled(self, a0: bool)¶
- setFixedHeight(self, h: int)¶
- setFixedSize(self, a0: QSize)¶
- setFixedSize(self, w: int, h: int) None
- setFixedWidth(self, w: int)¶
- setFocus(self)¶
- setFocus(self, reason: Qt.FocusReason) None
- setFocusPolicy(self, policy: Qt.FocusPolicy)¶
- setFocusProxy(self, a0: QWidget)¶
- setFont(self, a0: QFont)¶
- setForegroundRole(self, a0: QPalette.ColorRole)¶
- setFrame(self, a0: bool)¶
- setGeometry(self, a0: QRect)¶
- setGeometry(self, ax: int, ay: int, aw: int, ah: int) None
- setGraphicsEffect(self, effect: QGraphicsEffect)¶
- setGroupSeparatorShown(self, shown: bool)¶
- setHidden(self, hidden: bool)¶
- setInputMethodHints(self, hints: Qt.InputMethodHint)¶
- setKeyboardTracking(self, kt: bool)¶
- setLayout(self, a0: QLayout)¶
- setLayoutDirection(self, direction: Qt.LayoutDirection)¶
- setLineEdit(self, e: QLineEdit)¶
- setLocale(self, locale: QLocale)¶
- setMask(self, a0: QBitmap)¶
- setMask(self, a0: QRegion) None
- setMaximum(self, max: int)¶
- setMaximumHeight(self, maxh: int)¶
- setMaximumSize(self, maxw: int, maxh: int)¶
- setMaximumSize(self, s: QSize) None
- setMaximumWidth(self, maxw: int)¶
- setMinimum(self, min: int)¶
- setMinimumHeight(self, minh: int)¶
- setMinimumSize(self, minw: int, minh: int)¶
- setMinimumSize(self, s: QSize) None
- setMinimumWidth(self, minw: int)¶
- setMouseTracking(self, enable: bool)¶
- setObjectName(self, name: str)¶
- setPalette(self, a0: QPalette)¶
- setParent(self, parent: QWidget)¶
- setParent(self, parent: QWidget, f: Qt.WindowType) None
- setPrefix(self, p: str)¶
- setProperty(self, name: str, value: Any) bool ¶
- setRange(self, min: int, max: int)¶
- setReadOnly(self, r: bool)¶
- setScreen(self, a0: QScreen)¶
- setShortcutAutoRepeat(self, id: int, enabled: bool = True)¶
- setShortcutEnabled(self, id: int, enabled: bool = True)¶
- setSingleStep(self, val: int)¶
- setSizeIncrement(self, w: int, h: int)¶
- setSizeIncrement(self, s: QSize) None
- setSizePolicy(self, a0: QSizePolicy)¶
- setSizePolicy(self, hor: QSizePolicy.Policy, ver: QSizePolicy.Policy) None
- setSpecialValueText(self, s: str)¶
- setStatusTip(self, a0: str)¶
- setStepType(self, stepType: QAbstractSpinBox.StepType)¶
- setStyle(self, a0: QStyle)¶
- setStyleSheet(self, styleSheet: str)¶
- setSuffix(self, s: str)¶
- setTabOrder(a0: QWidget, a1: QWidget)¶
- setTabletTracking(self, enable: bool)¶
- setToolTip(self, a0: str)¶
- setToolTipDuration(self, msec: int)¶
- setUpdatesEnabled(self, enable: bool)¶
- setValue(self, val: int)¶
- setVisible(self, visible: bool)¶
- setWhatsThis(self, a0: str)¶
- setWindowFilePath(self, filePath: str)¶
- setWindowFlag(self, a0: Qt.WindowType, on: bool = True)¶
- setWindowFlags(self, type: Qt.WindowType)¶
- setWindowIcon(self, icon: QIcon)¶
- setWindowIconText(self, a0: str)¶
- setWindowModality(self, windowModality: Qt.WindowModality)¶
- setWindowModified(self, a0: bool)¶
- setWindowOpacity(self, level: float)¶
- setWindowRole(self, a0: str)¶
- setWindowState(self, state: Qt.WindowState)¶
- setWindowTitle(self, a0: str)¶
- setWrapping(self, w: bool)¶
- show(self)¶
- showEvent(self, e: QShowEvent)¶
- showFullScreen(self)¶
- showMaximized(self)¶
- showMinimized(self)¶
- showNormal(self)¶
- signalsBlocked(self) bool ¶
- singleStep(self) int ¶
- size(self) QSize ¶
- sizeHint(self) QSize ¶
- sizeIncrement(self) QSize ¶
- sizePolicy(self) QSizePolicy ¶
- specialValueText(self) str ¶
- stackUnder(self, a0: QWidget)¶
- startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt6.QtCore.QMetaObject object>¶
- statusTip(self) str ¶
- stepBy(self, steps: int)¶
- stepDown(self)¶
- stepEnabled(self) QAbstractSpinBox.StepEnabledFlag ¶
- stepType(self) QAbstractSpinBox.StepType ¶
- stepUp(self)¶
- style(self) QStyle ¶
- styleSheet(self) str ¶
- suffix(self) str ¶
- tabletEvent(self, a0: QTabletEvent)¶
- testAttribute(self, attribute: Qt.WidgetAttribute) bool ¶
- text(self) str ¶
- textChanged¶
textChanged(self, a0: str) [signal]
- textFromValue(self, v: int) str ¶
- thread(self) QThread ¶
- timerEvent(self, e: QTimerEvent)¶
- toolTip(self) str ¶
- toolTipDuration(self) int ¶
- tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str ¶
- underMouse(self) bool ¶
- ungrabGesture(self, type: Qt.GestureType)¶
- unsetCursor(self)¶
- unsetLayoutDirection(self)¶
- unsetLocale(self)¶
- update(self)¶
- update(self, a0: QRect) None
- update(self, a0: QRegion) None
- update(self, ax: int, ay: int, aw: int, ah: int) None
- updateGeometry(self)¶
- updateMicroFocus(self, query: Qt.InputMethodQuery = Qt.ImQueryAll)¶
- updatesEnabled(self) bool ¶
- validate(self, input: str, pos: int) Tuple[QValidator.State, str, int] ¶
- value(self) int ¶
- valueChanged¶
valueChanged(self, a0: int) [signal]
- valueFromText(self, text: str) int ¶
- visibleRegion(self) QRegion ¶
- whatsThis(self) str ¶
- wheelEvent(self, e: QWheelEvent)¶
- width(self) int ¶
- widthMM(self) int ¶
- winId(self) PyQt6.sip.voidptr ¶
- window(self) QWidget ¶
- windowFilePath(self) str ¶
- windowFlags(self) Qt.WindowType ¶
- windowHandle(self) QWindow ¶
- windowIcon(self) QIcon ¶
- windowIconChanged¶
windowIconChanged(self, icon: QIcon) [signal]
- windowIconText(self) str ¶
- windowIconTextChanged¶
windowIconTextChanged(self, iconText: str) [signal]
- windowModality(self) Qt.WindowModality ¶
- windowOpacity(self) float ¶
- windowRole(self) str ¶
- windowState(self) Qt.WindowState ¶
- windowTitle(self) str ¶
- windowTitleChanged¶
windowTitleChanged(self, title: str) [signal]
- windowType(self) Qt.WindowType ¶
- wrapping(self) bool ¶
- x(self) int ¶
- y(self) int ¶
- class schrodinger.ui.qt.config_dialog.ConfigDialog(parent, title='', jobname='', checkcommand=None, help_topic='MM_TOPIC_JOB_START_DIALOG', **kw)¶
Bases:
object
Toplevel Qt widget that mimics the Maestro Start dialog. Configuration options set via constructor keywords are…
- title - Title for the dialog window. Default is
‘<parent_title> - Start’.
command - Function to call (not used?).
- jobname - Initial string value for the job name entry field.
Default is ‘’.
- incorporation - Display a disposition selector for Maestro
incorporation. Maestro only. Default is True.
- allow_replace - Allow the ‘Replace existing entries’ incorporation
option. (Default = False)
- allow_in_place - Allow the ‘Append new entries in place’ incorporation
option. (Default = True)
- default_disp - The default disposition, if ‘incorporation’ is True.
Must be DISP_APPEND, DISP_APPENDINPLACE, DISP_REPLACE, or DISP_IGNORE. Default is DISP_IGNORE.
- disp_flags - Additional Maestro job disposition flags.
Currently, the only available flag is DISP_FLAG_FIT. The flags should be separated using DISP_FLAG_SEPARATOR. Default value is empty string (no flags).
- host - Display a pull-down menu (or a table) for selecting
the host for the job. Default is True.
- host_products Products that will get their own host menu and #cpus
box. Not compatible with cpus3. Takes a list of strings. Default is one host menu.
- gpu_host_products Optional map with keys being keys from host_products
that should allow GPU hosts and values being what GpuHostProductMode should be set.
- jobentry - Display widgets for setting the job name.
Default is True.
- cpus - Display additional options for distributed jobs,
including the number of CPUs. Default is False.
- cpus3 - Display additional options for Desmond distributed jobs
which includes 3 CPUS values: X, Y, and Z. Default is False.
- njobs - Display widgets for running the job as a specified
number of subjobs. Default is False.
- adjust - Whether to display the “Adjust” checkbox. Default is
False. Requires <njobs> to be True.
- tmpdir - Show the tmpdir for the currently selected host.
Default is False.
- save_host - Used the last saved host as the default host. Save any
new host chosen for the next start dialog from this panel.
- open_mp - True/False. Allow the user to specify either the total
number of cpus or the number of Open MP threads and subjobs. Default is False. open_mp is mutually exclusive with cpus as well as cpus3. open_mp is incompatible with host_products.
- set_resources - True/False. Allow the user to set or select queue
resources from the Python start panel
Job parameters passed out in the StartDialogParams object upon the dialog deactivating with via a “Start” (not “Cancel”) action…
- proj - The Project from which the job is launched (required for
incorporation). “” if not in Maestro.
- disp - Maestro disposition. ‘append’ or ‘ignore’ if
‘incorporation’ is True. “” if not in Maestro. Undefined if in Maestro but ‘incorporation’ is False.
jobname - Job name. Undefined if ‘jobentry’ is False.
host - Main host. Undefined if ‘host’ option is False.
njobs - Number of subjobs. Undefined if ‘njobs’ option is False.
adjust - Whether the user checked the “Adjust” checkbox.
- cpus - Number of CPUs. Undefined if ‘cpus’ option is False. Set
to ‘njobs’ if the “Distribute subjobs over maximum…” is chosen, otherwise set to the number of specified CPUs.
- cpus3 - Number of CPUs as 3 numbers: X, Y, & Z. Used by the Desmond
panels. Undefined if ‘cpus3’ option is False.
- openmpcpus - Number of total Open MP CPUs if the open_mp option was
used. If the open_mp options was used and threads is 0, then openmpcpus is just the number of CPUs. None if the open_mp option was not used.
- threads - Number of threads if the open_mp option was used and the user
chose to specify the number of Open MP threads and subjobs. If the open_mp option was used but the user only specifies CPUS, threads is 0. None if the open_mp option was not used.
- openmpsubjobs - Maximum number of subjobs that may be run
simultaneously, if the open_mp option was used.
queue_resources - Queue resource options
Please see the DialogParameters class below for usage instructions.
- START = 'Run'¶
- SAVE = 'OK'¶
- WRITE = 'Write'¶
- CANCEL = 'Cancel'¶
- HELP = 'Help'¶
- CPU_UNIT_LABEL = 'processors'¶
- GPU_UNIT_LABEL = 'GPUs'¶
- HOST_LABEL_TEXT = 'Host:'¶
- PRODUCT_HOSTS_KEY = 'product_hosts'¶
- __init__(parent, title='', jobname='', checkcommand=None, help_topic='MM_TOPIC_JOB_START_DIALOG', **kw)¶
See class docstring. Raises an Exception if the disposition specified as the default is not recognized.
If pre_close_command is specified, it will be run when the user presses the Start button. The dialog is only closed if that function returns 0.
- setUpButtonBox(can_start=True)¶
Set up the button box items for the dialog.
- Parameters
can_start – If True, add a Start button. Otherwise add a Write button.
- showHelp()¶
- validateNumProcs(silent=False)¶
Checks that the number of processors requested is reasonable. Here the validation is conditional on the ‘cpus’ option. In derived classes this may not be valid (i.e. the validation should be run regardless of the ncpus options.
- Parameters
menu (QComboBox) – The menu specifying the host selection to be validated
numfield (QLineEdit) – The widget specifying the requested # of processors
silent (bool) – suppresses warning dialogs when set to True
- validateNumCpus(host, editfield, silent=False)¶
Validate number of CPUs :type host: Host :param host: the host on which the CPUs reside :type editfield: QWidget :param editfield: widget specifying the number of CPUs :type silent: bool :param silent: suppresses warning dialogs when set to True
- validateNumGpus(host, editfield, silent=False)¶
Validate number of GPUs :type host: Host :param host: the host on which the GPUs reside :type editfield: QWidget :param editfield: widget specifying the number of GPUs :type silent: bool :param silent: suppresses warning dialogs when set to True
- validateNumOpenMP(host, silent=False)¶
Checks to make sure the number of requested processors and threads is consistent with what we know of the host capabilities.
- Parameters
host (Host) – The host on which the CPUs reside
silent (bool) – suppresses warning dialogs when set to True
- Return type
bool
- Returns
True if number of processors & threads is allowed, False if not
- validate()¶
Checks the panel to make sure settings are valid. Return False if any validation test fails, otherwise return True.
- validateAndAccept()¶
Validate the settings, and if no errors are found, close the dialog.
- savePressed()¶
Slot for Save button
- writePressed()¶
Slot for Write button
- startPressed()¶
Slot for OK and Run button
- setupHostLayout()¶
Setup the host layout, including hostlist/table and numbers of cpus (including cpus3).
- Returns
Whether the dialog should add a start button.
- Return type
bool
- getHostPref()¶
Get the stored host preference if available
- Returns
Stored host preference if available or None
- Return type
str or None
- updateCPULimits()¶
This method is called whenever host selection is changed. It updates maximum number of allowed CPUs.
- updateOpenMPInfo()¶
Show/Hide the proper frames and update the processors label
- getTotalOpenMPCPUs()¶
Compute the total number of Open MP CPUs to use based on the number of threads and subjobs the user entered
- Return type
int
- Returns
total number of CPUs
- getNumCpusToValidate(is_queue)¶
Return the maximum number of processors that the job could potentially use, for validation.
- Parameters
is_queue (bool) – If True, return number of threads per subjob requested, if False return number of threads * number of subjobs.
- updateQueueResources()¶
This updates the queue resources display when the host has changed.
- updateOpenMPLabel()¶
Update the Open MP label with the current number of processors requested
- setupHostCombo(combo, use_host=None, hosts=None)¶
- cpus3Edited(ignored=None)¶
- activate()¶
Display the dialog and return the dialog parameters as as StartDialogParam object. If the dialog was cancelled then return None and restore the prior state.
- getSettings(extra_kws=None)¶
- getOpenMPSettings()¶
- Based on Open MP settings, return a tuple of:
Maximum number of CPUs to use
Number of threads to use.
Maximum number of subjobs to create.
- Returns
(#cpus, #threads, #subjobs)
- Return type
(int, int, int)
- applySettings(settings)¶
Set dialog state using previously-saved parameters
- Parameters
settings (StartDialogParams) – saved dialog settings
- warning(text)¶
Display a warning window with the specified text.
- error(text)¶
Show an error message with the specified text.
- Parameters
msg (str) – Error to show.
- getHosts(ncpus=True, excludeGPGPUs=True)¶
Returns list of host entries from appropriate schrodinger.hosts file, with parenthetical entry of the number of available processors (if ‘ncpus’ is True). If excludeGPGPUs is True, hosts with GPGPUs will be excluded from the list
- currentHost(menu=None)¶
Returns the host currently selected in the menu parameter. If none is given, use self.host_menu. currentHost() can be overridden to use a different menu by default.
- Parameters
menu (
QtWidgets.QComboBox
) – Menu to check for current host
- getHostType()¶
- isGPUHost()¶
- isCPUHost()¶
- class schrodinger.ui.qt.config_dialog.GPUConfigDialog(parent, title='', jobname='', checkcommand=None, help_topic='MM_TOPIC_JOB_START_DIALOG', **kw)¶
Bases:
schrodinger.ui.qt.config_dialog.ConfigDialog
Subclass of the ConfigDialog that shows only GPU hosts.
- HOST_LABEL_TEXT = 'GPU host:'¶
- getHosts()¶
Return a list of GPU hosts
- Returns
List of GPU hosts
- Return type
list
- CANCEL = 'Cancel'¶
- CPU_UNIT_LABEL = 'processors'¶
- GPU_UNIT_LABEL = 'GPUs'¶
- HELP = 'Help'¶
- PRODUCT_HOSTS_KEY = 'product_hosts'¶
- SAVE = 'OK'¶
- START = 'Run'¶
- WRITE = 'Write'¶
- __init__(parent, title='', jobname='', checkcommand=None, help_topic='MM_TOPIC_JOB_START_DIALOG', **kw)¶
See class docstring. Raises an Exception if the disposition specified as the default is not recognized.
If pre_close_command is specified, it will be run when the user presses the Start button. The dialog is only closed if that function returns 0.
- activate()¶
Display the dialog and return the dialog parameters as as StartDialogParam object. If the dialog was cancelled then return None and restore the prior state.
- applySettings(settings)¶
Set dialog state using previously-saved parameters
- Parameters
settings (StartDialogParams) – saved dialog settings
- cpus3Edited(ignored=None)¶
- currentHost(menu=None)¶
Returns the host currently selected in the menu parameter. If none is given, use self.host_menu. currentHost() can be overridden to use a different menu by default.
- Parameters
menu (
QtWidgets.QComboBox
) – Menu to check for current host
- error(text)¶
Show an error message with the specified text.
- Parameters
msg (str) – Error to show.
- getHostPref()¶
Get the stored host preference if available
- Returns
Stored host preference if available or None
- Return type
str or None
- getHostType()¶
- getNumCpusToValidate(is_queue)¶
Return the maximum number of processors that the job could potentially use, for validation.
- Parameters
is_queue (bool) – If True, return number of threads per subjob requested, if False return number of threads * number of subjobs.
- getOpenMPSettings()¶
- Based on Open MP settings, return a tuple of:
Maximum number of CPUs to use
Number of threads to use.
Maximum number of subjobs to create.
- Returns
(#cpus, #threads, #subjobs)
- Return type
(int, int, int)
- getSettings(extra_kws=None)¶
- getTotalOpenMPCPUs()¶
Compute the total number of Open MP CPUs to use based on the number of threads and subjobs the user entered
- Return type
int
- Returns
total number of CPUs
- isCPUHost()¶
- isGPUHost()¶
- savePressed()¶
Slot for Save button
- setUpButtonBox(can_start=True)¶
Set up the button box items for the dialog.
- Parameters
can_start – If True, add a Start button. Otherwise add a Write button.
- setupHostCombo(combo, use_host=None, hosts=None)¶
- setupHostLayout()¶
Setup the host layout, including hostlist/table and numbers of cpus (including cpus3).
- Returns
Whether the dialog should add a start button.
- Return type
bool
- showHelp()¶
- startPressed()¶
Slot for OK and Run button
- updateCPULimits()¶
This method is called whenever host selection is changed. It updates maximum number of allowed CPUs.
- updateOpenMPInfo()¶
Show/Hide the proper frames and update the processors label
- updateOpenMPLabel()¶
Update the Open MP label with the current number of processors requested
- updateQueueResources()¶
This updates the queue resources display when the host has changed.
- validate()¶
Checks the panel to make sure settings are valid. Return False if any validation test fails, otherwise return True.
- validateAndAccept()¶
Validate the settings, and if no errors are found, close the dialog.
- validateNumCpus(host, editfield, silent=False)¶
Validate number of CPUs :type host: Host :param host: the host on which the CPUs reside :type editfield: QWidget :param editfield: widget specifying the number of CPUs :type silent: bool :param silent: suppresses warning dialogs when set to True
- validateNumGpus(host, editfield, silent=False)¶
Validate number of GPUs :type host: Host :param host: the host on which the GPUs reside :type editfield: QWidget :param editfield: widget specifying the number of GPUs :type silent: bool :param silent: suppresses warning dialogs when set to True
- validateNumOpenMP(host, silent=False)¶
Checks to make sure the number of requested processors and threads is consistent with what we know of the host capabilities.
- Parameters
host (Host) – The host on which the CPUs reside
silent (bool) – suppresses warning dialogs when set to True
- Return type
bool
- Returns
True if number of processors & threads is allowed, False if not
- validateNumProcs(silent=False)¶
Checks that the number of processors requested is reasonable. Here the validation is conditional on the ‘cpus’ option. In derived classes this may not be valid (i.e. the validation should be run regardless of the ncpus options.
- Parameters
menu (QComboBox) – The menu specifying the host selection to be validated
numfield (QLineEdit) – The widget specifying the requested # of processors
silent (bool) – suppresses warning dialogs when set to True
- warning(text)¶
Display a warning window with the specified text.
- writePressed()¶
Slot for Write button
- class schrodinger.ui.qt.config_dialog.DummyGpuHost¶
Bases:
schrodinger.tasks.hosts.Host
A dummy host to allow users to write job files to launch elsewhere when a GPU host is not available in their hosts file.
- __init__()¶
- CPUTYPE = 'cpu'¶
- GPUTYPE = 'gpu'¶
- autoSetGpuList()¶
- classmethod fromJobControlHost(jchost, ncpus)¶
- classmethod fromJson(json_obj)¶
A factory method which constructs a new object from a given dict loaded from a json string or file.
- Parameters
json_obj (dict) – A json-loaded dictionary to create an object from.
- Returns
An instance of this class.
- Return type
cls
- classmethod fromJsonImplementation(json_dict)¶
Abstract method that must be defined by all derived classes. Takes in a dictionary and constructs an instance of the derived class.
- Parameters
json_dict (dict) – A dictionary loaded from a JSON string or file.
- Returns
An instance of the derived class.
- Return type
cls
- getHost() str ¶
Return the name of the host, which defaults to ‘name’ if a separate ‘host’ attribute wasn’t specified.
- get_version()¶
Method to get the version of a particular object. Defaults to the current version of mmshare. This class can be overridden for custom versioning behavior.
- property host: str¶
Return the name of the host, which defaults to ‘name’ if a separate ‘host’ attribute wasn’t specified.
- hostType()¶
Used to determine what type of host this is.
- isQueue() bool ¶
Check to see whether the host represents a batch queue. Returns True if the host is a HPC queueing system.
- label()¶
Returns the string to show in controls, etc.
- maxNum()¶
Returns the number of processors for the type of host - for GPU host, return the number of GPUs, for non-GPU hosts, return the number of CPUs.
- setGpuList(gpulist)¶
- setHost(host: str)¶
Store host as _host to allow us to use a property for the ‘host’ attr.
- toJson(_mark_version=True)¶
Create and returns a data structure made up of jsonable items.
- Return type
An instance of one the classes from NATIVE_JSON_DATATYPES
- toJsonImplementation()¶
Abstract method that must be defined by all derived classes. Converts an instance of the derived class into a jsonifiable object.
- Returns
A dict made up of JSON native datatypes or Jsonable objects. See the link below for a table of such types. https://docs.python.org/2/library/json.html#encoders-and-decoders
- to_hostentry() str ¶
Return a string representation of the Host object suitable for including in a hosts file.
- units()¶
Return the unit string for the type of processors provided by this host.
- schrodinger.ui.qt.config_dialog.get_hosts(ncpus=True, excludeGPGPUs=True)¶
Return a list of Host objects for use in config dialogs. Note these are a subclass of jobcontrol.Host which has additional features for text labels and accounting for GPUs. If schrodinger.hosts file is missing, only localhost will be returned. If it is unreadable, then an error message will be shown in a dialog box, and an empty list will be returned.
- Parameters
ncpus (bool) – whether host text labels should include number of processors
excludeGPGPUs (bool) – whether to exclude GPU hosts from the list
- Returns
a list of Host objects
- Return type
list
- schrodinger.ui.qt.config_dialog.gpu_hosts_available()¶
Determines whether any GPU host is available.
- Returns
returns True if any GPU host is available and False otherwise.
- Return type
bool
- schrodinger.ui.qt.config_dialog.get_host_from_hostname(hostname)¶
- Parameters
hostname (str) – The name of the desired host object.
- Returns
The host object associated with a host name.
- Return type
- class schrodinger.ui.qt.config_dialog.StartDialogParams¶
Bases:
object
A collection of parameter values from the StartDialog class.
- __init__()¶
Initialize. The defaults are used for options that were not requested njobs is not currently used as there is no uniform way to set it
- update(params)¶
Update the param’s attributes based on the given dictionary.
- commandLineArgs(include_njobs=True, add_cpus=True)¶
Convert this set of start dialog parameters into the canonical jobcontrol command line argument list. Generally used by AF1 panels.
- Return type
list
- Returns
list of job control command line flags
- formJaguarCPUFlags()¶
Determine the command line flags as requested by the user if openmp=True was used in creating the dialog. Used by AF1 panels.
- Return type
list
- Returns
The requested command line flags
- commandLineOptions()¶
Convert this set of start dialog parameters into the canonical jobcontrol command line options. Generally used by AF1 panels. NOTE: Does NOT export NJOBS for backward compatibility.
- schrodinger.ui.qt.config_dialog.form_jaguar_cpu_flags(host, cpus, subjobs, threads, use_parallel_flag=True)¶
Determine the command line flags for an Open MP job. NOTE: This function is also used in af2.py.
- Parameters
host (str) – The host name
cpus (int) – The number of CPUs requested. If
subjobs
andthreads
are non-zero, this value will be equal tosubjobs * threads
and can be ignored.subjobs (int) – The number of subjobs requested. Will be 0 if the user only specified the total number of CPUs.
threads (int) – The number of threads requested. Will be 0 if the user only specified the total number of CPUs.
use_parallel_flag (bool) – Whether requesting CPUs > 1 without specifying threads > 1 should be represented by the use of the -PARALLEL X flag (True) or -HOST host:X (False). -PARALLEL is a Jaguar flag and may not be appropriate for other programs.
- Returns
The appropriate command line flags.
- Return type
list
- class schrodinger.ui.qt.config_dialog.StartDialog(*args, **kwargs)¶
Bases:
schrodinger.ui.qt.config_dialog.ConfigDialog
- START = 'Start'¶
- __init__(*args, **kwargs)¶
See class docstring. Raises an Exception if the disposition specified as the default is not recognized.
If pre_close_command is specified, it will be run when the user presses the Start button. The dialog is only closed if that function returns 0.
- CANCEL = 'Cancel'¶
- CPU_UNIT_LABEL = 'processors'¶
- GPU_UNIT_LABEL = 'GPUs'¶
- HELP = 'Help'¶
- HOST_LABEL_TEXT = 'Host:'¶
- PRODUCT_HOSTS_KEY = 'product_hosts'¶
- SAVE = 'OK'¶
- WRITE = 'Write'¶
- activate()¶
Display the dialog and return the dialog parameters as as StartDialogParam object. If the dialog was cancelled then return None and restore the prior state.
- applySettings(settings)¶
Set dialog state using previously-saved parameters
- Parameters
settings (StartDialogParams) – saved dialog settings
- cpus3Edited(ignored=None)¶
- currentHost(menu=None)¶
Returns the host currently selected in the menu parameter. If none is given, use self.host_menu. currentHost() can be overridden to use a different menu by default.
- Parameters
menu (
QtWidgets.QComboBox
) – Menu to check for current host
- error(text)¶
Show an error message with the specified text.
- Parameters
msg (str) – Error to show.
- getHostPref()¶
Get the stored host preference if available
- Returns
Stored host preference if available or None
- Return type
str or None
- getHostType()¶
- getHosts(ncpus=True, excludeGPGPUs=True)¶
Returns list of host entries from appropriate schrodinger.hosts file, with parenthetical entry of the number of available processors (if ‘ncpus’ is True). If excludeGPGPUs is True, hosts with GPGPUs will be excluded from the list
- getNumCpusToValidate(is_queue)¶
Return the maximum number of processors that the job could potentially use, for validation.
- Parameters
is_queue (bool) – If True, return number of threads per subjob requested, if False return number of threads * number of subjobs.
- getOpenMPSettings()¶
- Based on Open MP settings, return a tuple of:
Maximum number of CPUs to use
Number of threads to use.
Maximum number of subjobs to create.
- Returns
(#cpus, #threads, #subjobs)
- Return type
(int, int, int)
- getSettings(extra_kws=None)¶
- getTotalOpenMPCPUs()¶
Compute the total number of Open MP CPUs to use based on the number of threads and subjobs the user entered
- Return type
int
- Returns
total number of CPUs
- isCPUHost()¶
- isGPUHost()¶
- savePressed()¶
Slot for Save button
- setUpButtonBox(can_start=True)¶
Set up the button box items for the dialog.
- Parameters
can_start – If True, add a Start button. Otherwise add a Write button.
- setupHostCombo(combo, use_host=None, hosts=None)¶
- setupHostLayout()¶
Setup the host layout, including hostlist/table and numbers of cpus (including cpus3).
- Returns
Whether the dialog should add a start button.
- Return type
bool
- showHelp()¶
- startPressed()¶
Slot for OK and Run button
- updateCPULimits()¶
This method is called whenever host selection is changed. It updates maximum number of allowed CPUs.
- updateOpenMPInfo()¶
Show/Hide the proper frames and update the processors label
- updateOpenMPLabel()¶
Update the Open MP label with the current number of processors requested
- updateQueueResources()¶
This updates the queue resources display when the host has changed.
- validate()¶
Checks the panel to make sure settings are valid. Return False if any validation test fails, otherwise return True.
- validateAndAccept()¶
Validate the settings, and if no errors are found, close the dialog.
- validateNumCpus(host, editfield, silent=False)¶
Validate number of CPUs :type host: Host :param host: the host on which the CPUs reside :type editfield: QWidget :param editfield: widget specifying the number of CPUs :type silent: bool :param silent: suppresses warning dialogs when set to True
- validateNumGpus(host, editfield, silent=False)¶
Validate number of GPUs :type host: Host :param host: the host on which the GPUs reside :type editfield: QWidget :param editfield: widget specifying the number of GPUs :type silent: bool :param silent: suppresses warning dialogs when set to True
- validateNumOpenMP(host, silent=False)¶
Checks to make sure the number of requested processors and threads is consistent with what we know of the host capabilities.
- Parameters
host (Host) – The host on which the CPUs reside
silent (bool) – suppresses warning dialogs when set to True
- Return type
bool
- Returns
True if number of processors & threads is allowed, False if not
- validateNumProcs(silent=False)¶
Checks that the number of processors requested is reasonable. Here the validation is conditional on the ‘cpus’ option. In derived classes this may not be valid (i.e. the validation should be run regardless of the ncpus options.
- Parameters
menu (QComboBox) – The menu specifying the host selection to be validated
numfield (QLineEdit) – The widget specifying the requested # of processors
silent (bool) – suppresses warning dialogs when set to True
- warning(text)¶
Display a warning window with the specified text.
- writePressed()¶
Slot for Write button
- class schrodinger.ui.qt.config_dialog.JobParameters¶
Bases:
object
Class for holding job parameters. Required by AppFrameworkFrame.
- __init__()¶
All attributes are set directly after the instance is created.
- printout()¶
Print out the job parameters.
- class schrodinger.ui.qt.config_dialog.DialogParameters¶
Bases:
object
Class for holding dialog parameters. Required by AppFramework Frame Dialogs.
When creating an AppFramework instance, keyword ‘dialogs’ can be sent with dictionary. This dictionary should hold another dictionary of options for each dialog the user wants to set options for, and the key for that dictionary should be the name of the dialog.
Example:
dialogs = { 'start': { 'jobname': 'my_job', 'cpus': 0, }, 'read': { 'filetypes': [('Input Files', '*.in'),], }, 'write': {}, }
Options need not be set upon creation of the AppFramework instance, however. You can set options at any point, causing the next call for that dialog to generate itself with the new options.
The DialogParameters instance can be found as:
<AppFramework instance>.dialog_param
Thus if I wanted to turn off the number of cpus option in the start dialog, I would have:
<AppFramework instance>.dialog_param.start['cpus'] = 0
or to change the file type for the read dialog:
<AppFramework instance>.dialog_param.read['filetypes'] = [('<Type>', '<.ext>')]
See the individual Dialog classes for the supported configuration options.
- __init__()¶
See class docstring. Read dialogs parameters (askopenfilename options) are set to:
'initialdir': '.' 'filetypes': [('Input Files', '*.in')]
by default.
- update(dict)¶
Built in function for updating the DialogParameters class. Passing a dictionary of the values that need to be changed or added will change current values if he key already exists, or add a new key/value pair if it doesn’t.
Thus, if I wanted to change the start dialog behavior with regard to jobname and tmpdir, I would probably do something like:
dict = { "start": { 'jobname': '<my_new_jobname>', 'tmpdir': 1, } } <DialogParameters object>.update(dict)
The next time I brought up the dialog, the changes will have been made.
- set(dialog, **kw)¶
As an alternative to the update() method, I could change the same start dialog options with the command:
- <DialogParameters object>.set(‘start’,
jobname = ‘<my_new_jobname>’, tmpdir = 1)
The next time I brought up the dialog, the changes will have been made.