Package schrodinger :: Package application :: Package jaguar :: Package gui :: Module base_panel :: Class BasePanel
[hide private]
[frames] | no frames]

Class BasePanel

                    object --+                                
                             |                                
             sip.simplewrapper --+                            
                                 |                            
                       sip.wrapper --+                        
                                     |                        
                  PyQt4.QtCore.QObject --+                    
                                         |                    
                        object --+       |                    
                                 |       |                    
                 sip.simplewrapper --+   |                    
                                     |   |                    
              PyQt4.QtGui.QPaintDevice --+                    
                                         |                    
                       PyQt4.QtGui.QWidget --+                
                                             |                
         ui.qt.appframework2.baseapp.BasePanel --+            
                                                 |            
ui.qt.appframework2.validation.ValidationMixin --+            
                                                 |            
        ui.qt.appframework2.baseapp.ValidatedPanel --+        
                                                     |        
                                        object --+   |        
                                                 |   |        
           ui.qt.appframework2.markers.MarkerMixin --+        
                                                     |        
                           ui.qt.appframework2.af2.App --+    
                                                         |    
                            ui.qt.appframework2.af2.JobApp --+
                                                             |
                                                            BasePanel
Known Subclasses:

A base class for all Jaguar GUIs. Subclasses should define TABS and TASK_NAME.

Nested Classes [hide private]

Inherited from PyQt4.QtGui.QWidget: RenderFlag, RenderFlags

Inherited from PyQt4.QtGui.QPaintDevice: PaintDeviceMetric

Instance Methods [hide private]
 
setPanelOptions(self)
Define instance variables that specify the creation of the panel.
 
setup(self)
Instantiate the tab widget and tabs
schrodinger.application.jaguar.input.JaguarInput
_createDefaultJagInput(self)
Create a JaguarInput object containing default keywords taken from all tabs
 
getTab(self, tab_class)
Get the tab of the specified class
 
_help(self)
Display help for the current tab
schrodinger.job.jobcontrol.Job
launchJaguarJob(self, jag_input)
Launch the specified job.
 
createCmd(self)
Create the command line for job launching.
list
hostAndCpuArgs(self)
Build the command line arguments for passing the hostname and the number of CPUs.
bool
useParallelArg(self)
If multiple CPUs are requested without specifying the number of threads, should we pass the number of CPUs using "-HOST hostname:4" or "-HOST hostname -PARALLEL 4"? For standard panels, the colon is used when there are multiple structures being processed, and -PARALLEL is used when there is a single structure.
 
getNumStructures(self)
Get the number of structures that this panel is currently representing
bool or NoneType
reset(self)
Reset the panel after prompting the user for confirmation
 
_loadSettings(self, jag_input)
Load the specified settings into the tabs and store them in self._jag_input.
 
_loadSettingsWithErrors(self, jag_input)
Load the specified settings.
bool
_resetWarning(self)
Display a dialog to confirm that the user really wants to reset the panel
 
getConfigDialog(self)
Get the job configuration dialog
 
runTabValidation(self)
Run validation for each tab.
str
generateStatus(self)
Create the status bar message.
str or NoneType
generateJaguarStatus(self)
Create a Jaguar-specific status bar message.
 
_updateMmJag(self)
Update the mmjag object that will be used to build the input file
dict
getMmJagKeywords(self)
Get Jaguar keywords that are specific to this panel and not set in any of the tabs.
 
_runPreflight(self)
Run the mmjag preflight check, which checks settings for consistency.
 
_getAllJagSettings(self)
Get the Jaguar keywords from all tabs and store them in the JaguarInput handle.
 
_getCoordinateSettings(self)
Load all scan and coordinate constraint settings into self._jag_input
 
_addStructureToMmJag(self)
Add the structure specified in the input selector frame to the mmjag handle.

Inherited from ui.qt.appframework2.af2.JobApp: __init__, cleanup, cleanupWriteCmd, closeEvent, cmdListToCmd, configDialogSettings, createBottomBar, createJobDir, getCmdListArgValue, jobDir, jobname, lastJobCompleted, launchJobCmd, launchLauncher, launchScript, launcherToCmdList, layOut, makeLauncher, registerJob, runMaestro, setConfigDialogSettings, setDefaults, setJobname, setupJobCmd, showSTUDialog, syncConfigDialog, updateJobname, updateStatusBar, writeJobCmd

Inherited from ui.qt.appframework2.af2.JobApp (private): _addCmdParam, _getSHFilename, _getSTUZIPFilename, _makeLocaleIndependent, _periodicJobCheck, _settings, _start, _startOrWrite, _write, _writeSTU

Inherited from ui.qt.appframework2.af2.App: createInputSelector, showEvent, showProgressBarForJob

Inherited from ui.qt.appframework2.af2.App (private): _read, _reset, _statusShrunk, _updateProgressBar

Inherited from ui.qt.appframework2.baseapp.ValidatedPanel: reportValidation

Inherited from ui.qt.appframework2.baseapp.BasePanel: __str__, error, getOpenFileName, getOpenFileNames, info, keyPressEvent, parent, question, run, runMode, runStandalone, runSubpanel, startUp, warning

Inherited from PyQt4.QtGui.QWidget: acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, contentsMargins, contentsRect, contextMenuEvent, contextMenuPolicy, create, cursor, customContextMenuRequested, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, enabledChange, ensurePolished, enterEvent, event, find, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontChange, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grabGesture, grabKeyboard, grabMouse, grabShortcut, graphicsEffect, graphicsProxyWidget, handle, hasFocus, hasMouseTracking, height, heightForWidth, hide, hideEvent, inputContext, inputMethodEvent, inputMethodHints, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isEnabledToTLW, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isTopLevel, isVisible, isVisibleTo, isWindow, isWindowModified, keyReleaseEvent, keyboardGrabber, languageChange, layout, layoutDirection, leaveEvent, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, move, moveEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, paintEvent, palette, paletteChange, parentWidget, pos, previousInFocusChain, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, repaint, resetInputContext, resize, resizeEvent, restoreGeometry, saveGeometry, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedWidth, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGraphicsEffect, setHidden, setInputContext, setInputMethodHints, setLayout, setLayoutDirection, setLocale, setMask, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setShortcutAutoRepeat, setShortcutEnabled, setShown, setSizeIncrement, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabOrder, setToolTip, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, show, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeHint, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, topLevelWidget, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, width, winId, window, windowActivationChange, windowFilePath, windowFlags, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, x, x11Info, x11PictureHandle, y

Inherited from PyQt4.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connect, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, emit, eventFilter, findChild, findChildren, inherits, installEventFilter, isWidgetType, killTimer, metaObject, moveToThread, objectName, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, trUtf8

Inherited from PyQt4.QtGui.QPaintDevice: colorCount, depth, heightMM, logicalDpiX, logicalDpiY, numColors, paintingActive, physicalDpiX, physicalDpiY, widthMM

Inherited from sip.simplewrapper: __new__

Inherited from ui.qt.appframework2.markers.MarkerMixin: addMarker, getAllMarkers, getMarker, hideAllMarkers, removeAllMarkers, removeAllMarkersForEntry, removeMarker, removeMarkerForAtoms, showAllMarkers

Inherited from ui.qt.appframework2.markers.MarkerMixin (private): _calcEntryAtomTotal, _canonicalizeAtomOrder, _clearInvalidatedMarkers, _createMarker, _eidsFromHashable, _genMarkerHash, _updateMarkers

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

Inherited from ui.qt.appframework2.validation.ValidationMixin: runValidation, validationEnabled

Inherited from ui.qt.appframework2.validation.ValidationMixin (private): _validate, _validateAdded, _validateChildren, _validateOwn

Class Methods [hide private]

Inherited from ui.qt.appframework2.af2.App: panel

Class Variables [hide private]
str TASK_NAME = ''
The name of the panel
list TABS = []
The list of tabs that a panel should contain.

Inherited from ui.qt.appframework2.af2.JobApp: NO_PROGRESS_BAR, PROGRESS_BAR_NO_TEXT, PROGRESS_BAR_WITH_TEXT

Inherited from ui.qt.appframework2.af2.App (private): _singleton

Inherited from PyQt4.QtGui.QWidget: DrawChildren, DrawWindowBackground, IgnoreMask

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Inherited from PyQt4.QtGui.QPaintDevice: PdmDepth, PdmDpiX, PdmDpiY, PdmHeight, PdmHeightMM, PdmNumColors, PdmPhysicalDpiX, PdmPhysicalDpiY, PdmWidth, PdmWidthMM

Instance Variables [hide private]

Inherited from ui.qt.appframework2.markers.MarkerMixin: MARKER_ICONS

Inherited from ui.qt.appframework2.markers.MarkerMixin (private): _marked_eid_lengths, _markers

Properties [hide private]

Inherited from ui.qt.appframework2.baseapp.BasePanel: title

Inherited from object: __class__

Method Details [hide private]

setPanelOptions(self)

 

Define instance variables that specify the creation of the panel.

Overrides: ui.qt.appframework2.baseapp.BasePanel.setPanelOptions

setup(self)

 

Instantiate the tab widget and tabs

Overrides: ui.qt.appframework2.markers.MarkerMixin.setup

_createDefaultJagInput(self)

 

Create a JaguarInput object containing default keywords taken from all tabs

Returns: schrodinger.application.jaguar.input.JaguarInput
A JaguarInput object containing default keywords

Note: An "empty" JaguarInput object contains all mmjag defaults, so most tabs will not return any default keywords. Mmjag defaults do not specify a theory level or a DFT functional, however, and the panel expects defaults for these.

getTab(self, tab_class)

 

Get the tab of the specified class

Parameters:
  • tab_class (type) - The class of the tab to retrieve

_help(self)

 

Display help for the current tab

Overrides: ui.qt.appframework2.af2.App._help

launchJaguarJob(self, jag_input)

 

Launch the specified job.

Parameters:
Returns: schrodinger.job.jobcontrol.Job
A job object for the launched job

createCmd(self)

 

Create the command line for job launching. Note that the input file name will be added in launchJaguarJob.

Note: This function is intended to be overridden in BasePanel subclassses that use different command lines. This code should not be moved into launchJaguarJob.

hostAndCpuArgs(self)

 

Build the command line arguments for passing the hostname and the number of CPUs.

Returns: list
A list of command line arguments

useParallelArg(self)

 

If multiple CPUs are requested without specifying the number of threads, should we pass the number of CPUs using "-HOST hostname:4" or "-HOST hostname -PARALLEL 4"? For standard panels, the colon is used when there are multiple structures being processed, and -PARALLEL is used when there is a single structure. To change this behavior, override this function when subclassing.

Returns: bool
True if we should use -PARALLEL, False if we should use a colon after the hostname.

Note: This variable is the inverse of the distributed_job variable in the C++ implementation of the GUIs. distributed_job is True when the colon should be used.

reset(self)

 

Reset the panel after prompting the user for confirmation

Returns: bool or NoneType
Returns False if the user does not want to reset. This will prevent AF2 from resetting the input selector.
Decorators:
  • @af2.appmethods.reset("Reset Panel")

_loadSettings(self, jag_input)

 

Load the specified settings into the tabs and store them in self._jag_input. This function should not be called directly. Instead, _loadSettingsWithErrors(), _loadSettingsWithEditDialogWarnings(), or _loadSettingsWithReadWarnings() should be used so warnings are handled properly.

Parameters:

_loadSettingsWithErrors(self, jag_input)

 

Load the specified settings. If a warning is raised, it will immediately be raised as an exception. This function should be used when reading in default settings, since all default settings should be properly handled by the panel.

Parameters:
Raises:

_resetWarning(self)

 

Display a dialog to confirm that the user really wants to reset the panel

Returns: bool
True if the user wants to reset. False otherwise.

getConfigDialog(self)

 

Get the job configuration dialog

Overrides: ui.qt.appframework2.af2.JobApp.getConfigDialog

runTabValidation(self)

 

Run validation for each tab. If any tab raises an error, immediately switch to that tab and return the error.

Decorators:
  • @af2.validator()

generateStatus(self)

 

Create the status bar message. This function will prepend any Jaguar- specific status bar message before the standard job information. The Jaguar-specific status bar message can be generated by defining generateJaguarStatus().

Returns: str
The text to put into the status bar
Overrides: ui.qt.appframework2.af2.JobApp.generateStatus

generateJaguarStatus(self)

 

Create a Jaguar-specific status bar message. This function should be defined in any subclass that wishes to modify the status bar message.

Returns: str or NoneType
The Jaguar-specific status bar message, or None if no such message is desired.

_updateMmJag(self)

 

Update the mmjag object that will be used to build the input file

Raises:

getMmJagKeywords(self)

 

Get Jaguar keywords that are specific to this panel and not set in any of the tabs.

Returns: dict
A dictionary of Jaguar keywords

_runPreflight(self)

 

Run the mmjag preflight check, which checks settings for consistency.

Raises:

_getAllJagSettings(self)

 

Get the Jaguar keywords from all tabs and store them in the JaguarInput handle. Also get and store any task-specific keywords.

Raises:

_addStructureToMmJag(self)

 

Add the structure specified in the input selector frame to the mmjag handle.

Raises:

Class Variable Details [hide private]

TABS

The list of tabs that a panel should contain. Each tab must be a schrodinger.application.jaguar.gui.tabs.base_tab.BaseTab subclass.
Type:
list
Value:
[]