schrodinger.application.desmond.fep_dialog module¶
A FEP configuration dialog. It should not be run directly, but is instead used by the specific Desmond scripts.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.desmond.fep_dialog.FEPConfigDialog(parent, title='', jobname='', checkcommand=None, use_rest=True, per_subjob=None, single_gpu=False, ff_builder_enabled=False, **kw)¶
Bases:
schrodinger.ui.qt.config_dialog.ConfigDialog
- HOST_LABEL_TEXT = 'CPU Host:'¶
- MAX_SUBJOBS_LABEL_TEXT = 'Maximum simultaneous FEP subjobs:'¶
- __init__(parent, title='', jobname='', checkcommand=None, use_rest=True, per_subjob=None, single_gpu=False, ff_builder_enabled=False, **kw)¶
- Parameters
use_rest (bool) – Specifies whether this is a FEP/REST job or not. Setting this to False will hide “Replica” options. (This was done for backwards compatibility).
per_subjob (bool) – Whether to show per job CPUs field, or Total CPUs field. By default, per_subjob = not use_rest.
single_gpu (bool) – Whether to allow only a single GPU
- updateCPULimits()¶
This method is called whenever host selection is changed. It updates maximum number of allowed CPUs as well as GPUs.
- onHostMenuChanged(index)¶
- updateNumCPUsLabel()¶
We update the label here, if present.
- setupSubHostCombo(combo)¶
Add only GPU Hosts to the combo box input. The combo box menu will be cleared first.
- Parameters
combo (QtWidgets.QComboBox) – combo box to append to.
- setupFFBuilderOptions()¶
Set up options for ffbuilder portion of the config dialog. Hidden if we are not enabling ffbuilder.
- setupSubHostLayout()¶
- validate()¶
Checks the panel to make sure settings are valid. Return False if any validation test fails, otherwise return True.
- validateSubjobs()¶
Validates subjob fields are populated with values that can be cast into an int
- validatePlatform()¶
Verify that the current platform is acceptible for the requested action.
- Returns
True if the platform is valid, False otherwise
- Return type
bool
- validateNumCpus(host, editfield, silent=False)¶
Validate number of CPUs :type host: Host :param host: the host on which the CPUs reside :type editfield: QWidget :param editfield: widget specifying the number of CPUs :type silent: bool :param silent: suppresses warning dialogs when set to True
- validateNumGpus(host, editfield, silent=False)¶
Validate number of GPUs :type host: Host :param host: the host on which the GPUs reside :type editfield: QWidget :param editfield: widget specifying the number of GPUs :type silent: bool :param silent: suppresses warning dialogs when set to True
- validateSubHost()¶
Checks if the current SUBJOB Host is None - if so a warning dialog is posted to the user.
- Returns
True if a subjob host is chosen, False if not.
- Return type
bool
- currentHost(menu=None)¶
See ConfigDialog.currentHost() docstring.
- addNumericLineEdit(layout, value=1, prelabel=None, postlabel=None)¶
Creates a standard line edit used for input, adds it to the provided layout, and then returns the line edit so that it can be stored and its value accessed later.
- Parameters
value (int) – the initial value for the line edit
If prelabel or postlabel are strings, QLabels with the textual value will be created.
- buildLabel(layout, label)¶
Build a new QLabel if label is a str, and add the widget to the given layout.
- Parameters
layout (QtWidgets.QLayout) – layout to which the stacked widget should be added.
label (string or QLabel) – the text or widget to add to layout.
- buildLineEdit(value=1)¶
Build a QLineEdit with specific width and validator.
- buildComboBox()¶
Build a QComboBox with specific included options.
- addSubprocessStackedWidget(layout, prelabel, postlabel)¶
Add a stacked widget to the given layout with one widget being a lineedit with labels, and the other a combo box with labels.
- Parameters
layout (QtWidgets.QLayout) – layout to which the stacked widget should be added.
prelabel (str or QLabel) – text preceding the widgets added to the stacked widget.
postlabel (str or QLabel) – text following the widgets added to the stacked widget.
- Returns
the stacked widget containing the lineedit and combobox
- Return type
QtWidgets.QStackedWidget
- getSettings(extra_kws=None)¶
- applySettings(settings)¶
See parent class docstring
- updateMaxjobsDefault()¶
- class schrodinger.application.desmond.fep_dialog.CustomGPUComboBox¶
Bases:
PyQt6.QtWidgets.QComboBox
- text()¶
Wrapper for currentText().
- value()¶
Get the int value of the current text
- Returns
int value of current text
- Return type
int
- setText(text)¶
Sets text as selected entry in combo box if found, otherwise, the text is added to combo box and set as selected.
- Parameters
text (str) – set either existing or new entry with given text
- setValue(val)¶
Set the current value of the combobox to the specified value.
- Parameters
val (int) – Value to be set
- setMaximum(value)¶
Disables combo box entries that are larger than value, adds tje value if it wasn’t present, and decrements the index till the selected value is acceptable.
- Parameters
value (int) – the maximum number of GPUs selectable