schrodinger.trajectory.trajectory_gui_dir.trajectory_messages module¶
- class schrodinger.trajectory.trajectory_gui_dir.trajectory_messages.MessageButton(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
enum.Enum
Enums for message buttons
- REMOVE = (1,)¶
- RESET = (2,)¶
- CANCEL = 3¶
- schrodinger.trajectory.trajectory_gui_dir.trajectory_messages.show_snapshot_atom_limit_warning(num_frames: int, num_atoms: int, parent=None) bool ¶
Shows a snapshot atom limit warning message
- Parameters
num_frames (integer) – number of frames
num_atoms (integer) – number of atoms
parent (QtWidgets.QWidget) – Parent widget of the dialog
- Returns
Whether the Ok button was pressed
- Return type
bool
- schrodinger.trajectory.trajectory_gui_dir.trajectory_messages.show_invalid_structure_dlg(parent=None)¶
Shows message for ‘Invalid Structure Found’
- Parameters
parent (QtWidgets.QWidget) – Parent widget of the dialog
- Returns
Button pressed by user
- Return type
MessageButton.RESET or MessageButton.CANCEL
- schrodinger.trajectory.trajectory_gui_dir.trajectory_messages.show_invalid_trajectory_file_dlg(trj_path, parent=None)¶
Shows message for ‘Invalid Trajectory File’
- Parameters
trj_path (str) – Trajectory path that has issue.
parent (QtWidgets.QWidget) – Parent widget of the dialog
- Returns
Button pressed by user
- Return type
MessageButton.REMOVE or MessageButton.CANCEL
- schrodinger.trajectory.trajectory_gui_dir.trajectory_messages.trajectory_not_loaded_dlg(parent=None)¶
Shows question message for trajectory not loaded
- Returns
Whether the Ok button was pressed
- Return type
bool
- schrodinger.trajectory.trajectory_gui_dir.trajectory_messages.trajectory_not_found_dlg(parent=None)¶
Shows warning message for trajectory not found
- Returns
Whether the Ok button was pressed
- Return type
bool
- class schrodinger.trajectory.trajectory_gui_dir.trajectory_messages.SaveDefinitionsDialog(*args, **kwargs)¶
Bases:
schrodinger.ui.qt.filedialog.FileDialog
Save file dialog for .st2 files. Has an additional combo box at the bottom for saving a specific trajectory definition.
- __init__(*args, **kwargs)¶
- Parameters
parent (qwidget) – the widget over which this dialog should be shown. If not given, the Dialog will be placed by PyQt.
caption (str) – the name that appears in the titlebar of this dialog. If not given the title will be the default PyQt caption.
directory (str) – the initial directory displayed in this dialog, default is the current directory.
filter (str) – the list of filters that can be applied to this directory the format is
"Filetype1 (*.ex1);;Filetype2 (*.ex2 *.ex3)"
. Default is all files.custom_sidebar (bool) – True if the Schrodinger sidebar should be used, False if the default PyQt sidebar should be used.
sidebar_links (dict) – Use to create extra links in the left-hand sidebar of the dialog. the keys of the dictionary are a unique identifier for each link (note that ‘home’ and ‘working’ are already used), and the values are tuples of the form (path, name) where path and name are str, path indicates the path the sidebar link points to, and name is the name displayed for the link.
- resetDefinitions()¶
- setDefinitions(new_definitions)¶
Sets the available definitions for the save dialog to use
- Parameters
new_definitions (dict) – New dictionary of defintions
- getSaveFileAndDefinition()¶
Gets a filepath and definition for the st2 file
- Returns
tuple of (filepath, definition) for that file