schrodinger.application.phase.phase_widgets module

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.

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
currentText()

Text to show in the combo menu, depending on the current selection. Over-rides the standard method of MultiComboBox.

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.

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
setSelectedFeatures(features)

Select the given features in the combo menu.

Parameters:features (list of str) – List of one-letter feature types.
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_DEFINITION_PRESETS = ['Replace vectors with projected points (acceptors and donors)']
FEATURE_EQUIV_PRESETS = OrderedDict([('Make hydrophobic and aromatic rings equivalent', 'HR'), ('Make acceptor and negative equivalent', 'AN'), ('Make donor and positive equivalent', 'DP')])
addFeatureDefinitionPresets()

Adds the optional feature definition presets.

currentText()
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
class schrodinger.application.phase.phase_widgets.HypothesesListWidget(parent)

Bases: PyQt5.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_PT = 1
ADD_HYPO_WS = 0
COMBO_TEXT = 'Add Hypothesis...'
addHypoFromPT()

Adds hypotheses from the selected Project Table entries.

addHypoFromWorkspace()

Adds hypotheses from Workspace (included 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
getHypotheses()

Returns a list of all hypotheses in the table.

Returns:list of PhaseHypothesis objects.
Return type:list
modelChanged
reset()

Reset hypotheses list model.

setDefaults()

Sets default widget options.

updateHypothesisFromEntry(entry_id)

Updates hypothesis in the model (if it is found) from the PT hypothesis with a given entry ID.

class schrodinger.application.phase.phase_widgets.HypothesisModel(parent=None)

Bases: schrodinger.ui.qt.table_helper.RowBasedTableModel

Hypotheses Model.

Column

alias of HypothesisColumns

ROW_CLASS

alias of HypothesisRow

getAllHypoIDs()

Return a list of entry IDs of all hypotheses in the table.

getAllHypotheses()

Returns a list of all PhaseHypothesis objects in this model.

Returns:All hypotheses
Return type:list of hypothesis.PhaseHypothesis
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.