schrodinger.application.jaguar.gui.tabs.sub_tab_widgets.charge_constraints_widgets module¶
- class schrodinger.application.jaguar.gui.tabs.sub_tab_widgets.charge_constraints_widgets.ChargeConstraintsColumns¶
Bases:
object
- HEADERS = ['Atom', 'ID', 'Entry Title', 'Charge']¶
- NUM_COLS = 4¶
- ATOMS = 0¶
- ID = 1¶
- TITLE = 2¶
- CHARGE = 3¶
- class schrodinger.application.jaguar.gui.tabs.sub_tab_widgets.charge_constraints_widgets.ChargeConstraintRow(entry_id=None, title=None, charge=None, weights=None)¶
Bases:
schrodinger.application.jaguar.gui.tabs.sub_tab_widgets.base_widgets.SubTabRow
Data about a charge constraint setting
- Variables
DEFAULT_WEIGHT (float) – default atom weight in charge constraint.
- DEFAULT_WEIGHT = 1.0¶
- __init__(entry_id=None, title=None, charge=None, weights=None)¶
- copy()¶
Create a new row object that is a copy of this row
- Return type
- Returns
A row item that is a copy of this row.
- updateAtomNames(names)¶
Change the atom names for this constraint
- Parameters
names (list) – The list of atom names
- weightsByNum()¶
Get a dictionary of {atom index: atom weight}. (As opposed to
weights
, which is {atom name: atom weight})- Returns
Dictionary of {atom index: atom weight}
- Return type
dict
- class schrodinger.application.jaguar.gui.tabs.sub_tab_widgets.charge_constraints_widgets.ChargeConstraintsTableView(parent=None)¶
Bases:
schrodinger.application.jaguar.gui.tabs.sub_tab_widgets.base_widgets.SubTabTableView
The view for the charge constraints.
- COLUMN¶
- MARKER_SETTINGS = {'alt_color': 'yellow', 'color': 'green'}¶
- addJaguarMarker¶
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.
- removeJaguarMarker¶
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=None)¶
- dataChanged(topleft, bottomright, role)¶
If the atoms data in a selected cell changes, make sure that the newly created markers are highlighted
- class schrodinger.application.jaguar.gui.tabs.sub_tab_widgets.charge_constraints_widgets.ChargeConstraintsModel(parent=None)¶
Bases:
schrodinger.application.jaguar.gui.tabs.sub_tab_widgets.base_widgets.SubTabModel
- COLUMN¶
- UNEDITABLE = (1, 2)¶
- ROW_CLASS¶
- MARKER_SETTINGS = {'alt_color': 'yellow', 'color': 'green'}¶
- addJaguarMarkerForRow(row)¶
Add a workspace marker for the given row. Subclasses must override this class if they require more than one workspace marker per row. Note that any given set of atom(s) may only have one marker per sub-tab. The sub-tab is responsible for ensuring that a marker is not added to a set of atom(s) that already has a marker.
- Parameters
row (
SubTabRow
) – The row to add the marker for
- removeJaguarMarkerForRow(row)¶
Remove the workspace marker for the given row. Subclasses must override this class if they create more than one workspace marker per row.
- Parameters
row (
SubTabRow
) – The row to remove the marker for
- copyRow(row)¶
Copy row into a new row in this model
- Parameters
row (
ChargeConstraintRow
) – The row item containing the data to copy
- class schrodinger.application.jaguar.gui.tabs.sub_tab_widgets.charge_constraints_widgets.AtomSelectionDelegate(parent)¶
Bases:
schrodinger.application.jaguar.gui.input_tab_widgets_pka.AtomSelectionDelegate
A delegate for selecting atoms for the charge constraint.
- Note
We currently don’t allow the user to type in atom names. If the user doesn’t click on an atom in the workspace, then we have no way to determine which entry the constraint refers to. Invalid atoms names (i.e. those not in the form <element><index>) would also cause issues for the weights pop- up. Additionally, we’d have to add atom name validation to the model in order to color cells with errors and to give a tool tip explaining the problem, as is done for pKa atoms. We’d also have to implement validate() for the sub-tab. It would be possible to solve these issues, but for now we simply require that the user select atoms from the workspace.
- Variables
addJaguarMarker (
PyQt5.QtCore.pyqtSignal
) –A signal emitted when a workspace marker should be added. Emitted with:
The list of atoms to add the marker for (list)
The index that the atom is being marked for. (Used to determine whether the marker should be highlighted or not.) (
QtCore.QModelIndex
)
removeJaguarMarker (
PyQt5.QtCore.pyqtSignal
) –A signal emitted when a workspace marker should be removed. Emitted with:
The list of atoms to remove the marker for (list)
- MAESTRO_STATUS_MESSAGE = 'Pick an atom to be included in the charge constraint'¶
- TOOL_TIP_INSTRUCTIONS = 'Click an atoms in the workspace to\nset them as a charge constraint atom.\nClick again to remove.'¶
- TOOL_TIP_WRONG_EID = 'The atom you selected is not\npart of this structure.'¶
- DEFAULT_DATA = {}¶
- addJaguarMarker¶
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.
- removeJaguarMarker¶
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)¶
- clearRowIfEmpty(editor, hint=None)¶
When the editor closes, erase a row if it does not contain any atom names. Without any atom names, the row is meaningless. By clearing the rows immediately, we avoid the need to later warn the user about them.
- Parameters
editor (
PyQt5.QtWidgets.QLineEdit
) – The recently-closed editorhint – Ignored, but present for compatibility with the Qt signal
- createEditor(parent, option, index)¶
Create an editor as in the super-class, but mark it as read-only. See the :note in the class documentation for an explanation of why.
See Qt documentation for an explanation of arguments and return values
- setModelData(editor, model, index)¶
Before setting the model data, clear any workspace markers we have created and restore the markers to the model values. This avoids having the model trying to clear a marker that no longer exists, which would raise an exception.
See parent class and PyQt documentation for an explanation of arguments.
- class schrodinger.application.jaguar.gui.tabs.sub_tab_widgets.charge_constraints_widgets.ChargeSelectorDelegate(parent)¶
Bases:
schrodinger.ui.qt.pop_up_widgets.PopUpDelegate
A delegate for selecting charge constraint atom weights.
- __init__(parent)¶
- Parameters
parent (
PyQt5.QtWidgets.QWidget
) – The Qt parent widgetpop_up_class (type) – The class of the pop up widget. Should be a subclass of
PopUp
.enable_accept_multi (bool) – Whether committing data to all selected cells at once is enabled. If True,
commitDataToSelected
will be emitted when theLineEditWithPopUp
emitspopUpClosing
withACCEPT_MULTI
. If False,commitData
will be emitted instead.
- setEditorData(self, editor: QWidget, index: QModelIndex)¶
- setModelData(self, editor: QWidget, model: QAbstractItemModel, index: QModelIndex)¶