schrodinger.application.models.gui.tables module

schrodinger.application.models.gui.tables.get_input_violations(summary: ValidationSummary | None, composite_input: CompositeInput) list[InputViolation]

Return input violations for the bottom input config of a composite input.

Parameters:
  • summary – Validation summary to check, or None

  • composite_input – The composite input to check

Returns:

List of InputViolation objects, empty if no summary or no violations

class schrodinger.application.models.gui.tables.TableWidget(*args, spec=None, autospec=False, plp=None, view=None, **kwargs)

Bases: PLPTableWidget

initSetUp()

Creates widget from ui and stores it ui_widget.

Suggested subclass use: create and initialize subwidgets, and connect signals.

initLayOut()

Create a vertical layout for the widget (widget_layout) and populate it with two vertical sub-layouts: main_layout and bottom_layout.

If the user has specified the ui data member, insert the resultant ui_widget into main_layout.

If the widget already has a layout defined, this method will produce a warning (but not a traceback). main_layout and bottom_layout will be inserted into the existing widget layout, which will not be the same as widget_layout. It is therefore recommended that this mixin is used only with widgets that do not already have a layout.

Suggested subclass use: create, initialize, and populate layouts.

scrollToParam(param: CompoundParam) None
class schrodinger.application.models.gui.tables.DefaultRowTable(*args, spec=None, autospec=False, plp=None, view=None, **kwargs)

Bases: TableWidget

addDefaultRow() None

Add a default row to the table. This should be implemented in subclasses to define what a default row looks like.

defineDefaultRow() CompoundParam
class schrodinger.application.models.gui.tables.TableWidgetWithContextMenu(*args, spec=None, autospec=False, plp=None, view=None, **kwargs)

Bases: TableWidget

Base class for library tables with context menu support.

Subclasses should set self.menu to an appropriate menu instance and implement _showContextMenu to show the menu for a given row.

initSetUp()

Creates widget from ui and stores it ui_widget.

Suggested subclass use: create and initialize subwidgets, and connect signals.

class schrodinger.application.models.gui.tables.PLPSortFilterProxyModel

Bases: QSortFilterProxyModel

getParamFromSourceRow(source_row: int) ModelConfiguration
schrodinger.application.models.gui.tables.get_enum_name_display(member: Enum) str

Return a display representation for an enum member name.

class schrodinger.application.models.gui.tables.InputDefTableSpec(*args, _param_type=<object object>, **kwargs)

Bases: TableSpec

name_col = <schrodinger.ui.qt.mapperwidgets.plptable.FieldColumn object>
display_name_col = <schrodinger.ui.qt.mapperwidgets.plptable.FieldColumn object>
docstring_col = <schrodinger.ui.qt.mapperwidgets.plptable.FieldColumn object>
default_val_col = <schrodinger.ui.qt.mapperwidgets.plptable.FieldColumn object>
input_type_col = <schrodinger.ui.qt.mapperwidgets.plptable.FieldColumn object>
is_column_col = <schrodinger.ui.qt.mapperwidgets.plptable.FieldColumn object>
getInputTypeDisplay(input_type: InputType) str
getInputType(input_type: InputType) InputType
getInputTypeComboItems(input_type: InputType) dict[str, InputType]
getCheckState(is_checked: bool) bool
getIsColumnToolTip(is_column: bool) str
columnsChanged

A pyqtSignal emitted by instances of the class.

columnsReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.application.models.gui.tables.InputDefTableWidget(*args, **kwargs)

Bases: DefaultRowTable

__init__(*args, **kwargs)
Parameters:
  • spec (TableSpec) – Table specification. Will be ignored if autospec is True.

  • autospec (bool) – Whether to automatically generate the table specification from the PLP item fields.

  • plp (ParamListParam) – ParamListParam containing data. It is more common to set the plp using mappers.

  • view (QtWidgets.QTableView) – Custom table view instance. If None, an instance of table_helper.SampleDataTableView will be created.

defineDefaultRow() InputDef
class schrodinger.application.models.gui.tables.OutputDefTableSpec(*args, _param_type=<object object>, **kwargs)

Bases: TableSpec

name_col = <schrodinger.ui.qt.mapperwidgets.plptable.FieldColumn object>
display_name_col = <schrodinger.ui.qt.mapperwidgets.plptable.FieldColumn object>
docstring_col = <schrodinger.ui.qt.mapperwidgets.plptable.FieldColumn object>
output_type_col = <schrodinger.ui.qt.mapperwidgets.plptable.FieldColumn object>
getOutputTypeDisplay(output_type: OutputType) str
getOutputType(output_type: OutputType) OutputType
getOutputTypeComboItems(output_type: OutputType) dict[str, OutputType]
columnsChanged

A pyqtSignal emitted by instances of the class.

columnsReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.application.models.gui.tables.OutputDefTableWidget(*args, **kwargs)

Bases: DefaultRowTable

__init__(*args, **kwargs)
Parameters:
  • spec (TableSpec) – Table specification. Will be ignored if autospec is True.

  • autospec (bool) – Whether to automatically generate the table specification from the PLP item fields.

  • plp (ParamListParam) – ParamListParam containing data. It is more common to set the plp using mappers.

  • view (QtWidgets.QTableView) – Custom table view instance. If None, an instance of table_helper.SampleDataTableView will be created.

defineDefaultRow() OutputDef
class schrodinger.application.models.gui.tables.ValueMode

Bases: Enum

CUSTOM = 1
INHERITED = 2
UNSPECIFIED = 3
class schrodinger.application.models.gui.tables.CompositeInputTableSpec(*args, _param_type=<object object>, **kwargs)

Bases: TableSpec

__init__(*args, **kwargs)
setValidationSummary(summary: ValidationSummary) None
setFileNameMapping(mapping: dict[str, str]) None

Set the mapping from stored file IDs to original filenames.

Parameters:

mapping – A dictionary mapping file IDs to filenames.

name_col = <schrodinger.ui.qt.mapperwidgets.plptable.ParamColumn object>
value_col = <schrodinger.ui.qt.mapperwidgets.plptable.ParamColumn object>
value_mode_col = <schrodinger.ui.qt.mapperwidgets.plptable.ParamColumn object>
type_col = <schrodinger.ui.qt.mapperwidgets.plptable.ParamColumn object>
child_constraint_col = <schrodinger.ui.qt.mapperwidgets.plptable.ParamColumn object>
getInputName(composite_input: CompositeInput) str
getInputValueDisplay(composite_input)
getInputValueTextColor(composite_input)
getLockedTextColor(composite_input)
setInputValue(composite_input, value)
valueColFlags(all_rows, this_row)
getValueModeDisplay(composite_input: CompositeInput) str
getValueMode(composite_input: CompositeInput) ValueMode
setValueMode(composite_input: CompositeInput, value_mode: ValueMode) None
getValueModeComboItems(composite_input: CompositeInput) dict[str, ValueMode]
valueModeColFlags(all_rows, this_row)
getInputTypeDisplay(composite_input: CompositeInput) str
getChildConstraintDisplay(composite_input: CompositeInput) str
getChildConstraint(composite_input: CompositeInput) ChildConstraint
setChildConstraint(composite_input: CompositeInput, constraint: ChildConstraint) None
getChildConstraintComboItems(composite_input: CompositeInput) dict[str, ChildConstraint]
getBackgroundColor(composite_input: CompositeInput) QColor
getInvalidInputToolTip(composite_input: CompositeInput) str
getValueToolTip(composite_input: CompositeInput) str

Return a tooltip for the value column.

For file inputs, shows the full raw value (path or file ID). For other inputs, falls back to validation error messages.

childConstraintColFlags(all_rows, this_row)
columnsChanged

A pyqtSignal emitted by instances of the class.

columnsReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.application.models.gui.tables.CompositeInputProxyModel(*args, **kwargs)

Bases: PLPSortFilterProxyModel

__init__(*args, **kwargs)
setValidationSummary(summary: ValidationSummary) None
filterAcceptsRow(self, source_row: int, source_parent: QModelIndex) bool
class schrodinger.application.models.gui.tables.CompositeInputTableWidget(*args, **kwargs)

Bases: TableWidget

__init__(*args, **kwargs)
Parameters:
  • spec (TableSpec) – Table specification. Will be ignored if autospec is True.

  • autospec (bool) – Whether to automatically generate the table specification from the PLP item fields.

  • plp (ParamListParam) – ParamListParam containing data. It is more common to set the plp using mappers.

  • view (QtWidgets.QTableView) – Custom table view instance. If None, an instance of table_helper.SampleDataTableView will be created.

setFileNameMapping(mapping: dict[str, str]) None

Set the mapping from stored file IDs to original filenames.

Parameters:

mapping – A dictionary mapping file IDs to filenames.

setValidationSummary(summary: ValidationSummary) None

Set the validation summary for displaying error states.

class schrodinger.application.models.gui.tables.DefinitionsTableSpec(*args, _param_type=<object object>, **kwargs)

Bases: TableSpec

name_col = <schrodinger.ui.qt.mapperwidgets.plptable.FieldColumn object>
columnsChanged

A pyqtSignal emitted by instances of the class.

columnsReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.application.models.gui.tables.DefinitionsTableWidget(*args, **kwargs)

Bases: TableWidgetWithContextMenu

viewConfigurationsClicked

A pyqtSignal emitted by instances of the class.

copyDefinitionClicked

A pyqtSignal emitted by instances of the class.

editDefinitionClicked

A pyqtSignal emitted by instances of the class.

deleteDefinitionClicked

A pyqtSignal emitted by instances of the class.

__init__(*args, **kwargs)
Parameters:
  • spec (TableSpec) – Table specification. Will be ignored if autospec is True.

  • autospec (bool) – Whether to automatically generate the table specification from the PLP item fields.

  • plp (ParamListParam) – ParamListParam containing data. It is more common to set the plp using mappers.

  • view (QtWidgets.QTableView) – Custom table view instance. If None, an instance of table_helper.SampleDataTableView will be created.

setReceiptsVisible(visible: bool) None

Show or hide receipt-related actions in the context menu.

Parameters:

visible – Whether receipt actions should be visible

setFilterString(filter_str: str) None
schrodinger.application.models.gui.tables.get_timedelta_display(delta: timedelta) str
class schrodinger.application.models.gui.tables.ExecutionRecordsTableSpec(*args, _param_type=<object object>, **kwargs)

Bases: TableSpec

config_name_col = <schrodinger.ui.qt.mapperwidgets.plptable.ParamColumn object>
start_time_col = <schrodinger.ui.qt.mapperwidgets.plptable.FieldColumn object>
runtime_col = <schrodinger.ui.qt.mapperwidgets.plptable.ParamColumn object>
user_col = <schrodinger.ui.qt.mapperwidgets.plptable.FieldColumn object>
getConfigurationName(record: ExecutionRecord) str
getDateTimeDisplay(dt: datetime) str
getRuntimeDisplay(record: ExecutionRecord) str
setConfigurationIdsToNames(config_ids_to_names: dict[str, str]) None
columnsChanged

A pyqtSignal emitted by instances of the class.

columnsReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.application.models.gui.tables.ExecutionRecordsProxyModel(*args, **kwargs)

Bases: PLPSortFilterProxyModel

__init__(*args, **kwargs)
setConfigurationIds(config_ids: list[str]) None
filterAcceptsRow(self, source_row: int, source_parent: QModelIndex) bool
showAllReceipts()
class schrodinger.application.models.gui.tables.ExecutionRecordsTableWidget(*args, **kwargs)

Bases: TableWidgetWithContextMenu

viewReceiptClicked

A pyqtSignal emitted by instances of the class.

reRunModelClicked

A pyqtSignal emitted by instances of the class.

__init__(*args, **kwargs)
Parameters:
  • spec (TableSpec) – Table specification. Will be ignored if autospec is True.

  • autospec (bool) – Whether to automatically generate the table specification from the PLP item fields.

  • plp (ParamListParam) – ParamListParam containing data. It is more common to set the plp using mappers.

  • view (QtWidgets.QTableView) – Custom table view instance. If None, an instance of table_helper.SampleDataTableView will be created.

setConfigurationIdsToNames(config_ids_to_names: dict[str, str]) None
setConfigurationIds(configuration_ids: list[str]) None
showAllReceipts()