schrodinger.application.phase.phase_widgets module¶
- class schrodinger.application.phase.phase_widgets.FeatureOptionsCombo(parent)¶
Bases:
schrodinger.ui.qt.multi_combo_box.MultiComboBox
MultiComboBox containing feature presets. This currently includes feature equivalencies and use of alternate feature definitions.
- FEATURE_EQUIV_PRESETS = {'Make acceptor and negative equivalent': 'AN', 'Make donor and positive equivalent': 'DP', 'Make hydrophobic and aromatic rings equivalent': 'HR'}¶
- FEATURE_DEFINITION_PRESETS = ['Replace vectors with projected points (acceptors and donors)']¶
- __init__(parent)¶
- Parameters
parent (
PyQt5.QtWidgets.QWidget
) – The Qt parent widgetinclude_all_and_none (bool) – Whether “All” and “None” options should be added to the top of the item list.
delimiter (str) – The delimiter to use when listing all selected items
- addFeatureDefinitionPresets()¶
Adds the optional feature definition presets.
- getSelectedFeatureEquivalencies()¶
Return a list of feature equivalencies that were checked/selected in the menu.
- Returns
list of equivalencies to pass to PhpProject.saveFeatureEquiv
- Return type
list of str
- setADProjectedPointsChecked(checked)¶
Sets the selected state of the Replace acceptor/donor projected points preset item.
- Parameters
checked (bool) – whether to select the projected point feature preset
- useADProjectedPointsChecked()¶
Whether the Replace acceptor/donor projected points item is checked.
- Returns
string indicating the number of selected feature presets
- Return type
str
- currentText(self) str ¶
- class schrodinger.application.phase.phase_widgets.FeatureMatchCombo(parent)¶
Bases:
schrodinger.ui.qt.multi_combo_box.MultiComboBox
This class defines special variant of a combo box used in Edit Feature dialog to define features that are allowed and forbidden to match. This combo box would contain a list of Phase features, which should be checkable. Line edit would show comma checked features as a string, which contains comma separated one letter feature names. In addition some items could be disabled.
- __init__(parent)¶
- Parameters
parent (
PyQt5.QtWidgets.QWidget
) – The Qt parent widgetinclude_all_and_none (bool) – Whether “All” and “None” options should be added to the top of the item list.
delimiter (str) – The delimiter to use when listing all selected items
- currentText()¶
Text to show in the combo menu, depending on the current selection. Over-rides the standard method of MultiComboBox.
- setSelectedFeatures(features)¶
Select the given features in the combo menu.
- Parameters
features (list of str) – List of one-letter feature types.
- setChecked(feature, select)¶
This function sets feature item ‘checked’ state.
- Parameters
feature_type (str) – one letter feature type. ‘Enabled’ and ‘checked’ states will be set for this feature type.
checked (bool) – boolean indicating whether item should be checked
- setEnabled(feature_type, enabled)¶
This function sets feature item ‘enabled’ state.
- Parameters
feature_type (str) – one letter feature type. ‘Enabled’ and ‘checked’ states will be set for this feature type.
enabled (bool) – boolean indicating whether item should be enabled
- enableAllFeatures()¶
Set all items to be enabled. Except the features that were “forced” to be selected (they are selected and disabled).
- resetAllFeatures()¶
Resets all item states to enabled and unchecked.
- checkedFeatures()¶
This function returns a list that contains one letter types of checked features. Feature that is checked and disabled is the ‘current’ feature type. It should be the first item in the list.
- Returns
list of checked features
- Return type
list
- class schrodinger.application.phase.phase_widgets.HypothesisRow(entry_id, hypo)¶
Bases:
object
Data class that contains information about entry ids for a given Phase hypothesis.
- __init__(entry_id, hypo)¶
Hypothesis data class.
- Parameters
entry_id (int) – hypothesis entry ID
hypo (
hypothesis.PhaseHypothesis
) – hypothesis data object
- class schrodinger.application.phase.phase_widgets.HypothesisColumns(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
enum.TableColumns
- HypoName = Column 0 (Hypothesis)¶
- MinSites = Column 1 (Matches)¶
- ExclVols = Column 2 (Excluded Volumes)¶
- class schrodinger.application.phase.phase_widgets.HypothesisModel(parent=None)¶
Bases:
schrodinger.ui.qt.table_helper.RowBasedTableModel
Hypotheses Model.
- Column¶
alias of
schrodinger.application.phase.phase_widgets.HypothesisColumns
- ROW_CLASS¶
alias of
schrodinger.application.phase.phase_widgets.HypothesisRow
- getAllHypotheses()¶
Returns a list of all PhaseHypothesis objects in this model.
- Returns
All hypotheses
- Return type
list of
hypothesis.PhaseHypothesis
- getAllHypoIDs()¶
Return a list of entry IDs of all hypotheses in the table.
- class schrodinger.application.phase.phase_widgets.HypothesesListWidget(parent)¶
Bases:
PyQt6.QtWidgets.QWidget
Widget that shows list of Project Table hypotheses. It has a control that allows to select hypotheses for ‘included’ and ‘selected’ entries.
- Variables
modelChanged (
QtCore.pyqtSignal
) – signal emitted when hypotheses are added to this widget or deleted.
- ADD_HYPO_WS = 0¶
- ADD_HYPO_PT = 1¶
- COMBO_TEXT = 'Add Hypothesis...'¶
- modelChanged¶
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)¶
Initialize hypotheses widget.
- reset()¶
Reset hypotheses list model.
- setDefaults()¶
Sets default widget options.
- addHypoFromWorkspace()¶
Adds hypotheses from Workspace (included Project Table entries).
- addHypoFromPT()¶
Adds hypotheses from the selected Project Table entries.
- addHypothesisFromEntry(entry_id)¶
Adds a PT hypothesis to the list, given it’s entry ID.
- Parameters
entry_id (int or str) – Project Table entry ID
- updateHypothesisFromEntry(entry_id)¶
Updates hypothesis in the model (if it is found) from the PT hypothesis with a given entry ID.
- getHypotheses()¶
Returns a list of all hypotheses in the table.
- Returns
list of PhaseHypothesis objects.
- Return type
list