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

Class BasisSelector

       object --+                
                |                
sip.simplewrapper --+            
                    |            
          sip.wrapper --+        
                        |        
     PyQt4.QtCore.QObject --+    
                            |    
           object --+       |    
                    |       |    
    sip.simplewrapper --+   |    
                        |   |    
 PyQt4.QtGui.QPaintDevice --+    
                            |    
          PyQt4.QtGui.QWidget --+
                                |
                               BasisSelector
Known Subclasses:

A widget for selecting a Jaguar basis set. This widget may be directly connected to a schrodinger.ui.qt.appframework.JobInputFrame instance by passing it to the initializer or to setInputSelector(). Alternatively, this widget may be used without an input selector by passing new structures to structureChanged().

Nested Classes [hide private]

Inherited from PyQt4.QtGui.QWidget: RenderFlag, RenderFlags

Inherited from PyQt4.QtGui.QPaintDevice: PaintDeviceMetric

Instance Methods [hide private]
 
basis_changed(...)
A signal that will be emitted whenever the selected basis set is changed.
 
__init__(*args, **kwargs)
Populate the combo boxes and connect them to the appropriate signals
 
_createInfoLabels(self)
Create the labels used to display information to the user
 
_layoutWidgets(self)
Arrange all basis selector widgets
 
setInputSelector(self, input_selector)
Set the input selector that this widget should respond to
 
_populateBases(self)
Populate the basis set combo box.
 
_setDefault(self)
Set the basis, polarization, and diffuse settings using the Jaguar defaults.
 
_inputSelectorStructureChanged(self)
React to the user changing the input selector structure.
 
structureChanged(self, new_struc)
React to the user changing the selected structure by updating or disabling the basis selection.
 
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.
 
_disableBasis(self)
Disable all basis selection combo boxes.
 
_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
str
_addCurrentSuffix(self, basis_name)
Add the currently selected number of stars and pluses to the given basis name
 
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

Inherited from PyQt4.QtGui.QWidget: acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, 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, 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, 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, showEvent, 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, 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]
  ENABLE_WHEN_NO_STRUC = False
hash(x)

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

basis_changed(...)

 
A signal that will be emitted whenever the selected basis set is changed. The signal will be emitted with the newly selected basis as a string.

__init__(*args, **kwargs)
(Constructor)

 

Populate the combo boxes and connect them to the appropriate signals

Parameters:
  • parent (PyQt4.QtGui.QWidget) - The Qt parent
  • input_selector (schrodinger.ui.qt.appframework.JobInputFrame) - The AppFramework input selector. If not given, the input_selector may be set later using setInputSelector().
  • ENABLE_WHEN_NO_STRUC (bool) - Should the basis selector be enabled when no structure has been loaded into it?
Decorators:
  • @jag_basis.mmjag_function
Overrides: object.__init__

setInputSelector(self, input_selector)

 

Set the input selector that this widget should respond to

Parameters:
  • input_selector (schrodinger.ui.qt.appframework.JobInputFrame) - The AppFramework input selector frame

_inputSelectorStructureChanged(self)

 

React to the user changing the input selector structure. Note that only the first input selector structure will be used. All others will be ignored.

structureChanged(self, new_struc)

 

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

Parameters:

structureUpdated(self)

 

React to a change in the structure described by self._struc. i.e. The schrodinger.structure.Structure object passed to structureChanged 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.QtGui.QComboBox) - The combo box to populate
  • lbl (PyQt4.QtGui.QLabel) - The label next to the combo box. This label will be disabled and enabled along with the combo box

_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

_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

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.