Package schrodinger :: Package application :: Package jaguar :: Package gui :: Package tabs :: Module input_tab :: Class InputTabWithSubTabs
[hide private]
[frames] | no frames]

Class InputTabWithSubTabs

             PyQt4.QtGui.QWidget --+        
                                   |        
         base_tab.ProvidesBasisMixin --+    
                                       |    
         PyQt4.QtGui.QWidget --+       |    
                               |       |    
base_tab.ProvidesStructuresMixin --+   |    
                                   |   |    
         PyQt4.QtGui.QWidget --+   |   |    
                               |   |   |    
                base_tab.BaseTab --+   |    
                                   |   |    
                        InputTabBase --+    
                                       |    
                                InputTab --+
                                           |
                                          InputTabWithSubTabs

An Input tab with sub-tabs on the bottom. Sub-tabs can be set using addSubTabs, which is normally accessed by setting the INPUT_SUB_TABS panel class variable.

Nested Classes [hide private]

Inherited from InputTabBase: MODEL_CLASS, PROXY_CLASS, VIEW_CLASS, __metaclass__

Instance Methods [hide private]
 
_populateUi(self)
After combining all the ui files, create:
 
addSubTabs(self, sub_tab_classes)
Add a sub tab for each of the specified classes.
 
_configurePerAtomBasis(self)
If there is a basis set sub-tab, connect the per-atom basis set model to the input table model.
 
getSubTab(self, sub_tab_class)
Get the sub-tab of the specified class
 
setup(self)
Perform tab specific initialization.
 
_subTabCountChanged(self, sub_tab, count)
Whenever the row count changes in one of the sub tab tables, update the sub tab title with the new count.
 
projectUpdated(self)
Whenever the project is updated, update the structure titles and the structures shown in the sub tabs.
 
reset(self)
Reset any structure specific settings in the table.
 
setSubTabsVisible(self, visible=None)
Set whether the sub-tabs are visible in response to the user clicking on the "Atom-Level Settings" button.
 
_updateAfterSubTabsVisible(self, visible)
Update the panel after sub-tab visibility was changed
bool
subTabsVisible(self)
Are the sub-tabs currently visible?
 
_splitterMoved(self)
If the user just toggled sub-tab visibility by dragging the slider, update the panel appropriately
 
_subTabChanged(self, new_index)
When the sub-tab is changed, activate the newly selected sub-tab
str or NoneType
validate(self)
Make sure that the tab settings will allow a job to be run successfully.
 
saveSettings(self, jag_input, eid)
Save tab settings in jaguar handle.
 
loadPerAtomSettings(self, jag_input, eid, title)
Restore per-atom tab settings from mmjag keywords.
schrodinger.application.jaguar.gui.input_sub_tabs. base_sub_tab.BaseSubTab or NoneType
activeSubTab(self)
Get the active sub tab
str or NoneType
activeSubTabName(self)
Get the name of the active sub-tab
 
activate(self)
Activate the appropriate sub-tab (if any) when this tab is activated
 
deactivate(self)
Deactivate the active sub-tab (if any)
set
displayedEntryIds(self)
Return the entry IDs for all structures that are currently displayed in the input table
bool
perAtomBasisSetsPresent(self)
Have any per-atom basis sets been set?
str or NoneType
getCommonBasis(self)
If all structures use the same basis set and there are no per-atom basis sets, return the basis set name.
 
theoryChanged(self, theory_level)
If there is a Charge Constraints sub-tab, disable or enable it when the level of theory changes.
 
useFromComboChanged(self)
Update the sub-tabs when the user changes the structure source (from included to selected or vice versa).

Inherited from InputTab: chargedStrucsPresent, getBasis, getBasisForEid, getDefaultKeywords, loadSettings

Inherited from InputTabBase: getMmJagKeywords, getNumStructures, getStructureTitleForJobname, getStructures, usingSelected, workspaceChanged

Inherited from base_tab.BaseTab: __init__, error, warning

Class Variables [hide private]
tuple UI_MODULES = ui.input_top_ui, ui.input_std_bottom_ui
A tuple of ui modules defining the tab widgets.
bool DEFAULT_SUB_TAB_VISIBILITY = False
Whether the sub-tabs should be visible by default.
  SUB_TAB_NAME = "%s (%i)"

Inherited from InputTab: HELP_TOPIC

Inherited from base_tab.ProvidesBasisMixin: basis_changed

Inherited from InputTabBase: NAME, SYMM_ITEMS, strucSourceChanged

Inherited from base_tab.ProvidesStructuresMixin: MULTIPLE_STRUC_JOB_TITLE

Instance Variables [hide private]
PyQt4.QtCore.pyqtSignal subTabChanged = QtCore.pyqtSignal()
A signal emitted when the active sub-tab has been changed, or when the sub-tab visibility has been toggled.
PyQt4.QtCore.pyqtSignal addMarker = QtCore.pyqtSignal(list, dict, str)
A signal emitted when a workspace marker should be added.
PyQt4.QtCore.pyqtSignal removeMarker = QtCore.pyqtSignal(list, str)
A signal emitted when a workspace marker should be removed.
PyQt4.QtCore.pyqtSignal setMarkerHighlighting = QtCore.pyqtSignal(list, bool, str)
A signal emitted when the highlighting of a workspace marker should be changed.

Inherited from base_tab.BaseTab: input_selector, task_name, ui

Method Details [hide private]

_populateUi(self)

 

After combining all the ui files, create:

  • A QPushButton to toggle the visibility of the sub-tabs (self.ui.show_sub_tabs_btn)
  • A QSplitter to adjust the relative sizes of the input table and the sub tabs (self.ui.spliiter)
  • A QTabWidget to show the sub tabs (self.ui.sub_tab_widget)

These widgets are added here rather than via a ui file because the splitter must contain all of the input tab contents in order to function properly, and that's not possible with the current ui-combining mechanism.

Overrides: base_tab.BaseTab._populateUi

addSubTabs(self, sub_tab_classes)

 

Add a sub tab for each of the specified classes. Note that this function should be called only once per instance.

Parameters:

_configurePerAtomBasis(self)

 

If there is a basis set sub-tab, connect the per-atom basis set model to the input table model. This allows the input table to use the per-atom basis sets when determining basis set validity and basis function counts.

getSubTab(self, sub_tab_class)

 

Get the sub-tab of the specified class

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

setup(self)

 

Perform tab specific initialization. This function should be defined in subclasses if initialization is needed.

Overrides: base_tab.BaseTab.setup
(inherited documentation)

_subTabCountChanged(self, sub_tab, count)

 

Whenever the row count changes in one of the sub tab tables, update the sub tab title with the new count.

Parameters:

projectUpdated(self)

 

Whenever the project is updated, update the structure titles and the structures shown in the sub tabs.

Overrides: InputTabBase.projectUpdated

reset(self)

 

Reset any structure specific settings in the table. (The non-struture specific settings will be reset via loadSettings())

Overrides: base_tab.BaseTab.reset
(inherited documentation)

setSubTabsVisible(self, visible=None)

 

Set whether the sub-tabs are visible in response to the user clicking on the "Atom-Level Settings" button.

Parameters:
  • visible (bool or NoneType) - Should the sub-tabs be made visible. If not specified, the visibility will be toggled.

_updateAfterSubTabsVisible(self, visible)

 

Update the panel after sub-tab visibility was changed

Parameters:
  • visible (bool) - Were the sub-tabs made visible?

subTabsVisible(self)

 

Are the sub-tabs currently visible?

Returns: bool
True if the sub-tabs are visible. False otherwise.

_subTabChanged(self, new_index)

 

When the sub-tab is changed, activate the newly selected sub-tab

Parameters:
  • new_index (int) - The index of the newly selected sub-tab

validate(self)

 

Make sure that the tab settings will allow a job to be run successfully. Note that this validation should not be redundant with that performed in getMmJagKeywords. Any tab setting that prevents valid mmjag keywords from being generated should cause getMmJagKeywords to raise a JaguarSettingError. Any tab setting that allows mmjag keywords to be successfully generated but will result in a job failure should cause a validate fail. This function should be defined in subclasses if validation is needed.

Returns: str or NoneType
If the validation passes, None is returned. If the validation fails, a string that describes the error is returned.
Overrides: base_tab.BaseTab.validate
(inherited documentation)

saveSettings(self, jag_input, eid)

 

Save tab settings in jaguar handle. It is only used for settings which are not defined using keywords (typically per-atom settings). This function should be defined in subclasses for any tabs that contain per- atom settings.

Parameters:
  • jag_input - The Jaguar handle to store the tab settings in
  • eid - The entry id of the structure in jag_input
Overrides: base_tab.BaseTab.saveSettings
(inherited documentation)

loadPerAtomSettings(self, jag_input, eid, title)

 

Restore per-atom tab settings from mmjag keywords. This function should be defined in subclasses for any tabs that contain per-atom settings.

Parameters:
  • jag_input - The Jaguar settings to base the tab settings on
  • eid - The entry id of the structure in jag_input
  • title - The title of the structure in jag_input
Overrides: base_tab.BaseTab.loadPerAtomSettings
(inherited documentation)

activeSubTab(self)

 

Get the active sub tab

Returns: schrodinger.application.jaguar.gui.input_sub_tabs. base_sub_tab.BaseSubTab or NoneType
The active sub-tab or None if the sub-tabs are not visible

activeSubTabName(self)

 

Get the name of the active sub-tab

Returns: str or NoneType
The name of the active sub-tab or None if the sub-tabs are not visible

activate(self)

 

Activate the appropriate sub-tab (if any) when this tab is activated

Overrides: base_tab.BaseTab.activate

deactivate(self)

 

Deactivate the active sub-tab (if any)

Overrides: base_tab.BaseTab.deactivate

displayedEntryIds(self)

 

Return the entry IDs for all structures that are currently displayed in the input table

Returns: set
A set of entry ids

perAtomBasisSetsPresent(self)

 

Have any per-atom basis sets been set?

Returns: bool
True if there are per-atom basis sets for any currently selected structures. False otherwise.

getCommonBasis(self)

 

If all structures use the same basis set and there are no per-atom basis sets, return the basis set name. Otherwise, return None.

Returns: str or NoneType
The basis set name or None
Overrides: InputTab.getCommonBasis

theoryChanged(self, theory_level)

 

If there is a Charge Constraints sub-tab, disable or enable it when the level of theory changes.

Parameters:
  • theory_level (str) - The current level of theory. Should be one of "DFT", "HF", or "LMP2".

useFromComboChanged(self)

 

Update the sub-tabs when the user changes the structure source (from included to selected or vice versa).

Overrides: InputTabBase.useFromComboChanged

Class Variable Details [hide private]

DEFAULT_SUB_TAB_VISIBILITY

Whether the sub-tabs should be visible by default. Sub-tab visibility can be toggled at any time using setSubTabsVisible, which is connected to the "Atom-Level Settings" button.
Type:
bool
Value:
False

Instance Variable Details [hide private]

addMarker

A signal emitted when a workspace marker should be added. Emitted with:
  • The list of atoms to add the marker for (list)
  • The marker settings (dict)
  • The name of the sub-tab that the marker is for (str)
Type:
PyQt4.QtCore.pyqtSignal
Value:
QtCore.pyqtSignal(list, dict, str)

removeMarker

A signal emitted when a workspace marker should be removed. Emitted with:
  • The list of atoms to remove the marker for (list)
  • The name of the sub-tab that the marker is for (str)
Type:
PyQt4.QtCore.pyqtSignal
Value:
QtCore.pyqtSignal(list, str)

setMarkerHighlighting

A signal emitted when the highlighting of a workspace marker should be changed. Emitted with:
  • The list of atoms to change the highlighting for (list)
  • Whether the marker should be highlighted (True) or unhighlighted (False) (bool)
  • The name of the sub-tab that the marker is for (str)
Type:
PyQt4.QtCore.pyqtSignal
Value:
QtCore.pyqtSignal(list, bool, str)