schrodinger.ui.ligfilter module

Components for creating GUIs that set up Ligfilter jobs.

See the schrodinger.utils.ligfilter module for a complete description of ligfilter and its functions.

There’s not likely to be much general use for this module unless you are creating a modified interface for LigFilter or want to embed an interface to Ligfilter in your own application.

The main class in this module is the LigfilterFrame. This provides a complete interface to the Ligfilter GUI.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.ui.ligfilter.AddDefinitionDialog(parent, definitions)

Bases: PyQt5.QtWidgets.QDialog

Frame for generating a pattern definition.

delete()
deleteAll()
display()

Brings up the dialog and waits for the user to close it. Returns None if cancelled, or modified receptor if OK.

exclude()
getDefinition()

Return the pattern defined in the AddDefinitionDialog. Return None if the definition is bad, or if the user opts not to overwrite an existing pattern definition.

getSMARTSFromSelection()

Set the SMARTS entry field according to atoms selected in the Workspace.

helpPressed()
include()
okPressed()
rejected()
setDefaults()
updateDefinitionState(selected=None, deselected=None)
updateInclExclState(selected=None, deselected=None)
updateText()
view()
warning(text)
class schrodinger.ui.ligfilter.CriteriaListModel

Bases: PyQt5.QtCore.QAbstractListModel

Class for storing the criteria list information.

data(index, role=0)

Given a cell index, returns the data that should be displayed in that cell (text or check button state). Used by the view.

flags(index)

Returns flags for the specified cell. Whether selectable or not.

getRowCriteria(rownum)
removeRow(rownum)
resetData()
rowCount(parent=<PyQt5.QtCore.QModelIndex object>)

Returns number of rows

setAllData(lines)
class schrodinger.ui.ligfilter.DefinitionViewerDialog(parent, definitionname, definitions)

Bases: PyQt5.QtWidgets.QDialog

Frame containing a text box with a text display of the definition. Shows multi-level definitions (i.e., patterns built from other patterns) with indenting.

printTree(name, level)

Recursively descend through the included/excluded lists, printing to the text box and indenting the text at deeper levels.

class schrodinger.ui.ligfilter.LigfilterFrame(parent, show_properties_tab=True)

Bases: PyQt5.QtWidgets.QWidget

Frame for setting up Ligfilter jobs, including property/SMARTS criteria and new definitions. This is the main class in this module.

addPattern()

Callback function for the “New” button. Pops up a dialog for construction the new definition, and incorporates the new (or redefined) pattern if the dialog returns one.

addPatternCriterion()
addPredefinedCriterion()
addPropCriterion()
addpropop1Modified(result)

Callback for the first operator OptionMenu on the Properties tab. Disables the rest of the “Add criterion” widgets when property existence is being checked.

checkPropertyType(prop)

Callback for modifications to the property EntryField. Adjust the operator list and value validator according to the property type entered. The EntryField may need to be cleared to prevent non-modifiable values (e.g., when switching from string to integer).

deleteEntry()

Delete the selected criterion or pattern

filterSelectionChanged(selected=None, deselected=None)
getFilterText()

Will return a string representation of the specified criteria, including any user-defined definitions. Returns a Python Unicode string.

getSelectedPatternName()

Return the name of the selected pattern (or None)

importFilterFile()

Read in an external filter file

readFilterCriteria(fh)

Reads the filter criteria from the specified open file handle or a list strings (lines in a filter file).

selectPattern()
selectPredefined()
selectProperty()
setDefaults()
setMultiplePatternCriterionState(result)
setMultiplePredefinedCriterionState(result)
setMultiplePropCriterionState(result)
setPatternOptions()

Set the option menu list of keys to the predefined keys, the default patterns, and any custom patterns. There always are predefined keys, so the “add pattern criterion” widgets stay enabled. The “delete pattern” widgets are disabled if no custom patterns are defined.

setProperties(propertylist, resettable=True)

Set the available CT-level properties. If this properties list should not be reset when the user presses the Reset button (See Ev:132763), set resettable to False.

setup(jobparam)

Function passed to AppFramework that is called as part of the setup cascade when a job is started/written. Place all data in the jobparam object necessary for running the job.

updateText()

Rewrite the text in the criteria/patterns text box

viewPattern()
warning(text)
class schrodinger.ui.ligfilter.PatternModel

Bases: PyQt5.QtCore.QAbstractTableModel

Class for strring patterns (definitions) and their groups

columnCount(parent=<PyQt5.QtCore.QModelIndex object>)

Returns number of columns

data(index, role=0)

Given a cell index, returns the data that should be displayed in that cell (text or check button state). Used by the view.

flags(index)

Returns flags for the specified cell. Whether it is enabled or not.

getRowText(row)
headerData(section, orientation, role)

Returns the string that should be displayed in the specified header cell. Used by the View.

rowCount(parent=<PyQt5.QtCore.QModelIndex object>)

Returns number of rows

setItems(data_list)

Sets the internal data list to the specified list. NOTE: Will use the actual list passed to it (without making a copy)