schrodinger.application.jaguar.gui.tabs.base_tab module

class schrodinger.application.jaguar.gui.tabs.base_tab.CombinedUi

Bases: object

An object that provides access to widgets across multiple ui files

class schrodinger.application.jaguar.gui.tabs.base_tab.BaseTab(parent, input_selector=None)

Bases: PyQt5.QtWidgets.QWidget

The base class for all Jaguar tabs. Subclasses should define NAME, HELP_TOPIC, UI_MODULES, setup(), getMmJagKeywords(), restoreSettings(), and reset().

Variables:
  • NAME (str) – The name of the tab
  • HELP_TOPIC (str) – The help topic for the tab
  • UI_MODULES (tuple) – A tuple of ui modules defining the tab widgets. These ui modules should be listed top to bottom. Optionally, a tuple of (tab class, attribute name) may be listed instead of a ui file to include a subtab.
  • ui (CombinedUi) – An object that provides access to all widgets from all ui files. Note that widget names should be unique amongst all ui files for the tab.
  • task_name (str) – The name of the panel this tab is part of
  • input_selector (schrodinger.ui.qt.input_selector.InputSelector) – The AppFramework input selector frame from the panel containing this tab.
NAME = ''
HELP_TOPIC = ''
UI_MODULES = None
setup()

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

getDefaultKeywords()

Get the default keywords for this tab. Note that defaults that exist in mmjag should not be explicitly set here.

getMmJagKeywords()

Return all keywords that should be put into the mmjag handle. This function should be defined in subclasses.

Returns:All keywords that should be put into the mmjag handle
Return type:dict
Raises:schrodinger.application.jaguar.gui.utils.JaguarSettingError – If any settings are invalid.
loadSettings(jag_input)

Restore tab settings from mmjag keywords. This function should be defined in subclasses.

Parameters:jag_input (schrodinger.application.jaguar.input.JaguarInput) – The Jaguar settings to base the tab settings on
loadPerAtomSettings(jag_input, eid=None, title=None)

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

Parameters:
saveSettings(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:
reset()

Reset the tab to its original state. Note that this function is only necessary for settings that are not stored in the mmjag handle. For mmjag settings, reset will be carried out using loadSettings with a default schrodinger.application.jaguar.input.JaguarInput object. This function should only be defined in subclasses if there are any settings that cannot be reset via loadSettings.

validate()

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:If the validation passes, None is returned. If the validation fails, a string that describes the error is returned.
Return type:str or NoneType
error(msg)

Display an error dialog with the specified message

Parameters:msg (str) – The message to include in the error dialog
warning(msg)

Display a warning dialog with the specified message

Parameters:msg (str) – The message to include in the warning dialog
activate()

This function will be called whenever the user selects this tab. Subclasses can override it if necessary to, e.g., activate picking.

deactivate()

This function will be called whenever the user selects a different tab. Subclasses can override it if necessary to, e.g., deactivate picking.

class schrodinger.application.jaguar.gui.tabs.base_tab.ProvidesBasisMixin

Bases: object

A mixin for tabs that allow the user to select a basis set. This mixin is used to find tabs (via basePanel.getTab()) that can provide basis information.

basis_changed
getBasis(mixed_name='Mixed')

Get the currently selected basis. If more than one basis set is specified, mixed_name will be returned. If the tab does not allow for specifying multiple basis sets, then this argument may be ignored.

Parameters:mixed_name (str) – The name to return if more than one basis set is specified
Returns:The currently selected basis
Return type:str
class schrodinger.application.jaguar.gui.tabs.base_tab.ProvidesStructuresMixin

Bases: object

A mixin for tabs that allow the user to select structures. This mixin is used to find tabs (via basePanel.getTab()) that can provide structure information.

structureChanged
MULTIPLE_STRUC_JOB_TITLE = 'batch'
getStructureTitleForJobname()

Get the structure title to be used in the job name. If the tab includes multiple structures, then MULTIPLE_STRUC_JOB_TITLE should be returned. If no structures have been specified yet, then None should be returned.

Returns:The structure title
Return type:str or NoneType