schrodinger.ui.qt.filter_dialog module

Filter dialog for the FEP+ and Enumeration GUIs.

class schrodinger.ui.qt.filter_dialog.FilterDialog(parent=None, dialog_title='Filter by Properties', use_dual_slider=True, show_matches=True, show_filter_name=True, allow_empty_filter=False, **kwargs)

Bases: schrodinger.ui.qt.appframework2.settings.BaseOptionsPanel

Dialog allowing the user to select filter criteria - for displaying only ligands that match the specified rules.

__init__(parent=None, dialog_title='Filter by Properties', use_dual_slider=True, show_matches=True, show_filter_name=True, allow_empty_filter=False, **kwargs)

Class initializer.

Parameters
  • parent (QWidget) – parent widget of this dialog.

  • use_dual_slider (bool) – indicates whether dual slider widget should be shown for ‘between (inclusive)’ type.

  • show_matches (bool) – determines whether label showing number of matches should be shown. We need to hide it when using filter dialog and no structures are available yet. For example, Custom R-group Enumeration GUI.

  • show_filter_name (bool) – determines whether filter name field should be shown. It is needed for filters that can be saved in the preferences (FEP+) and should be hidden for filters that can not be saved.

  • allow_empty_filter (bool) – whether to allow the user to save the filter even if no filter criteria are defined

setPanelOptions()

Set the panel options for this dialog.

setup()

See base class for documentation.

getFilterName()

Returns name of this filter.

Returns

filter name

Return type

str

display(filter_obj, props_for_ligs, used_filter_names=None)

Open the dialog for the given filter object, properties present in the ligands, and filter names that are already used. Returns True if OK was pressed and filter_obj was updated; False otherwise.

Parameters
  • filter_obj (filter_core.Filter) – filter object

  • props_for_ligs (list(dict(str, object))) – list of property dictionaries use to construct filters for this dialog

  • used_filter_names (list(str) or None) – list of used filter names, if applicable

Returns

returns True if filter was applied and False if user clicked ‘Cancel’ button.

Return type

bool

validateSettings()

Do not allow the user to accept the dialog if anything is invalid.