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

Class ReadEditMixin

object --+
         |
        ReadEditMixin
Known Subclasses:

A mixin for panels that should include Read... and Edit... in the gear menu

Instance Methods [hide private]
 
setup(self)
 
read(self, allowed_options=None)
Read in the user-specified Jaguar input file and apply it's settings to the panel.
 
editInput(self)
Display the edit dialog
str or NoneType
_getIncludedEntryId(self)
If the input selector is set on Included Entry, get the entry ID for the entry in the workspace (if any) so the workspace can be restored later if necessary.
 
jagInputEdited(self, jag_input, new_struc_flag)
Process the Jaguar settings that the user entered in the Edit dialog.
tuple
restorePreviouslyIncludedEntry(self)
Restore the workspace to it's previous state if the Edit dialog didn't change the structure but did clear the workspace via a Preview.
tuple
_getPreviousEidAndTitle(self)
Get the entry ID and title of the structure that was in the workspace when the Edit dialog was opened.
list
_catchLoadSettingsWarnings(self, jag_input, eid, title)
Load the specified settings and capture any warnings that are raised.
bool
_loadSettingsWithEditDialogWarnings(self, jag_input, eid, title)
Load the specified settings.
 
_loadSettingsWithReadWarnings(self, jag_input, eid, title)
Load the specified settings.
 
_launchReadInputFilesPanel(self)
If inside of Maestro, launch the "Jaguar - Read Input Files" panel.
 
_mergeWarnings(self, caught_warnings)
Merge a list of warnings into a single string with a blank line between each warning.
 
runEditedInput(self, jag_input)
Run a job using the JaguarInput file created in the Edit dialog.
str
_loadStrucFromMmJag(self, jag_input, name)
Load the structure file from the specified JaguarInput object

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

read(self, allowed_options=None)

 

Read in the user-specified Jaguar input file and apply it's settings to the panel.

Parameters:
  • allowed_options (list) - list of allowed options for the Read dialog. Items of the list should be keys in the schrodinger.jaguar.gui.filedialog.ReadFileDialog.OPTION_TEXT dictionary.
Decorators:
  • @af2.appmethods.read("Read...", "Read in geometry and settings files")

editInput(self)

 

Display the edit dialog

Decorators:
  • @af2.appmethods.custom_menu_item("Edit...", tooltip= "Edit the input files")
  • @gui_utils.catch_jag_errors

_getIncludedEntryId(self)

 

If the input selector is set on Included Entry, get the entry ID for the entry in the workspace (if any) so the workspace can be restored later if necessary. Otherwise, return None. Note that this function will only be called when exactly one entry is selected.

Returns: str or NoneType
The entry ID for the included entry, or None.

jagInputEdited(self, jag_input, new_struc_flag)

 

Process the Jaguar settings that the user entered in the Edit dialog.

Parameters:
  • jag_input (schrodinger.application.jaguar.input.JaguarInput) - The Jaguar settings from the Edit dialog
  • new_struc_flag (int) - A flag indicating whether the structure in jag_input object should be loaded into the workspace. The flag must be one of:
    • EditDialog.SAME_STRUCTURE: The workspace was not changed by the Edit dialog and does not need to be changed.
    • NEW_STRUCTURE: The structure in jag_input is new and should be loaded into the workspace.
    • RELOAD_STRUCTURE: The structure in jag_input is not new, but the Edit dialog changed the workspace, so the workspace should be restored to its previous state.

restorePreviouslyIncludedEntry(self)

 

Restore the workspace to it's previous state if the Edit dialog didn't change the structure but did clear the workspace via a Preview.

Returns: tuple
A tuple of
  • The entry id of the previously included entry, or None if there wasn't one
  • The title of the previously included entry, or None if there wasn't one

_getPreviousEidAndTitle(self)

 

Get the entry ID and title of the structure that was in the workspace when the Edit dialog was opened.

Returns: tuple
A tuple of
  • The entry id of the previously included entry, or None if there wasn't one
  • The title of the previously included entry, or None if there wasn't one

_catchLoadSettingsWarnings(self, jag_input, eid, title)

 

Load the specified settings and capture any warnings that are raised.

See BaseJaguarPanel._loadSettings for argument documentation.

Returns: list
A list of warnings raised by the tabs while the specified settings are loaded.

_loadSettingsWithEditDialogWarnings(self, jag_input, eid, title)

 

Load the specified settings. If any warnings are raised, they will be presented to the user in a message box. This message box will offer the option to return to the Edit dialog.

See BaseJaguarPanel._loadSettings for argument documentation.

Returns: bool
True if the Edit dialog should be closed. False if the user wishes to return to the Edit dialog.

_loadSettingsWithReadWarnings(self, jag_input, eid, title)

 

Load the specified settings. If any warnings are raised, they will be presented to the user in a message box. This message box will offer the option to launch the "Jaguar - Run Input Files" panel.

See BaseJaguarPanel._loadSettings for argument documentation.

_launchReadInputFilesPanel(self)

 

If inside of Maestro, launch the "Jaguar - Read Input Files" panel. If outside of Maestro, inform the user that the "Jaguar - Read Input Files" is unavailable and that input files may be launched via the command line.

_mergeWarnings(self, caught_warnings)

 

Merge a list of warnings into a single string with a blank line between each warning.

Parameters:
Returns:
A tuple of
  • A single string containing all warnings
  • A string of "this value" if there was one warning or "these values" if there was more than one warning

runEditedInput(self, jag_input)

 

Run a job using the JaguarInput file created in the Edit dialog.

Parameters:

_loadStrucFromMmJag(self, jag_input, name)

 

Load the structure file from the specified JaguarInput object

Parameters:
  • jag_input (schrodinger.application.jaguar.input.JaguarInput) - The JaguarInput object to get the file from
  • name (str) - The name we should give to the new Project Table entry. This name will also be used for the structure title if no structure title is set.
Returns: str
The entry ID of the loaded structure