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

Class BaseJaguarPanel

                                               object --+            
                                                        |            
ui.qt.appframework2.maestro_callback.MaestroCallbackMixin --+        
                                                            |        
                                               object --+   |        
                                                        |   |        
                  ui.qt.appframework2.markers.MarkerMixin --+        
                                                            |        
                                               object --+   |        
                                                        |   |        
               ui.qt.appframework2.settings.SettingsMixin --+        
                                                            |        
               ui.qt.appframework2.baseapp.ValidatedPanel --+        
                                                            |        
                                  ui.qt.appframework2.af2.App --+    
                                                                |    
                                   ui.qt.appframework2.af2.JobApp --+
                                                                    |
                                                                   BaseJaguarPanel

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

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
jobnameArg(self)
Build the command line arguments for passing the job name.
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"? To change this behavior, override this function when subclassing.
 
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, eid=None, title=None)
Load the specified settings into the tabs and store them in self._jag_input.
 
_loadSettingsWithErrors(self, jag_input, eid=None, title=None)
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.
 
_getPerAtomSettings(self, eid)
Load all per-atom settings into self._jag_input
 
_clearPerAtomSettings(self)
Remove all per-atom settings from the mmjag handle
 
_clearFreezeProperties(self, struc)
Delete all Maestro "freeze" atom properties, as these freezes didn't come from the panel but will be enforced as constraints by the Jaguar backend.
 
_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, jobnameData, jobnameDataChanged, launchJobCmd, launchLauncher, launchScript, launcherToCmdList, layOut, makeLauncher, registerJob, runMaestro, sanitizeJobnameText, setConfigDialogSettings, setDefaults, setJobname, setupJobCmd, showSTUDialog, syncConfigDialog, updateJobname, updateStatusBar, writeJobCmd

Inherited from ui.qt.appframework2.af2.App: createInputSelector, defineCustomSettings, getAliasedValue, getPanelState, getWorkspaceStructure, loadPanelState, setAliasedValue, setPanelState, showEvent, showProgressBarForJob, writePanelState

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

Inherited from ui.qt.appframework2.maestro_callback.MaestroCallbackMixin: buildCallbackDicts

Inherited from ui.qt.appframework2.maestro_callback.MaestroCallbackMixin (private): _addCallbacks, _delayedCallbacks, _removeCallbacks

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 ui.qt.appframework2.settings.SettingsMixin: __getitem__, __setitem__, applySettings, getAliasedSettings, getObjValue, getSettings, setAlias, setAliases, setObjValue

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

Class Methods [hide private]

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

Class Variables [hide private]
str TASK_NAME = ""
The name of the panel
str SHORT_NAME = ""
A shortened version of TASK_NAME.
list TABS = []
The list of tabs that a panel should contain.
list INPUT_SUB_TABS = []
The list of sub-tabs for the Input tab.
bool USE_PARALLEL_ARG = True
The value to pass to schrodinger.application.jaguar.gui.utils.host_and_cpu_args for use_parallel when constructing command line arguments.
bool EXPLICIT_ONE_ARG = True
The value to pass to schrodinger.application.jaguar.gui.utils.host_and_cpu_args for explicit_one when constructing command line arguments.
bool ONE_SUBJOB_ARG = True
The value to pass to schrodinger.application.jaguar.gui.utils.host_and_cpu_args for one_subjob when constructing command line arguments.

Inherited from ui.qt.appframework2.af2.JobApp: lastJobCompleted

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

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 object: __class__

Method Details [hide private]

setPanelOptions(self)

 

Define instance variables that specify the creation of the panel.

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

setup(self)

 

Instantiate the tab widget and tabs. Sub-tabs will also be added to the Input tab if necessary.

Overrides: ui.qt.appframework2.af2.App.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 BaseJaguarPanel subclassses that use different command lines. This code should not be moved into launchJaguarJob.

jobnameArg(self)

 

Build the command line arguments for passing the job name.

Returns: list
A list of command line arguments

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"? 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, eid=None, title=None)

 

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:
  • jag_input (schrodinger.application.jaguar.input.JaguarInput) - The Jaguar settings to load
  • eid (str) - The entry id of the structure in jag_input. Only necessary if jag_input contains per-atom settings.
  • title (str) - The title of the structure in jag_input. Only necessary if jag_input contains per-atom settings.

_loadSettingsWithErrors(self, jag_input, eid=None, title=None)

 

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.

See _loadSettings for argument documentation.

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:

_getPerAtomSettings(self, eid)

 

Load all per-atom settings into self._jag_input

Parameters:
  • eid (str) - The entry id to load settings for

_clearFreezeProperties(self, struc)

 

Delete all Maestro "freeze" atom properties, as these freezes didn't come from the panel but will be enforced as constraints by the Jaguar backend. (See PANEL-3518.)

_addStructureToMmJag(self)

 

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

Raises:

Class Variable Details [hide private]

SHORT_NAME

A shortened version of TASK_NAME. Used in constructing job names.
Type:
str
Value:
""

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:
[]

INPUT_SUB_TABS

The list of sub-tabs for the Input tab. Only used if TABS contains a subclass of schrodinger.application.jaguar.gui.tabs. input_tab.InputTabWithSubTabs. Each sub-tab must be a schrodinger. application.jaguar.gui.tabs.input_sub_tabs.base_sub_tab.BaseSubTab subclass.
Type:
list
Value:
[]

USE_PARALLEL_ARG

The value to pass to schrodinger.application.jaguar.gui.utils.host_and_cpu_args for use_parallel when constructing command line arguments. Note that this value can also be modified by overriding the useParallelArg method if more complex behavior is required.
Type:
bool
Value:
True