schrodinger.application.jaguar.gui.input_tab_widgets_pka module¶
-
class
schrodinger.application.jaguar.gui.input_tab_widgets_pka.
ProjEntryPka
(row=None)¶ Bases:
schrodinger.application.jaguar.gui.input_tab_widgets.ProjEntry
-
PKA_ATOM_PROP
= 's_m_pKa_atom'¶
-
PKA_VALID
= 0¶
-
PKA_INVALID
= 1¶
-
PKA_MISSING
= 2¶
-
update
(row)¶ Update this entry with information from the provided row
Parameters: row ( schrodinger.project.ProjectRow
) – The project row
-
getStructureWithJagNames
()¶ Return the entry structure with jaguar atom naming applied
Returns: The structure with jaguar atom naming applied Return type: schrodinger.structure.Structure
-
reset
()¶ Reset any user-specified settings
-
checkPkaAtom
()¶ Make sure that a valid pKa atom(s) is specified
Returns: PKA_VALID if all valid pKa atoms are specified, PKA_INVALID if any invalid pKa atom is specified, and PKA_MISSING is no pKa atom is specified. Return type: int
-
getPkaAtom
()¶ Get the currently selected pKa atom(s)
Returns: If the currently selected pKa atom(s) is valid, returns the list of atoms itself. Otherwise, returns None. Return type: list or NoneType
-
-
class
schrodinger.application.jaguar.gui.input_tab_widgets_pka.
ProjEntryTuplePka
(entry_id, struc, charge, spin_mult, pka_atom)¶ Bases:
tuple
-
charge
¶ Alias for field number 2
-
entry_id
¶ Alias for field number 0
-
pka_atom
¶ Alias for field number 4
-
spin_mult
¶ Alias for field number 3
-
struc
¶ Alias for field number 1
-
-
class
schrodinger.application.jaguar.gui.input_tab_widgets_pka.
InputEntriesColumnsPka
¶ Bases:
object
Column constants for the pKa selected entries table
-
HEADERS
= ['ID', 'In', 'Entry Title', 'Charge', 'Spin Mult.', 'pKa Atom']¶
-
NUM_COLS
= 6¶
-
ID
= 0¶
-
INCLUSION
= 1¶
-
TITLE
= 2¶
-
CHARGE
= 3¶
-
SPIN_MULT
= 4¶
-
PKA_ATOM
= 5¶
-
BASIS
= -1¶
-
-
class
schrodinger.application.jaguar.gui.input_tab_widgets_pka.
InputEntriesModelPka
(parent)¶ Bases:
schrodinger.application.jaguar.gui.input_tab_widgets.InputEntriesModel
The data model for the pKa selected entries table
Variables: set_pka_marker ( PyQt5.QtCore.pyqtSignal
) –A signal emitted when a new pKa atom should be marked in the workspace. Emitted with two arguments:
- The entry id of the structure to be marked (str)
- The atom to be marked (
schrodinger.structure._StructureAtom
)
-
COLUMN
¶ alias of
InputEntriesColumnsPka
-
set_pka_marker
¶
-
ROW_CLASS
¶ alias of
ProjEntryPka
-
data
(self, QModelIndex, role: int = Qt.DisplayRole) → Any¶
-
setData
(index, value, role=2)¶ Set data for the specified index. The spin multiplicity tool tip will be shown if an invalid spin multiplicity is set, or if a charge is set that renders the spin multiplicity invalid. (The tool tip explains that the default spin multiplicity is being used because the user-specifed value is invalid.)
Parameters: - index (
PyQt5.QtCore.QModelIndex
) – The index to modify - value – The value to set
- role (int) – The role to set data for. Must be Qt.EditRole or setting will fail.
Returns: True if setting succeeded. False if it failed.
Return type: bool
- index (
-
getStructures
()¶ Get a list of all structures loaded into the table (i.e. all structures selected in the project table) and the associated settings.
Returns: A list of ProjEntryTuple objects Return type: list
-
checkPkaAtoms
()¶ Make sure that all structure have a valid pKa atom selected
Returns: A tuple of - A list of structures with invalid pKa atoms - A list of structures with no pKa atom Return type: tuple
-
addPkaMarkers
(index, start_row, end_row)¶ Add pKa workspace atom markers for the specified rows
Parameters: - index – Not used, but present for Qt compatability
- start_row (int) – The first row to add a pKa marker to
- end_row (int) – The last row to add a pKa marker to
-
removePkaMarkers
(index, start_row, end_row)¶ Remove the pKa workspace atom markers for the specified rows
Parameters: - index – Not used, but present for Qt compatibility
- start_row (int) – The first row to add a pKa marker to
- end_row (int) – The last row to add a pKa marker to
-
class
schrodinger.application.jaguar.gui.input_tab_widgets_pka.
InputEntriesViewPka
(parent)¶ Bases:
schrodinger.application.jaguar.gui.input_tab_widgets.InputEntriesView
The view for the pKa selected entries table
Variables: set_pka_marker ( PyQt5.QtCore.pyqtSignal
) –A signal emitted when a new pKa atom should be marked in the workspace. Emitted with two arguments:
- The entry id of the structure to be marked (str)
- List of atoms (
schrodinger.structure._StructureAtom
) to be marked
-
COLUMN
¶ alias of
InputEntriesColumnsPka
-
set_pka_marker
¶
-
class
schrodinger.application.jaguar.gui.input_tab_widgets_pka.
AtomSelectionDelegate
(parent)¶ Bases:
schrodinger.application.jaguar.gui.input_tab_widgets.CommitMultipleDelegate
,schrodinger.ui.qt.delegates.DefaultMessageDelegate
A delegate for selecting a pKa atom. The atom name can either be typed into the line edit or selected from the workspace. A tool tip containing instructions will appear when the editor is first open and any time the user hovers their mouse over the editor. If the user clicks on an atom from the wrong structure, the atom will be ignored and a tool tip warning will appear. Clicking on an atom does not close the editor so that the user can immediately pick a different atom if desired.
Variables: set_pka_marker ( PyQt5.QtCore.pyqtSignal
) –A signal emitted when a new pKa atom should be marked in the workspace. Emitted with two arguments:
- The entry id of the structure to be marked (str)
- List of atoms (
schrodinger.structure._StructureAtom
) to be marked
-
MAESTRO_STATUS_MESSAGE
= 'Pick an atom to be treated as the pKa atom'¶
-
TOOL_TIP_INSTRUCTIONS
= 'Click an atom in the workspace to\nset it as the pKa atom or type the\natom name here.'¶
-
TOOL_TIP_WRONG_EID
= 'The atom you selected is not\npart of this structure.'¶
-
set_pka_marker
¶
-
createEditor
(self, QWidget, QStyleOptionViewItem, QModelIndex) → QWidget¶
-
setEditorData
(self, QWidget, QModelIndex)¶
-
setModelData
(self, QWidget, QAbstractItemModel, QModelIndex)¶
-
eventFilter
(editor, event)¶ Make sure that the editor doesn’t close when the user clicks on another window since that will prevent the user from being able to click on an atom.
Parameters: - editor (
PyQt5.QtWidgets.QWidget
) – The pKa atom line edit - event – A Qt event
- event –
PyQt5.QtCore.QEvent
Note: We don’t need to worry about the case where the user clicks on a different widget in the pKa panel after selecting an atom. Since the editor was the last widget with focus in the pKa panel, it will receive another FocusOut event when the other widget receives focus, and that FocusOut event will cause the editor to close.
- editor (