schrodinger.trajectory.trajectory_gui_dir.playback_settings module

class schrodinger.trajectory.trajectory_gui_dir.playback_settings.Tab(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: enum.Enum

Enums for Playback Setting tabs

BASIC = 0
VIEWPOSITION = 1
ADVANCED = 2
class schrodinger.trajectory.trajectory_gui_dir.playback_settings.FrameIntValidator(minimum, maximum, parent, default)

Bases: PyQt6.QtGui.QIntValidator

Frame integer validator to fixup invalid input.

__init__(minimum, maximum, parent, default)
Parameters

default (int) – Default value to be set when invalid value is encountered.

See PyQt documentation for other argument documentation.

fixup(text)

If the frame integer input is not acceptable (e.g. empty value), then replace it with default value.

See PyQt documentation for argument documentation.

class schrodinger.trajectory.trajectory_gui_dir.playback_settings.PlaybackSettings(matsci_profile=False, parent=None)

Bases: PyQt6.QtWidgets.QWidget

Playback settings class for trajectory viewer

Variables
  • closed (QtCore.pyqtSignal) – A signal emitted when the PlaybackSettings is closed/hidden.

  • frameDurationChanged (QtCore.pyqtSignal) – A signal emitted when frame duration changes. - Changed ‘Speed’ value

  • stepChanged (QtCore.pyqtSignal) – A signal emitted when ‘Step’ changes. - Changed ‘Step’ value

  • smoothingChanged (QtCore.pyqtSignal) – A signal emitted when ‘Smoothing’ changes. - Changed ‘Smoothing’ value

  • playDirectionChanged (QtCore.pyqtSignal) – A signal emitted when ‘Play Direction’ changes. - Changed ‘Play Direction’ value

  • playDirectionChanged – A signal emitted when ‘Play Direction’ changes. - Changed ‘Play Direction’ value

  • loopChanged (QtCore.pyqtSignal) – A signal emitted when ‘Loop’ changes. - Changed ‘Loop’ value

  • beyondBindingSiteChanged (QtCore.pyqtSignal) – A signal emitted when ‘Hide atoms’ ‘Beyond Binding Site’ changes. - Changed ‘Beyond Binding Site’ value

  • solventsOnlyChanged (QtCore.pyqtSignal) – A signal emitted when ‘Hide atoms’ ‘Solvents Only’ changes. - Changed ‘Solvents Only’ value

  • nonpolarHydrogensChanged (QtCore.pyqtSignal) – A signal emitted when ‘Hide atoms’ ‘Nonpolar Hydrogens’ changes. - Changed ‘Nonpolar Hydrogens’ value

  • proteinOnlyChanged (QtCore.pyqtSignal) – A signal emitted when ‘Hide atoms’ ‘Protein Only’ changes. - Changed ‘Protein Only’ value

  • viewPositioningChanged (QtCore.pyqtSignal) – A signal emitted when ‘View Position’ settings change.

  • translateToFirstUnitCellChanged (QtCore.pyqtSignal) – A signal emitted when ‘Translate to first unit cell’ setting changes.

  • allSettingsChanged (QtCore.pyqtSignal) – A signal emitted when settings are reset.

  • aboutToShowAdvancedSettings() – A signal emitted before showing AdvancedSettings dialog.

  • advancedSettingsDismissed() – A signal emitted after dismissing AdvancedSettings dialog.

  • advancedSettingsChanged() – A signal emitted when advanced settings are changed.

closed

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.

frameDurationChanged

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.

stepChanged

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.

smoothingChanged

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.

playDirectionChanged

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.

loopChanged

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.

beyondBindingSiteChanged

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.

solventsOnlyChanged

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.

nonpolarHydrogensChanged

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.

proteinOnlyChanged

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.

translateToFirstUnitCellChanged

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.

viewPositioningChanged

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.

allSettingsChanged

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.

aboutToShowAdvancedSettings

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.

advancedSettingsDismissed

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.

advancedSettingsChanged

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.

FRAME_DURATION_STEP = 0.299
HIDE_ATOM_WIDGETS = ('hideatoms_label', 'beyond_checkbox', 'solvents_only_button', 'nonpolar_checkbox', 'protein_only_button')
__init__(matsci_profile=False, parent=None)
Parameters
  • matsci_profile (bool) – A flag indicating if it is a matsci profile. It is used to configure default setting in the playback setting data and ui.

  • parent (QWidget) – The Qt parent

setLambdaDynamics(is_lambda_dynamics_traj: bool)

Set lambda dynamics

Parameters

is_lambda_dynamics_traj – True to make display_only_checkbox disabled and unchecked. False to make it enabled

setPlaybackSettingsData(settings_data, has_pbsettings_data, fsys_atom_total=0)

Set the playback settings data to the current entry trajectory. If the entry trajectory has saved placback settings, the same will be used to show in UI. Otherwise, populate the latest values from UI and override the values in settings_data

Parameters
  • settings_data (PlaybackSettingsData Object) – Playback settings data stored in PlaybackSettings object

  • has_pbsettings_data (bool) – True if the current entry trajectory has saved playback setings data

  • fsys_atom_total (int) – Total number of atoms in the system

updateBasicDataFromUI()

Update the basic tab related data from UI

updateHideAtomsDataFromUI()

Update the hide atoms related data from UI

updateViewPositionDataFromUI()

Update the view position related data from UI

setupBasicTab()

Setup ‘Basic’ Tab e.g: tooltips, visibility, enable state, etc

setupViewPositionTab()

Setup ‘View Position’ Tab e.g: tooltips, visibility, enable state, etc

updateBasicTab()

Updates ‘Basic’ Tab with data

updateHideAtoms()

Updates ‘Hide atoms:’. In the matsci profile, ui itself is not displayed, so it is a no-op.

connectToBasicTabForUpdates()

Connect to Baisc Tab GUI components to update data and emit appropriate signals

updateViewPositionTab()

Updates ‘View Position’ Tab with data

updateTranslateToFirstUnitCellCheckBox(checked: bool)

Update Translate to first unit cell check box state.

Parameters

checked – State to be set.

updateAdjustPositionCheckBox(checked)

Udate adjust positioning check box state.

Parameters

checked (bool) – State to be set.

connectToViewPositionTabForUpdates()

Connect to View Position Tab GUI components to update data and emit appropriate signals

setRefFrameValidator()

Sets reference frame validator according to total frame

resetSettings()

Reset all the Settings

decreaseSpeed()

Decreases ‘Speed’

increaseSpeed()

Increases ‘Speed’

property speed_percentage

Calculate current speed value in terms of percentage of max frame duration.

updateSpeedIcons()

Updates enable state & tooltip of ‘-’ & ‘+’ icons according to their min & max values.

updateStep(step)

Updates ‘Step’ value

updateSmoothing(smoothing)

Updates ‘Smoothing’ value

updatePlayDirection(checked)

Updates ‘Play Direction’

updatePlayDirectionToolTip()

Updates ‘Play Direction’ tooltip based on the direction

updateLoop(button, checked)

Updates ‘Loop’

updateLoopTooltip()

Updates ‘Loop’ buttons tooltip

honorHideAtomsAsl()

Whether to honor ‘Hide atoms:’ or not.

getHideAtomsAsl()

Returns hide atom asl based on current ‘Hide atoms:’ settings

getHideAtomsBeyondBindingSiteASL()

Returns hide atoms asl based on ‘Beyond binding site’ settings

getHideAtomsNonpolarHydrogensASL()

Returns hide atoms asl based on ‘Nonpolar hydrogens’ settings

honorMatchingAtomsAsl()

Whether to honor ‘Atoms matching ASL definition:’ option

Return type

bool

getMatchingAtomsAsl()

Returns matching atom asl based on ‘Display only:’

Return type

str or None

getDisplayAtomsAsl()

Returns display atom asl based on ‘Hide atoms:’ & ‘Display only:’ settings

Return type

str or None

updateBeyondBindingSite(checked)

Updates ‘Hide atoms’ ‘Beyond Binding Site’

updateBindingSiteTooltip(checked)

Updates ‘Beyond Binding Site’ tooltip

updateSolventsOnly(checked)

Updates ‘Hide atoms’ ‘Solvents Only’

updateSolventsTooltip(checked)

Updates ‘Solvents Only’ tooltip

updateNonpolarHydrogens(checked)

Updates ‘Hide atoms’ ‘Nonpolar Hydrogens’

updateNonpolarHydrogensTooltip(checked)

Updates ‘Nonpolar Hydrogens’ tooltip

updateProteinOnly(checked)

Update ‘Hide atoms’ ‘Protein Only’

updateProteinTooltip(checked)

Updates ‘Protein Only’ tooltip

updateTranslateToFirstUnitCellPosition(checked: bool)

Update trajectory to first unit cell option and notify about view positioning change.

updateAdjustViewPositioning(checked)

Updates adjust view positioning

updateAVPOption(button, checked)

Updates below exclusive radio options in ‘View Position’ - Align on atoms from frame - Center molecules in Workspace

updateRefFrame()

Updates reference frame

updateAVPAslOption(index)

Updates ‘Align on:’/’Center on:’

updateAVPAslOptionLabel()

Updates label to ‘Align on:’, if ‘Align on atoms from frame’ is checked, otherwise to ‘Center on:’, which indicates ‘Center molecules in Workspace’ checked.

updateAVPAsl(asl)

Updates ‘Adjust view positioning’ ASL

getAVPAsl()

Return ‘Adjust view positioning’ Asl based on ‘View Position’ settings.

closeEvent(event)

Emits closed() signal. See Qt documentation for additional method documentation.

showEvent(event)

Calls positionPopup() method to place the popup above the parent. See Qt documentation for additional method documentation.

positionPopup()

Positions the ‘PlaybackSettings’ above parent in right to left direction.

tabBarClicked(index)

This method will be triggered when any tab is clicked. If the tab is ‘Advanced…’ then we hide the popup and call ‘showAdvancedSettings’ slot, otherwise store the current tab index.

resetMaxStepSize()

This will be called when slider value changes. Based on the new start and end frame settings, reset the max value for step size spin box

showAdvancedSettings()

Show ‘Advanced Playback Settings’ dialog