schrodinger.application.jaguar.gui.edit_dialog module¶
-
class
schrodinger.application.jaguar.gui.edit_dialog.
EditDialog
(parent, jag_input=None)¶ Bases:
PyQt5.QtWidgets.QMainWindow
A dialog that allows JaguarInput objects to be directly edited.
Variables: - accepted (
PyQt5.QtCore.pyqtSignal
) –A signal emitted when the user clicks OK. It is emitted with two arguments:
- A
schrodinger.application.jaguar.input.JaguarInput
object representing the current dialog contents. - An integer flag indicating whether the structure in the
schrodinger.application.jaguar.input.JaguarInput
object is new. The flag is one of: SAME_STRUCTURE
: If neither the structure nor the workspace contents have changedNEW_STRUCTURE
: If the structure has changed.RELOAD_STRUCTURE
: If the structure has not changed, but the workspace contents have been changed via a preview. In these cases, the workspace contents should be reset.
- A
- run_requested (
PyQt5.QtCore.pyqtSignal
) – A signal emitted when the user selects Run from the File menu. This signal is emitted with one argument, aschrodinger.application.jaguar.input.JaguarInput
object to run. Actually running the job is the responsibility of the parent widget. - restore_workspace (
PyQt5.QtCore.pyqtSignal
) – A signal emitted when the user clicks Cancel after modifying the workspace via a preview. The parent widget is responsible for setting the workspace back to its previous state. - _orig_text (str) – The text to revert back to if the user clicks Revert
- _full_text (str) – The full text of the input file being edited. Note that
this variable is not kept fully up to date. The full text should always be
retrieved via
_getFullText
. - _orig_struc (
schrodinger.structure.Structure
) – The structure that was originally read into the dialog. Used to determine if the user has changed the structure. - _cur_mode (int) – Whether the dialog is in “Input File” mode (
WHOLE_FILE
) or “Structure” modeSINGLE_STRUC
- _preview_ran (bool) – Whether or not the user has replaced the workspace via a Preview since the dialog was created.
-
NEW_STRUCTURE
= 1¶
-
RELOAD_STRUCTURE
= -1¶
-
SAME_STRUCTURE
= 0¶
-
SINGLE_STRUC
= 1¶
-
WHOLE_FILE
= 0¶
-
accept
()¶ Accept the edits and update the Jaguar panel.
Note: This function must not close this dialog, since we have to wait on the Jaguar panel to validate the emitted schrodinger.application.jaguar.input.JaguarInput
object first. If the object passes validation, it is the responsibility of the Jaguar panel to close this dialog.Note: This function doesn’t run a preflight check before emiting the schrodinger.application.jaguar.input.JaguarInput
object, since the user may still change options before running the job.
-
accepted
¶
-
close
()¶ Close the dialog without saving it’s contents. If the user has changed the workspace, the restore_workspace signal will be emitted.
-
convertToCartesian
()¶ Convert the structure currently in the text edit to Coordinates coordinates
-
convertToZMatrix
()¶ Convert the structure currently in the text edit to internal coordinates (i.e. a Z-matrix).
-
error
(msg)¶ Display the specified error. This function is required for the
schrodinger.application.jaguar.gui.utils.catch_jag_errors
decorator.Parameters: msg (str) – The error to display
-
help
()¶ Launch help for this dialog
-
loadMmJag
(jag_input)¶ Load the specified JaguarInput object.
Parameters: jag_input ( schrodinger.application.jaguar.input.JaguarInput
) – The JaguarInput object to edit.
-
modeChanged
()¶ Respond to the user switching between “Input file” and “Structure” via the radio buttons
-
preview
()¶ Display the current structure in the workspace
-
restore_workspace
¶
-
revert
()¶ Revert the input script to its original state
-
runJob
()¶ Emit the run_requested signal with the current job settings.
-
run_requested
¶
-
viewAtomLabels
(enabled)¶ Toggle showing atom labels.
Parameters: enabled (bool) – Whether atom labels should be turned on or off
-
write
()¶ Write the input file to disk
- accepted (