schrodinger.application.livedesign.panel_components module

class schrodinger.application.livedesign.panel_components.LRSort(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: enum.Enum

Owner = 1
Folder = 2
class schrodinger.application.livedesign.panel_components.StatusBarDialog

Bases: PyQt6.QtWidgets.QDialog

Helper class to setup the status bar for the panel. This class acts as the parent to avoid thread issues.

class schrodinger.application.livedesign.panel_components.LRSortCombo(parent=None)

Bases: PyQt6.QtWidgets.QComboBox

Combo box used to specify the method used to sort and organize live reports. Emits a custom signal with an enum designating the sort method.

Variables

LRSortMethodChanged (QtCore.pyqtSignal) – signal indicating that a new live report sort method has been chosen; emitted with an LRSort value

LRSortMethodChanged

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.

__init__(parent=None)
onCurrentIndexChanged()

When the user makes a selection in this combo box, emit the enum value associated with their selection (rather than the less-useful index of the selection).

class schrodinger.application.livedesign.panel_components.BaseSearchTreeWidgetHelper

Bases: object

Base class for a widget subclass to hold a search box QLineEdit and a QTreeView below. This is a helper class only and should be sub-classed. This class should NOT be used directly.

setUpWidgets(model, view)

Sets up the search box, model, view, and search proxy.

Parameters
  • model (QtGui.QStandardItemModel) – model for the tree

  • view (QtWidgets.QTreeView) – view for the model

setUpLayout()

Sets up the layout, but needs to be added to the widget by the subclass.

searchTextChanged(search_text)

Set the search term to the sort filter proxy model to show only the matching tree items. Any filtered in items will be expanded to show all children. Otherwise, all the items will be collapsed.

Parameters

search_text (str) – search terms to apply to proxy model.

resetWidgets()
class schrodinger.application.livedesign.panel_components.CascadingCheckboxItem(*args, **kwargs)

Bases: PyQt6.QtGui.QStandardItem

A subclass of QStandardItem that implements checkboxes that automatically respond to changes in child/parent check state. Checking or unchecking an item will cause all of its children to become checked/unchecked accordingly and will update its parent to be either checked, unchecked, or partially checked, depending on the state of all of the other children.

__init__(*args, **kwargs)
getChildItems(column=0)

Returns a list of all the child items. A column may be optionally specified if desired, otherwise the first column’s item will be returned from each descendent row.

Parameters

column (int) – the column of the item to be returned from each row

updateCheckState()

Updates the item’s check state depending on the check state of all the child items. If all the child items are checked or unchecked, this item will be checked/unchecked accordingly. If only some of the children are checked, this item will be partially checked.

updateEnabled()

If this item has children and they are all disabled, disable this item. If any such children are enabled, enable this item.

setData(value, role)

Overrides setData() to trigger an update of the parent item’s check state and enabled state, and propagate check state to all the child items (i.e. checking this item will cause all its child items to become checked).

See parent class for documentation on parameters.

setEnabled(self, enabled: bool)
class schrodinger.application.livedesign.panel_components.LDDataCheckboxItem(ld_data)

Bases: schrodinger.application.livedesign.panel_components.CascadingCheckboxItem

A CascadingCheckboxItem that stores and knows how to display a data_classes.LDData instance.

__init__(ld_data)
Parameters

ld_data (data_classes.LDData) – LD data instance

property ld_data
class schrodinger.application.livedesign.panel_components.LDDataSelectionModel(*args, **kwargs)

Bases: PyQt6.QtGui.QStandardItemModel

A tree structured model for storing LD data by family name.

Variables

item_dict (dict(data_classes.LDData, QtGui.QStandardItem)) – a dictionary mapping LD data to items from this model

__init__(*args, **kwargs)
clear(self)
loadData(ld_data_list)

Replaces the data in the model with the specified list of export data.

Parameters

ld_data_list (list(data_classes.LDData)) – a list of LD data to export

getCheckedData()

Recursively traverses the entire tree and returns LD data instances checked by the user.

Returns

LD data specified for export by the user

Return type

list(data_classes.LDData)

setItemsChecked(ld_data_list, checked)

Set the checkstate of the items associated with the supplied data, if they are enabled.

Parameters
  • ld_data_list (List[data_classes.LDData]) – a list of LDData instances corresponding to items in the model

  • checked (bool) – whether to check or uncheck the specified item

uncheckAll()

Un-check all items in tree.

setItemEnabled(ld_data, enable)

Set an item to be enabled or disabled.

Parameters
  • ld_data (data_classes.LDData) – data object associated with the item to be enabled or disabled

  • enable (bool) – whether to enable (True) or disable (False) the specified item

getItemTooltip(ld_data)

Return the tooltip of the item associated with the supplied LD data object.

Parameters

ld_data (data_classes.LDData) – a LiveDesign data object

Returns

tooltip text, if the specified item can be found; otherwise, None

Return type

str or NoneType

setItemTooltip(ld_data, tooltip)

Apply a tooltip to an item.

Parameters
  • ld_data (data_classes.LDData) – data object associated with the item to set the tooltip on

  • tooltip (str) – tooltip text

class schrodinger.application.livedesign.panel_components.LDDataSelectionTreeView

Bases: PyQt6.QtWidgets.QTreeView

A class for displaying LD data selection.

__init__()
class schrodinger.application.livedesign.panel_components.LDDataTreePopUp(*args, **kwargs)

Bases: schrodinger.models.mappers.TargetMixin, schrodinger.ui.qt.widgetmixins.basicmixins.InitMixin, schrodinger.application.livedesign.panel_components.BaseSearchTreeWidgetHelper, schrodinger.ui.qt.pop_up_widgets.PopUp

A popup with initialization mixin to group together a search bar LineEdit and the LD Data Selection QTreeView. Popup can be used as a target to map to a param for getting/setting checked LD data.

initSetUp()

Sets up the model, view, proxy and search box.

See BaseSearchTreeWidgetHelper.setUpWidgets for more info.

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.

setup()

Subclass-specific initialization. Subclasses can re-implement this function with custom set up code.

targetGetValue()
targetSetValue(value)
loadData(ld_data_list)

See LDDataSelectionModel.loadData() for more information.

getCheckedData()

See LDDataSelectionModel.getCheckedData() for more information.

getCheckedDataCount()
Return type

int

Returns

the count of checked LD data properties.

setCheckedData(ld_data_list)

Check the items corresponding to the supplied LD data (if found), and uncheck all other items.

Parameters

ld_data_list (list(data_classes.LDData)) – a list of LD data instances that should be checked in the tree

setItemChecked(ld_data, checked)

Convenience method to check or uncheck a single item.

Parameters
  • ld_data (data_classes.LDData) – a LD data object corresponding to an item in the model

  • checked (bool) – whether to check or uncheck the specified item

setItemsChecked(ld_data_list, checked)

Set the checkstate of the items associated with the supplied data, if they are enabled.

Parameters
  • ld_data_list (List[data_classes.LDData]) – a list of LDData instances corresponding to items in the model

  • checked (bool) – whether to check or uncheck the specified items

isItemChecked(ld_data)

Return whether the item associated with the specified LiveDesign data object is checked.

Parameters

ld_data (data_classes.LDData) – a LDData instance corresponding to an item in the model

Returns

whether the specified item is checked, if possible; if the item cannot be found, return None

Return type

bool or NoneType

isItemEnabled(ld_data)

Return whether the specified item is enabled.

Parameters

ld_data (data_classes.LDData) – a LDData instance corresponding to an item in the model

Returns

if possible, whether the specified item is enabled; if no such item exists, return None

Return type

bool or NoneType

uncheckAll()

See LDDataSelectionModel.uncheckAll() for more information.

initSetDefaults()

Set widget to its default state. If the widget uses a model/mapper, it’s preferable to reset the widget state by resetting the model.

setItemsEnabled(ld_data_list, enabled)

Enable or disable the items associated with the specified data list.

Parameters
  • ld_data_list (list(data_classes.LDData)) – a list of LD Data objects that correspond to items that should be enabled or disabled

  • enabled (bool) – enable (True) or disable (False) specified items

getItemTooltip(ld_data)

Get the tooltip for the item associated with the specified LD data.

Parameters

ld_data (data_classes.LDData) – a LD data object

Returns

the tooltip text of the item associated with the supplied LD data object, if possible. If there is no item associated with the LD data object, return None

Return type

str or NoneType

setItemsTooltip(ld_data_list, tooltip)

Set tooltip for items associated with the specified data list.

Parameters
  • ld_data_list (list(data_classes.LDData)) – a list of LD Data objects that correspond to items to set the tooltip on

  • tooltip (str) – the tooltip text

expandFamily(family_name)

Expand the item associated with the supplied family name if possible.

Parameters

family_name (str) – the family name of the item to expand

class schrodinger.application.livedesign.panel_components.LDDataTreePopUpButton(parent)

Bases: schrodinger.ui.qt.pop_up_widgets.LinkButtonWithPopUp

Link button with LDDataTreePopUp class pop up. Button text shows the count of the selected items in the pop up as “<count> selected”.

Usage:

btn = LDDataTreePopUpButton(self)
pop_up = btn.getLDDataTreePopUp()
pop_up.loadData(ld_data_list)
__init__(parent)
Parameters

parent (PyQt5.QtWidgets.QWidget) – The Qt parent widget

getLDDataTreePopUp() Optional[schrodinger.application.livedesign.panel_components.LDDataTreePopUp]
setPopUp(pop_up)

Set the pop up widget to the specified pop up widget instance.

class schrodinger.application.livedesign.panel_components.ColumnSelectionModel(*args, **kwargs)

Bases: PyQt6.QtGui.QStandardItemModel

A tree structured model for storing data by family.

__init__(*args, **kwargs)
loadData(columns, unavailable_ids=None)

Populates the model using a list of ldclient.models.Column objects. This clears out all previous data in the model.

Parameters
  • columns (list of ldclient.models.Column) – the list of columns to add

  • unavailable_ids (list of str, or None) – list of column IDs that should always be unavailable for import

getCheckedColumns(all_checked: bool = False)

Traverse all the columns and return all the checked properties.

Parameters

all_checked – if the all columns checked property is enabled

Returns

the checked properties

Return type

list of structure.PropertyName

getVisibleColCount() int

Calculate the total amount of columns that are visible.

getHiddenColCount()

Calculate the total amount of unsupported columns.

class schrodinger.application.livedesign.panel_components.ColumnSelectionProxyModel(parent=None)

Bases: PyQt6.QtCore.QSortFilterProxyModel

A proxy model to filter an assay model based on the availability

__init__(parent=None)
filterAcceptsRow(source_row, source_parent)

See Qt Documentation for more information on parameters.

This filter accepts a particular row if any of the following are true: 1. The proxy model is currently set to show unavailable items 2. The item is marked as available

Note that the conditions specified above are searched in that order.

showUnavailable(show=True)
class schrodinger.application.livedesign.panel_components.StructSelectionModel

Bases: PyQt6.QtGui.QStandardItemModel

A selection model for storing structure titles to be selected.

loadData(sts_info: List[StructureInfo])

Populate the model using a list of StructureInfo objects. This clears all previous data in the model.

Parameters

sts_info – the list of structure info to add

getStsInfo(only_checked: bool = False) List[StructureInfo]

Return a list of all enabled structure’s info if only_checked is False, else only the checked structure’s info.

Parameters

only_checked – if only the checked structure’s info should be returned.

Returns

a list of structure’s info

class schrodinger.application.livedesign.panel_components.ColumnCheckboxItem(col, force_unavailable=False)

Bases: PyQt6.QtGui.QStandardItem

A CascadingCheckboxItem that stores and knows how to display a Column object.

UNAVAIL_VALUE_TYPES = ['attachment']
__init__(col, force_unavailable=False)
Parameters
  • col (ldclient.models.Column) – the object describing a live report column.

  • force_unavailable (bool) – if True, make this column unavailable for import by disabling it in the list view

column(self) int
class schrodinger.application.livedesign.panel_components.SelectionListView

Bases: PyQt6.QtWidgets.QListView

A class for displaying a column selection

__init__()
class schrodinger.application.livedesign.panel_components.ExportTableColumns(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: enum.TableColumns

Data = Column 0 (Maestro Property)
Assay = Column 1 (LiveDesign Column)
Endpoint = Column 2 (LiveDesign Property)
Units = Column 3 (Units)
Decimal = Column 4 (Decimal Places)
Options = Column 5 (Options)
class schrodinger.application.livedesign.panel_components.ExportRow(ld_data=None, assay=None, endpoint=None, units=None, decimal=None, option=None, assay_folder_path=None)

Bases: schrodinger.models.json.JsonableClassMixin

An object for data in each row in the table.

__init__(ld_data=None, assay=None, endpoint=None, units=None, decimal=None, option=None, assay_folder_path=None)
toJsonImplementation()

Abstract method that must be defined by all derived classes. Converts an instance of the derived class into a jsonifiable object.

Returns

A dict made up of JSON native datatypes or Jsonable objects. See the link below for a table of such types. https://docs.python.org/2/library/json.html#encoders-and-decoders

classmethod fromJsonImplementation(json_dict)

Abstract method that must be defined by all derived classes. Takes in a dictionary and constructs an instance of the derived class.

Parameters

json_dict (dict) – A dictionary loaded from a JSON string or file.

Returns

An instance of the derived class.

Return type

cls

class schrodinger.application.livedesign.panel_components.ExportTableModel(*args, **kwargs)

Bases: schrodinger.models.json.JsonableClassMixin, schrodinger.ui.qt.table_helper.RowBasedTableModel

Model for the export table.

Note

Model saves the module and class information when serializing to JSON. It then uses this information to deserialize the JSON back into the correct instance of the class.

Column

alias of schrodinger.application.livedesign.panel_components.ExportTableColumns

ROW_CLASS

alias of schrodinger.application.livedesign.panel_components.ExportRow

__init__(*args, **kwargs)
set3DDataSpecMap(spec_map)
setFFCDataSpecMap(spec_map)
property disable_lr_columns
Returns

whether to disable certain live report-dependent export columns

Return type

bool

getLRDependentColumns()

Return a list of columns that should be disabled if a live report is not selected in the panel.

Returns

a list of columns that depend on the live report selection

Return type

list of table_helper.TableColumns enum values

reset()

Remove all data from the model

loadData(ld_data_list)

Load in the data values to be shown as rows with default information for Assays and Endpoints. Note, this method resets the table.

Parameters

ld_data_list (list(data_classes.LDData)) – list of data values

setNonExportableData(non_exportable_data: List[schrodinger.application.livedesign.data_classes.LDData])
Parameters

non_exportable_data – LD data that cannot be exported.

loadMappings(map_rows)

Load in the mapping data. The properties in the mapping data are assumed to already exist in the table. Note, that this method does not reset the table.

Parameters

map_rows (List of ExportRow) – mapped row data to set

Returns

whether the loading of the mapping data was successful

Return type

bool

getMappableRows()

Get rows that can be saved to a mapping state.

Returns

mapped row data

Return type

List of ExportRow

loadAssayData(assay_paths, favorite_assay_paths)

Load in the complete Assay data - full path name - wrapped as BaseLDTreeItemWrapper

Parameters
  • assay_paths (List of paths) – Assay data to store.

  • favorite_assay_paths (List of (assay names, folder path) tuples) – Favorite Assay data to store.

loadEndpointData(endpoint_map)

Set the assay path to endpoint dictionary.

Parameters

endpoint_map (dict(str, set(str))) – a dictionary that maps assay folder paths to endpoints

flags(index)

See Qt documentation for an method documentation. Overriding table_helper.RowBasedTableModel.

getPropertyExportSpecMap()

Return a dictionary mapping LDData to corresponding property export specs. Exclude any data that is not exportable.

Property export specs are export specs that represent data meant to be stored as structure properties for export to LiveDesign.

Returns

a dictionary mapping an LDData instance to the corresponding export spec for property rows in this table

Return type

dict[data_classes.LDData, export_models.PropertyExportSpec]

get3DExportSpecMap()

Return dictionary mapping LDData to corresponding 3D export specs in this table. Exclude any data that is not exportable.

Returns

a dictionary mapping an LDData instance to the corresponding export spec for 3D data rows in this table

Return type

dict[data_classes.LDData, export_models.Base3DExportSpec]

getFFCExportSpecMap()

Return dictionary mapping LDData to corresponding freeform column export specs in this table. Exclude any data that is not exportable.

Returns

a dictionary mapping an LDData instance to the corresponding export spec for FFC data rows in this table

Return type

dict[data_classes.LDData, export_models.Base3DExportSpec]

getExportSpecMap(rows=None)

Return a list of specs corresponding to the supplied list of rows. Exclude any data that is not exportable.

Parameters

rows (list[ExportRow] or NoneType) – optionally, a list of rows to include in the map; all rows are used by default

Returns

a dictionary mapping LDData to corresponding export specs for each of rows

Return type

dict[data_classes.LDData, export_models.DataExportSpec]

isCustomMaestroAssay(assay_index)

Checks if the given assay index is a custom Maestro assay, which is the initial custom assay of ‘Maestro’ selected for Maestro properties, along with the endpoint.

Parameters

assay_index (QtCore.QModelIndex) – the index of the assay cell

Returns

whether the assay holds the initial ‘Maestro’ assay set for maestro properties.

Return type

bool

toJsonImplementation()

Abstract method that must be defined by all derived classes. Converts an instance of the derived class into a jsonifiable object.

Returns

A dict made up of JSON native datatypes or Jsonable objects. See the link below for a table of such types. https://docs.python.org/2/library/json.html#encoders-and-decoders

classmethod fromJsonImplementation(json_obj)

Abstract method that must be defined by all derived classes. Takes in a dictionary and constructs an instance of the derived class.

Parameters

json_dict (dict) – A dictionary loaded from a JSON string or file.

Returns

An instance of the derived class.

Return type

cls

class schrodinger.application.livedesign.panel_components.ExportTableDataColumnDelegate

Bases: PyQt6.QtWidgets.QStyledItemDelegate

Delegate for ExportTableColumn.Data column which draws Qt.DisplayRole text aligned to the left and Qt.DecorationRole icon aligned to the right.

paint(self, painter: QPainter, option: QStyleOptionViewItem, index: QModelIndex)
class schrodinger.application.livedesign.panel_components.ExportTableView(*args, **kwargs)

Bases: PyQt6.QtWidgets.QTableView

The table view showing all the Properties and Assay / Endpoints. Assay and Endpoint columns are set with different PopUp Delegates to show when the respective column cells are edited.

__init__(*args, **kwargs)
setModel(self, model: QAbstractItemModel)
property Column
onCommitDataToSelected(editor, index, delegate)

Called when “Apply to Selected Rows” is clicked in Assay or Endpoint popup.

See parent class for args documentations.

setExtraColumnsVisible(visible)

Show or hide units and decimal places columns from table.

Parameters

hide (bool) – whether to show or hide columns.

class schrodinger.application.livedesign.panel_components.PathTreeDict(paths=None)

Bases: collections.defaultdict

__init__(paths=None)
addPath(path)
findPath(path)
schrodinger.application.livedesign.panel_components.make_ld_item_tree(ld_items)

Makes LD folder/assay(model) tree.

Parameters

ld_items (list of BaseLDTreeItemWrapper) – List of LD items.

class schrodinger.application.livedesign.panel_components.LDTreeItem(ld_item)

Bases: PyQt6.QtGui.QStandardItem

A custom Tree item.

__init__(ld_item)
Parameters

ld_item (BaseLDTreeItemWrapper) – an object that holds a name and folder_path attributes.

class schrodinger.application.livedesign.panel_components.LDSelectionModel

Bases: PyQt6.QtGui.QStandardItemModel

Tree model class which stores BaseLDTreeItemWrappers.

loadData(ld_items)

Load in the generic LiveDesign item and store in Tree form. Note: All previous rows in model are removed.

Parameters

ld_items (List of BaseLDTreeItemWrapper) – an object that holds a name and folder_path attributes.

loadRows(row_data)

Load in data and append each data item as a row in Tree. Note: All previous rows in model are removed.

Parameters

row_data (list of str) – text to set for each row.

loadRow(row_data)

Append a single row to the tree model. This method does not clear the model.

Parameters

row_data (str) – text to set for row.

flags(index)

Only leaf nodes in the tree model are selectable.

findItem(item_id, item=None)

Recursively finds the livereport item under a given QStandardItem that matches the lr_id. If item is None, the search will start from the root of the model

Parameters
  • item_id (str) – Id of the item to be found in the model

  • item (QStandardItem) – A model item under which the item_id has to be searched. If None, the serach will start from the root item of the model

Returns

Returns the matched livereport item or None

Return type

BaseLDTreeItemWrapper

class schrodinger.application.livedesign.panel_components.EndpointSelectionModel

Bases: schrodinger.application.livedesign.panel_components.LDSelectionModel

flags(index)

Prevent user from selecting endpoints with the ENDPOINT_UNAVAILABLE text. It indicates that the correct endpoint could not be parsed from LiveDesign.

data(self, index: QModelIndex, role: int = Qt.DisplayRole) Any
class schrodinger.application.livedesign.panel_components.BaseLDTreeItemWrapper(ld_name, ld_id=None, path='', linked_path=None, show_path=False)

Bases: schrodinger.models.json.JsonableClassMixin

Simple wrapper for storing either a ld_entities.LiveReport.name or ld_entities.Assay.name, and the folder path used to determine its position in the tree. By building a common wrapper for both items, much of the popup tree item code is simplified.

__init__(ld_name, ld_id=None, path='', linked_path=None, show_path=False)
Parameters
  • ld_name (str) – ld_entities.LiveReport.name or ld_entities.Assay.name

  • ld_id (str or None) – LiveReport.id as a unique identifier

  • path (str) – the folder path to determine position in tree.

  • linked_path (str) – for items duplicated in favorites, the original folder path

  • show_path (bool) – whether to show the linked_path in the display name

:raise ValueError if no name is given.

toJsonImplementation()

Abstract method that must be defined by all derived classes. Converts an instance of the derived class into a jsonifiable object.

Returns

A dict made up of JSON native datatypes or Jsonable objects. See the link below for a table of such types. https://docs.python.org/2/library/json.html#encoders-and-decoders

classmethod fromJsonImplementation(json_dict)

Abstract method that must be defined by all derived classes. Takes in a dictionary and constructs an instance of the derived class.

Parameters

json_dict (dict) – A dictionary loaded from a JSON string or file.

Returns

An instance of the derived class.

Return type

cls

class schrodinger.application.livedesign.panel_components.LDSelectionTreeView

Bases: PyQt6.QtWidgets.QTreeView

Base class for Selecting an item from a Tree.

itemSelected

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.

__init__()
selectionChanged(selected, deselected)

See Qt QTreeView for more information.

scrollToItemWithPath(full_assay_path)

Find the item with the given path, scroll to it, and select it. Useful for making the last selected item visible when a cell is clicked again.

Parameters

full_assay_path (str) – the full path of the assay including the name

class schrodinger.application.livedesign.panel_components.StringSearchFilterProxyModel(parent=None)

Bases: PyQt6.QtCore.QSortFilterProxyModel

A proxy model to filter a tree model to show both parents and children nodes if they match the regular expression string.

__init__(parent=None)
filterAcceptsRow(source_row, source_parent)

See Qt Documentation for more information on parameters.

This filter accepts a particular row if any of the following are true: 1. The index’s item’s text matches the reg exp. 2. Any of the index’s children match the reg exp. 3. Any of the index’s parents (up to the root) match the reg exp.

Note that the conditions specified above are searched in that order.

filterAcceptsIndex(index)

Checks whether this index’s item should be accepted by the filter. This DFS method checks if either this index’s item’s text or any of its children matches the filter reg exp.

Parameters

index (QtCore.QModelIndex) – the index to filter in or out according to regular exp.

Returns

whether the index should be accepted by the filter

Return type

bool

filterAcceptsParent(index)

Checks whether this index’s item’s text or any of its ancestors matches the filter reg exp.

Parameters

index (QtCore.QModelIndex) – the index to filter in or out according to regular exp.

Returns

whether the index should be accepted by the filter

Return type

bool

class schrodinger.application.livedesign.panel_components.BaseSelectionPopUp(parent)

Bases: schrodinger.application.livedesign.panel_components.BaseSearchTreeWidgetHelper, schrodinger.ui.qt.pop_up_widgets.PopUp

Base class for a popup used to selecting either an Assay or Live Report - this class only adds the common widgets and aesthetics to confirm both Popups look identical.

setup()

Sets up the model, view, proxy and search box.

See BaseSearchTreeWidgetHelper.setUpWidgets for more info.

reset()
class schrodinger.application.livedesign.panel_components.BaseLiveReportSelectionPopup(parent)

Bases: schrodinger.application.livedesign.panel_components.BaseSelectionPopUp

A BaseSelectionPopup that also has a combo box that can be used to select how Live Report data is organized.

Variables

LRSortMethodChanged (QtCore.pyqtSignal) – signal indicating that a new live report sort method has been chosen; emitted with an LRSort value

LRSortMethodChanged

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.

setUpWidgets(model, view)

Sets up the search box, model, view, and search proxy.

Parameters
  • model (QtGui.QStandardItemModel) – model for the tree

  • view (QtWidgets.QTreeView) – view for the model

setUpLayout()

Sets up the layout, but needs to be added to the widget by the subclass.

class schrodinger.application.livedesign.panel_components.LiveReportSelectionPopup(parent)

Bases: schrodinger.application.livedesign.panel_components.BaseLiveReportSelectionPopup

A popup for selecting Live Reports. Contains a refresh button.

refreshRequested

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.

PRE_REFRESH_TEXT = 'Refresh'
REFRESHING_TEXT = 'Refreshing...'
setUpWidgets(model, view)

Sets up the search box, model, view, and search proxy.

Parameters
  • model (QtGui.QStandardItemModel) – model for the tree

  • view (QtWidgets.QTreeView) – view for the model

setUpLayout()

Sets up the layout, but needs to be added to the widget by the subclass.

onRefreshClicked()
onRefreshCompleted()
class schrodinger.application.livedesign.panel_components.LiveReportSelectionComboBox(parent, lr_widget)

Bases: schrodinger.ui.qt.pop_up_widgets.ComboBoxWithPopUp

A custom Combo Box to show a Popup (LiveReportSelectionPopup) when the user clicks on the menu arrow. Also provides a “refresh” button to update the list of live reports from the host.

Variables
  • refreshRequested – signal indicating that a refresh was requested from the pop up.

  • liveReportSelected (QtCore.pyqtSignal) – signal emitted when a live report has been chosen in the combo box, with an argument of the live report id.

  • LRSortMethodChanged (QtCore.pyqtSignal) – signal indicating that a new live report sort method has been chosen; emitted with an LRSort value

refreshRequested

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.

liveReportSelected

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.

LRSortMethodChanged

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.

__init__(parent, lr_widget)

Create an instance.

Parameters

parent (PyQt5.QtWidgets.QWidget) – the Qt parent widget

reset()

Reset the combo box to initial state.

setData(live_reports)

Load in the live reports to the Tree widget.

Parameters

live_reports (List of BaseLDTreeItemWrapper) – live reports to be added.

addNewLiveReport()

Generates a new name for the live report depending on any reports selected in the tree and the current date. Sets value on combo box for a new report.

Returns

Name of new live report

Return type

str

onLiveReportSelected(item)

Slot connected to tree view’s selection.

Parameters

item (BaseLDTreeItemWrapper) – selected live report item in the tree view.

setCurrentLR(lr_id)

Sets the current livereport to the item pointed by lr_id

Parameters

lr_id (str) – Livereport id

Returns

True if success else False

Return type

bool

onRefreshCompleted()
class schrodinger.application.livedesign.panel_components.LiveReportTemplateSelectorCombo(parent=None)

Bases: schrodinger.ui.qt.swidgets.SComboBox

QComboBox with a placeholder text as the first time.

Variables

templateSelected (QtCore.pyqtSignal) – Emitted when the template selection changes. Emitted with the template id of the selection

templateSelected

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.

PLACEHOLDER_TEXT = 'Blank Template'
__init__(parent=None)

Create an SComboBox object.

Parameters
  • parent (QWidget) – The parent widget of this SComboBox

  • items (list) – list of items (str) to be added to the ComboBox - see also itemdict.

  • default_item (str) – text of the item to select initially and upon reset

  • default_index (int) – the index of the item to select initially and upon reset. default_item overrides this parameter.

  • command (callable) – The slot to connect to the currentIndexChanged[str] signal. This command will be called when the default item is selected during initialization unless nocall=True.

  • nocall (bool) – True if command should not be called during initialization, False otherwise

  • layout (QLayout) – The layout to place this widget in

  • tip (str) – The tooltip for the combo

  • itemdict (collections.OrderedDict) – An OrderedDictionary with ComboBox items as keys and data as values. The data for the current ComboBox item is returned by the currentData method. If both items and itemdict are given, items are added first.

  • adjust_to_contents (bool) – True if the size adjust policy should be set to “Adjust to contents”

  • min_width (int) – this property holds the minimum number of characters that should fit into the combobox

setDefaults()
setTemplates(templates)

Reset and set items on the combobox in alphabetical order and by global ID.

Parameters

templates (List[LiveReport]) – List of templates

class schrodinger.application.livedesign.panel_components.LiveReportSelector(parent, lr_widget, allow_add=True)

Bases: schrodinger.ui.qt.widgetmixins.basicmixins.InitMixin, PyQt6.QtWidgets.QWidget

A widget containing a LiveReportSelectionComboBox and a create new LR button.

Variables
  • refreshRequested (QtCore.pyqtSignal) – signals that the user has requested a refresh by clicking on the refresh button

  • liveReportSelected (QtCore.pyqtSignal) – signal emitted when a live report has been chosen in the combo box, with an argument of the live report id.

  • newLiveReportSelected (QtCore.pyqtSignal) – signal emitted when a live report has been created, with an argument of the live report id.

  • LRSortMethodChanged (QtCore.pyqtSignal) – signal indicating that a new live report sort method has been chosen; emitted with an LRSort value

refreshRequested

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.

liveReportSelected

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.

newLiveReportSelected

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.

LRSortMethodChanged

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.

__init__(parent, lr_widget, allow_add=True)
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.

initSetDefaults()

Set widget to its default state. If the widget uses a model/mapper, it’s preferable to reset the widget state by resetting the model.

setData(live_reports)

Load in the live reports to the Tree widget on the combo box.

Parameters

live_reports (List of BaseLDTreeItemWrapper) – live reports to be added.

setLiveReport(live_report_id)

Set the active live report, refreshing the available list if necessary.

Parameters

live_report_id (str) – the live report ID of the desired live report

Returns

True if success else False

Return type

bool

onRefreshCompleted()
addNewLiveReport()
setComboToSelect()

Sets live report combo to Select mode

class schrodinger.application.livedesign.panel_components.AddNewLineEdit(*args, **kwargs)

Bases: PyQt6.QtWidgets.QLineEdit

default_text = ''
__init__(*args, **kwargs)
focusInEvent(self, a0: QFocusEvent)
class schrodinger.application.livedesign.panel_components.AbstractSelectionPopUp(parent)

Bases: schrodinger.application.livedesign.panel_components.BaseSelectionPopUp

A popup for selecting LiveDesign values.

newValueSelected

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.

SEARCH_MODE_PAGE = 0
CREATE_MODE_PAGE = 1
SEARCH_TEXT = 'Placeholder search text'
setup()

Sets up the model, view, proxy and search box.

See BaseSearchTreeWidgetHelper.setUpWidgets for more info.

selectNewValue()

Creates a new value to add to the line edit.

setNumSelectedRows(num_rows)
setDefaultText(text)
class schrodinger.application.livedesign.panel_components.AbstractSelectionLineEdit(parent, initial_rows=1)

Bases: schrodinger.ui.qt.pop_up_widgets.LineEditWithPopUp

Custom Line Edit to show a Selection PopUp when the user clicks on the table cell.

newValueSelected

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.

valueSelected

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.

numSelectedRowsChanged

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.

POPUP_CLS = NotImplemented
__init__(parent, initial_rows=1)
Parameters
  • parent (PyQt5.QtWidgets.QWidget) – the Qt parent widget

  • initial_rows (int) – Initial rows selected on creation of widget

addNew(name)

Adds the new value name to the table cell and the popup tree.

Parameters

name (str) – new value name

onApplyToRowsClicked()

Trigger PopUpDelegate.commitDataToSelected signal

onValueSelected(item)

Slot connected to the view’s selection.

Parameters

item (BaseLDTreeItemWrapper) – selected item in the tree view.

addData(data)

Add the data value to the line edit.

class schrodinger.application.livedesign.panel_components.AbstractSelectionPopUpDelegate(parent)

Bases: schrodinger.ui.qt.pop_up_widgets.PopUpDelegate, schrodinger.ui.qt.delegates.AbstractDelegateWithEditIcon

Delegate for handling column line edits.

Variables

numSelectedRowsChanged – signal emitted when the amount of selected rows are changed.

numSelectedRowsChanged

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.

EDIT_ICON = '/scr/buildbot/savedbuilds/2024-3/NB/build-133/internal/lib/python3.11/site-packages/schrodinger/ui/qt/standard/icons/icon_data/menu-caret/menu-caret_lb.png'
COLUMN_TYPE: schrodinger.application.livedesign.panel_components.ExportTableColumns = NotImplemented
POPUP_CLS = NotImplemented
LINE_EDIT_CLS = NotImplemented
__init__(parent)
Parameters
  • parent (PyQt5.QtWidgets.QWidget) – The Qt parent widget

  • pop_up_class (type) – The class of the pop up widget. Should be a subclass of PopUp.

  • enable_accept_multi (bool) – Whether committing data to all selected cells at once is enabled. If True, commitDataToSelected will be emitted when the LineEditWithPopUp emits popUpClosing with ACCEPT_MULTI. If False, commitData will be emitted instead.

paint(self, painter: QPainter, option: QStyleOptionViewItem, index: QModelIndex)
class schrodinger.application.livedesign.panel_components.AssaySelectionPopUp(parent)

Bases: schrodinger.application.livedesign.panel_components.AbstractSelectionPopUp

A popup for selecting Assays.

SEARCH_TEXT = 'Search model or assay name'
setup()

Sets up the model, view, proxy and search box.

See BaseSearchTreeWidgetHelper.setUpWidgets for more info.

class schrodinger.application.livedesign.panel_components.AssaySelectionLineEdit(parent, num_rows)

Bases: schrodinger.application.livedesign.panel_components.AbstractSelectionLineEdit

Custom Line Edit to show an AssaySelectionPopUp.

mappingSaved

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.

POPUP_CLS

alias of schrodinger.application.livedesign.panel_components.AssaySelectionPopUp

__init__(parent, num_rows)
Parameters
  • parent (PyQt5.QtWidgets.QWidget) – the Qt parent widget

  • initial_rows (int) – Initial rows selected on creation of widget

addNew(name)

Adds the new value name to the table cell and the popup tree.

Parameters

name (str) – new value name

addData(data)

Add the assay data to populate the pop up tree model.

Parameters

data (List of BaseLDTreeItemWrapper) – the list of tree item wrappers containing the name and path of the assays

onValueSelected(item)

Slot connected to tree view’s selection.

Parameters

item (BaseLDTreeItemWrapper) – selected Assay item in the tree view.

saveMapping()

Saves the state of collapsed and expanded items in the QTreeView

saveExpansionBFS(model_idx: PyQt6.QtCore.QModelIndex)

Searches for and saves the expanded items of an element and its children. Uses breadth first searching

getTreePath(model_idx: PyQt6.QtCore.QModelIndex) List[str]

Gets full path of element at the model index.

X
  Y
    Z

tree path of element Z is [‘X’, ‘Y’, ‘Z’]

applyMapping(mapping: List[List[str]])

Applies the given expansion mapping to elements in the view

setExpansionBFS(model_idx: PyQt6.QtCore.QModelIndex, mapping: List[List[str]])

Applies the expansion states from mapping to the element at the given model index

getAssayFolderPath()

Return the currently selected assay’s folder path. If no assay is selected, None is returned.

Returns

folder path of currently selected assay.

Return type

str or None

setAllAssayData(assays_list, assay_name, assay_folder_path)

Set all the assay data including the list of possible assays, the current (ie last selected) assay name value, and the folder path to the current assay (if exists). This will add the possible assays to the popup’s selection view, set the line edit text, store the assay folder path, and scroll to and select the item corresponding to the current selection in the popup.

Note that because the assay name and path does not currently store whether the original location was from its original path or the ‘Project Favorites’ folder, the selection always scrolls to the original location rather than the ‘Project Favorites’ location.

Parameters
  • assays_list (List of BaseLDTreeItemWrapper) – the list of ld items specifying the assay names and paths

  • assay_name (str) – the current value of the assay name

  • assay_folder_path (str) – the current value of the assay folder path

getNewAssay()

Return the newly created assay if one exists.

Returns

the newly created assay

Return type

BaseLDTreeItemWrapper or None

setText(self, a0: str)
class schrodinger.application.livedesign.panel_components.AssaySelectionPopUpDelegate(parent)

Bases: schrodinger.application.livedesign.panel_components.AbstractSelectionPopUpDelegate

Delegate for handling assay line edits.

Variables
  • newAssaySelected (QtCore.pyqtSignal(QtCore.QModelIndex)) – signal emitted when a new assay is created by user and selected for use. This signal is emitted once the assay data is set in the model, and with the assay index.

  • assaySelected (QtCore.pyqtSignal(QtCore.QModelIndex)) – signal emitted when an existing assay is selected and applied. This signal is emitted once the assay data is set in the model, and with the assay index.

newAssaySelected

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.

assaySelected

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.

numSelectedRowsChanged

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.

mappingSaved

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.

COLUMN_TYPE: schrodinger.application.livedesign.panel_components.ExportTableColumns = Column 1 (LiveDesign Column)
POPUP_CLS

alias of schrodinger.application.livedesign.panel_components.AssaySelectionPopUp

LINE_EDIT_CLS

alias of schrodinger.application.livedesign.panel_components.AssaySelectionLineEdit

__init__(parent)
Parameters
  • parent (PyQt5.QtWidgets.QWidget) – The Qt parent widget

  • pop_up_class (type) – The class of the pop up widget. Should be a subclass of PopUp.

  • enable_accept_multi (bool) – Whether committing data to all selected cells at once is enabled. If True, commitDataToSelected will be emitted when the LineEditWithPopUp emits popUpClosing with ACCEPT_MULTI. If False, commitData will be emitted instead.

onNewAssaySelected()
onAssaySelected()
setMapping(mapping)
setEditorData(self, editor: QWidget, index: QModelIndex)
setModelData(self, editor: QWidget, model: QAbstractItemModel, index: QModelIndex)
class schrodinger.application.livedesign.panel_components.EndpointSelectionPopUp(parent)

Bases: schrodinger.application.livedesign.panel_components.AbstractSelectionPopUp

A popup for selecting Endpoints.

SEARCH_TEXT = 'Search property name'
setup()

Sets up the model, view, proxy and search box.

See BaseSearchTreeWidgetHelper.setUpWidgets for more info.

class schrodinger.application.livedesign.panel_components.EndpointSelectionLineEdit(parent, initial_rows=1)

Bases: schrodinger.application.livedesign.panel_components.AbstractSelectionLineEdit

Custom Line Edit to show a PopUp (EndpointSelectionPopUp) when the user double clicks on the table cell.

POPUP_CLS

alias of schrodinger.application.livedesign.panel_components.EndpointSelectionPopUp

addNew(name)

Adds the new value name to the table cell and the popup tree.

Parameters

name (str) – new value name

addData(data)

Add the endpoint data to populate the pop up tree model.

Parameters

data (List of str) – data values that need to be added as rows

onValueSelected(item)

Slot connected to tree view’s selection.

Parameters

item (BaseLDTreeItemWrapper) – selected Endpoint item in the tree view.

class schrodinger.application.livedesign.panel_components.EndpointSelectionPopUpDelegate(parent)

Bases: schrodinger.application.livedesign.panel_components.AbstractSelectionPopUpDelegate

Delegate for handling endpoint line edit.

COLUMN_TYPE: schrodinger.application.livedesign.panel_components.ExportTableColumns = Column 2 (LiveDesign Property)
POPUP_CLS

alias of schrodinger.application.livedesign.panel_components.EndpointSelectionPopUp

LINE_EDIT_CLS

alias of schrodinger.application.livedesign.panel_components.EndpointSelectionLineEdit

__init__(parent)
Parameters
  • parent (PyQt5.QtWidgets.QWidget) – The Qt parent widget

  • pop_up_class (type) – The class of the pop up widget. Should be a subclass of PopUp.

  • enable_accept_multi (bool) – Whether committing data to all selected cells at once is enabled. If True, commitDataToSelected will be emitted when the LineEditWithPopUp emits popUpClosing with ACCEPT_MULTI. If False, commitData will be emitted instead.

setEditorData(self, editor: QWidget, index: QModelIndex)
setModelData(self, editor: QWidget, model: QAbstractItemModel, index: QModelIndex)
class schrodinger.application.livedesign.panel_components.LiveDesignProjectsCombo(parent=None)

Bases: schrodinger.ui.qt.swidgets.SComboBox

This is a standard QComboBox with a few helper methods.

Variables
  • projectSelected (QtCore.pyqtSignal) – signal for when a any project in the combo box is selected. Emitted with the project name and ID.

  • placeholderSelected (QtCore.pyqtSignal) – signal for when the placeholder in the combo box is selected. Emitted with no arguments.

projectSelected

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.

placeholderSelected

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.

__init__(parent=None)

Custom QComboBox for selecting a LiveDesign Project

setDefaults()

Resets the combobox and sets the default placeholder entry.

addProjects(projects)

Resets the combobox and adds the new LD projects in alphabetical order, along with the project id as the user data.

Parameters

projects ([ldclient.models.Project]) – list of LD projects

currentProjectName()

Return the current selected project name or None if no project is selected.

Returns

project name if applicable

Return type

str or None

currentProjectID()

Return the current selected project’s id. If placeholder item is currently selected, None will be returned.

Returns

project id if applicable

Return type

str or None

isPlaceholderItemSelected()

Returns whether the placeholder text is currently selected.

Returns

whether the placeholder is selected.

Return type

bool

selectPlaceholderItem()

Simply set the current item to be the placeholder text.

class schrodinger.application.livedesign.panel_components.InitialSuggestionLineEdit

Bases: PyQt6.QtWidgets.QLineEdit

Line edit that allows suggestions on click event, without needing an initial keystroke

mousePressEvent(self, a0: QMouseEvent)
startCompletion()

Manually trigger the line edit’s QCompleter, if it exists

class schrodinger.application.livedesign.panel_components.ClearInitialSuggestionLineEdit(*args, **kwargs)

Bases: schrodinger.application.livedesign.panel_components.InitialSuggestionLineEdit

Suggestion line edit that implements a custom clear button that triggers completion after clearing

__init__(*args, **kwargs)
schrodinger.application.livedesign.panel_components.organize_ld_data_tree(ld_data_list)

Given a list of LD data, organize it for display in the exportable data tree.

Parameters

ld_data_list (list(data_classes.LDData)) – LD data to organize

Returns

a tuple representing the organized data: each

Return type

collections.OrderedDict(str, list(data_classes.LDData))

schrodinger.application.livedesign.panel_components.filter_missing_entry(entry, default_value)