Package schrodinger :: Package application :: Package jaguar :: Package gui :: Module basis_selector :: Class _BasisSelectorPopUp
[hide private]
[frames] | no frames]

Class _BasisSelectorPopUp

       object --+                        
                |                        
sip.simplewrapper --+                    
                    |                    
          sip.wrapper --+                
                        |                
     PyQt4.QtCore.QObject --+            
                            |            
           object --+       |            
                    |       |            
    sip.simplewrapper --+   |            
                        |   |            
 PyQt4.QtGui.QPaintDevice --+            
                            |            
          PyQt4.QtGui.QWidget --+        
                                |        
               PyQt4.QtGui.QFrame --+    
                                    |    
           ui.qt.pop_up_widgets.PopUp --+
                                        |
                                       _BasisSelectorPopUp
Known Subclasses:

The pop up window that is displayed adjacent to BasisSelectorLineEdit

Nested Classes [hide private]

Inherited from PyQt4.QtGui.QFrame: Shadow, Shape, StyleMask

Inherited from PyQt4.QtGui.QWidget: RenderFlag, RenderFlags

Inherited from PyQt4.QtGui.QPaintDevice: PaintDeviceMetric

Instance Methods [hide private]
 
setup(*args, **kwargs)
Subclass-specific initialization.
 
_createWidgets(self)
Instantiate all basis selector widgets
 
_createInfoLabels(self)
Create self.text_lbl to display text and self.icon_lbl containing an error icon
 
_layoutWidgets(self)
Arrange all basis selector widgets
 
_connectSignals(self)
Connect the combo box signals
 
_populateBases(self)
Populate the basis set combo box.
 
setStructure(self, new_struc)
React to the user changing the selected structure by updating or disabling the basis selection.
 
setPerAtom(self, per_atom)
Set the per-atom basis sets for the current structure.
 
setAtomNum(self, atom_num)
Set the atom number.
 
_disableBasis(self)
The popup cannot be disabled, so this function is a no op.
 
structureUpdated(self)
React to a change in the structure described by self._struc.
 
_update(*args, **kwargs)
React to a new basis set being selected by updating the labels and the polarization and diffuse combo boxes.
 
_updateLabels(self)
Update the labels in response the newly loaded structure and/or newly selected basis set.
tuple
_calcNumFunctions(self, basis_name_full)
Calculate the number of basis functions that will be used for the currently selected structure and basis set
 
_populatePolarization(self, nstar)
Properly populate the polarization combo box.
 
_populateDiffuse(self, nplus)
Properly populate the diffuse combo box.
 
_populatePolarizationOrDiffuse(self, num_symbol, symbol, combo, lbl)
Properly populate the polarization or diffuse combo boxes.
str
_addCurrentSuffix(self, basis_name)
Add the currently selected number of stars and pluses to the given basis name
 
_setBasisAvailabilityAndIcon(self)
Update which basis sets are enabled in the basis selection combo box.
False
isValid(self)
Is a valid basis currently selected?
str
getBasis(self)
Get the currently selected basis
 
setBasis(self, basis_full=None)
Set the basis to the requested value.
 
_emitBasisChanged(self)
Emit the basis changed signal with the currently selected basis set
bool
setBasisSafe(self, basis_full='')
Set the basis to the requested value.
 
_clearInfoLabels(self)
Clear the labels used to present information to the user
PyQt4.QtCore.QAbstractItemModel
basisModel(self)
Return the model of basis set names
 
_showWarning(self)
Show a warning that the user has specified an invalid basis set
 
setBlankBasisAllowed(self, allowed)
Specify whether a blank basis set is allowed or should result in an "Invalid basis set" warning.
int
estimateMaxHeight(self)
Estimate the maximum height of this widget (since the popup's height may increase when more text is added to the bottom label).

Inherited from ui.qt.pop_up_widgets.PopUp: __init__, estimateMaxWidth, installPopUpEventFilter, lineEditUpdated, show, subWidgetHasFocus

Inherited from PyQt4.QtGui.QFrame: changeEvent, drawFrame, event, frameRect, frameShadow, frameShape, frameStyle, frameWidth, lineWidth, midLineWidth, paintEvent, setFrameRect, setFrameShadow, setFrameShape, setFrameStyle, setLineWidth, setMidLineWidth, sizeHint

Inherited from PyQt4.QtGui.QWidget: acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsMargins, contentsRect, contextMenuEvent, contextMenuPolicy, create, cursor, customContextMenuRequested, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, enabledChange, ensurePolished, enterEvent, 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, keyPressEvent, 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, 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, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, 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, parent, 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 object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
bool ENABLE_WHEN_NO_STRUC = True
hash(x)
  ERROR_FORMAT = '<span style=\'color: red; font-weight: bold\'>...

Inherited from PyQt4.QtGui.QFrame: Box, HLine, NoFrame, Panel, Plain, Raised, Shadow_Mask, Shape_Mask, StyledPanel, Sunken, VLine, WinPanel

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.pop_up_widgets.PopUp: dataChanged, popUpResized

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setup(*args, **kwargs)

 

Subclass-specific initialization. Subclasses must implement this function.

Decorators:
  • @jag_basis.mmjag_function
Overrides: ui.qt.pop_up_widgets.PopUp.setup
(inherited documentation)

setStructure(self, new_struc)

 

React to the user changing the selected structure by updating or disabling the basis selection.

Parameters:

setPerAtom(self, per_atom)

 

Set the per-atom basis sets for the current structure. These basis sets will be used when calculating the available basis sets and the number of basis functions. Note that this function will clear any atom number that has been set via setAtomNum.

Parameters:
  • per_atom (dict) - A dictionary of {atom index: basis name} for per-atom basis sets.

setAtomNum(self, atom_num)

 

Set the atom number. The basis selector will now allow the user to select a basis set for the specified atom rather than for the entire structure. Note that this function will clear any per-atom basis sets that have been set via setPerAtom.

Parameters:
  • atom_num (int) - The atom index

_disableBasis(self)

 

The popup cannot be disabled, so this function is a no op. It is overridden in the BasisSelector subclass.

structureUpdated(self)

 

React to a change in the structure described by self._struc. i.e. The schrodinger.structure.Structure object passed to setStructure has not changed, but the structure described by that object has.

_update(*args, **kwargs)

 

React to a new basis set being selected by updating the labels and the polarization and diffuse combo boxes.

Parameters:
  • ignored - This argument is entirely ignored, but is present so Qt callback arguments won't be interpreted as suppress_signal
  • suppress_signal (bool) - If True, the basis_changed signal won't be emitted in response to this update.
Decorators:
  • @jag_basis.mmjag_function

_calcNumFunctions(self, basis_name_full)

 

Calculate the number of basis functions that will be used for the currently selected structure and basis set

Parameters:
  • basis - The full basis name (i.e. including stars and pluses)
  • basis_name_full (str)
Returns: tuple
A tuple of
  • The number of basis functions (int)
  • Are pseudospectral grids available (bool)

If there is no structure set, (0, False) will be returned.

_populatePolarization(self, nstar)

 

Properly populate the polarization combo box. Disable the combo box if there are no options for the curently selected basis set.

Parameters:
  • nstar (int) - The maximum number of stars available for the currently selected basis set.

_populateDiffuse(self, nplus)

 

Properly populate the diffuse combo box. Disable the combo box if there are no options for the curently selected basis set.

Parameters:
  • nplus (int) - The maximum number of pluses available for the currently selected basis set.

_populatePolarizationOrDiffuse(self, num_symbol, symbol, combo, lbl)

 

Properly populate the polarization or diffuse combo boxes. Disable the combo box if there are no options for the currently selected basis set.

Parameters:
  • num_symbol (int) - The maximum number of symbols to put into the combo box
  • symbol (str) - The type of symbol to put into the combo box
  • combo (PyQt4.QtWidgets.QComboBox) - The combo box to populate
  • lbl (PyQt4.QtWidgets.QLabel) - The label next to the combo box. This label will be disabled and enabled along with the combo box

_addCurrentSuffix(self, basis_name)

 

Add the currently selected number of stars and pluses to the given basis name

Parameters:
  • basis_name (str) - The basis name without stars or pluses
Returns: str
The provided basis name with stars and pluses appended

_setBasisAvailabilityAndIcon(self)

 

Update which basis sets are enabled in the basis selection combo box. Also update the pseudospectral icons.

isValid(self)

 

Is a valid basis currently selected?

Returns: False
True is a valid basis is currently selected. False otherwise.

getBasis(self)

 

Get the currently selected basis

Returns: str
The currently selected basis

setBasis(self, basis_full=None)

 

Set the basis to the requested value. If no value is given, the default basis (6-31G**) will be used.

Parameters:
  • basis_full (str or NoneType) - The requested basis. Note that this name may include *'s and +'s.
Raises:
  • ValueError - If the requested basis was not valid. In these cases, the basis set will not be changed and basis_changed will not be emitted.

setBasisSafe(self, basis_full='')

 

Set the basis to the requested value. If the provided basis name is invalid, then the combo boxes will be cleared. (With setBasis(), an exception is raised if the basis name is invalid.)

Parameters:
  • basis_full (str) - The requested basis set name including any *'s and +'s.
Returns: bool
True if the basis was valid. False otherwise.

basisModel(self)

 

Return the model of basis set names

Returns: PyQt4.QtCore.QAbstractItemModel
The model of basis set names

setBlankBasisAllowed(self, allowed)

 

Specify whether a blank basis set is allowed or should result in an "Invalid basis set" warning.

Parameters:
  • allowed (bool) - True if a blank basis set should be allowed. False if a blank basis set should result in an invalid basis set warning.

estimateMaxHeight(self)

 

Estimate the maximum height of this widget (since the popup's height may increase when more text is added to the bottom label).

Returns: int
The estimated maximum height
Overrides: ui.qt.pop_up_widgets.PopUp.estimateMaxHeight

Note: This function is only an estimate since Qt won't accurately calculate height until after a redraw. As such, the maximum label height may not be accurate and the presence/absence of the warning icon isn't taken into account.


Class Variable Details [hide private]

ERROR_FORMAT

Value:
'<span style=\'color: red; font-weight: bold\'>%s</span>'