schrodinger.application.jaguar.gui.edit_dialog module

class schrodinger.application.jaguar.gui.edit_dialog.EditDialog(parent, jag_input=None)

Bases: PyQt6.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:

  • run_requested (PyQt5.QtCore.pyqtSignal) – A signal emitted when the user selects Run from the File menu. This signal is emitted with one argument, a schrodinger.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” mode SINGLE_STRUC

  • _preview_ran (bool) – Whether or not the user has replaced the workspace via a Preview since the dialog was created.

accepted

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

run_requested

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

restore_workspace

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

WHOLE_FILE = 0
SINGLE_STRUC = 1
RELOAD_STRUCTURE = -1
SAME_STRUCTURE = 0
NEW_STRUCTURE = 1
__init__(parent, jag_input=None)

Create the dialog and load the specified JaguarInput object, if any.

Parameters
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

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.

close()

Close the dialog without saving it’s contents. If the user has changed the workspace, the restore_workspace signal will be emitted.

preview()

Display the current structure in the workspace

help()

Launch help for this dialog

write()

Write the input file to disk

revert()

Revert the input script to its original state

convertToZMatrix()

Convert the structure currently in the text edit to internal coordinates (i.e. a Z-matrix).

convertToCartesian()

Convert the structure currently in the text edit to Coordinates coordinates

runJob()

Emit the run_requested signal with the current job settings.

viewAtomLabels(enabled)

Toggle showing atom labels.

Parameters

enabled (bool) – Whether atom labels should be turned on or off

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

class schrodinger.application.jaguar.gui.edit_dialog.PkaEditDialog(parent, jag_input=None)

Bases: schrodinger.application.jaguar.gui.edit_dialog.EditDialog

Extension of EditDialog to remove spaces from certain pka keywords in the text edit.