schrodinger.application.jaguar.gui.tabs.scan_tab module¶
- class schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinateColumns¶
Bases:
object
Constants for the full (i.e. hidden as well) table columns
- NAMES = ('Atom Indices', 'Coordinate', 'Type', 'Steps', 'Fixed Value', 'Current Value', 'Starting Value', 'Final Value', 'Increment')¶
- NUM_COLS = 9¶
- INDICES = 0¶
- COORD_NAME = 1¶
- COORD_TYPE = 2¶
- STEPS = 3¶
- FIXED_VALUE = 4¶
- CURRENT_VAL = 5¶
- START_VAL = 6¶
- FINAL_VAL = 7¶
- INCREMENT = 8¶
- class schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinatesProxyModel(parent)¶
Bases:
PyQt6.QtCore.QSortFilterProxyModel
A proxy model that allows to hide columns.
- COLUMN = <schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinateColumns object>¶
- VISIBLE_COLUMNS = (1, 2, 3)¶
- __init__(parent)¶
- filterAcceptsColumn(column, index)¶
Modified from the parent class to define columns that should be visible.
- Parameters
column (int) – the column index
index (
QModelIndex
) – Unused, but kept for PyQt compatibility
- class schrodinger.application.jaguar.gui.tabs.scan_tab.RelaxedScanCoordinatesProxyModel(parent)¶
Bases:
schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinatesProxyModel
A proxy model that allows to hide columns in Relaxed Coordinate Scan tab.
- COLUMN = <schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinateColumns object>¶
- VISIBLE_COLUMNS = (1, 2, 3, 4)¶
- class schrodinger.application.jaguar.gui.tabs.scan_tab.ScanTab(parent, input_selector=None)¶
Bases:
schrodinger.application.jaguar.gui.tabs.coordinates.CoordinateTab
- NAME = 'Scan'¶
- HELP_TOPIC = 'JAGUAR_TOPIC_SCAN_FOLDER'¶
- UI_MODULES = (<module 'schrodinger.application.jaguar.gui.ui.scan_tab_ui' from '/scr/buildbot/savedbuilds/2024-3/NB/build-133/internal/lib/python3.11/site-packages/schrodinger/application/jaguar/gui/ui/scan_tab_ui.py'>,)¶
- COLUMN = <schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinateColumns object>¶
- PROXY_MODEL_CLASS¶
alias of
schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinatesProxyModel
- MAX_ROW_COUNT = 5¶
- ALLOW_SCAN_CONSTRAINT = False¶
- setup()¶
Perform tab specific initialization. This function should be defined in subclasses if initialization is needed.
- getMmJagKeywords()¶
This function returns dictionary of mmjag keywords for this tab. Since this tab does not set any keywords it returns an empty dictionary.
- Returns
mmjag keywords dictionary
- Return type
dict
- loadSettings(jag_input)¶
Restore scan coordinates settings from Jaguar handle.
- Parameters
jag_input (
schrodinger.application.jaguar.input.JaguarInput
) – The Jaguar settings to base the tab settings on
- saveSettings(jag_input, eid=None)¶
Save scan coordinate settings in jaguar handle.
See parent class for argumnet documentation
- updateMapperWidgets(selected, deselected)¶
This slot is called when selection in coordinates table is changed.
- Parameters
selected (
QtCore.QItemSelection
) – selected indicesdeselected (
QtCore.QItemSelection
) – deselected indices
- enableSelectedCoordinates(enable)¶
This function is called to enable/disable widgets in ‘selected coordinate’ box. When enable argument is False we also clear text in all widgets.
- Parameters
enable (bool) – True/False to enable/disable widgets
- deleteCurrentRow()¶
This function is called to delete row which is currently selected from the coordinates table.
- deleteAllRows()¶
This function is called to delete all rows from the coordinates table.
- validateCoordinateScanRange()¶
Ensure that the start value is always less than the final value.
If the user has entered a new start value greater than the current final value, or a new final value less than the current start value, swap the current and start values in the UI and update the model.
- addCoordinate(st, atoms, coordinate_type, start_value=None, final_value=None, increment=None, const_type=4)¶
Add new coordinate row.
- Parameters
st (
schrodinger.structure.Structure
) – structureatoms (list) – atom indices
coordinate_type (int) – coordinate type
start_value (float) – starting coordinate value
final_value (float) – final coordinate value
increment (float) – increment value
- updateTotalStructures()¶
Calculate total number of structures to be calculated and update the label.
- pickCompleted(atoms)¶
This slot is called when required number of atoms for the current coordinate type has been picked.
- Parameters
atoms (list) – list of atom indices
- class schrodinger.application.jaguar.gui.tabs.scan_tab.ScanTabNextGeom(parent, input_selector=None)¶
Bases:
schrodinger.application.jaguar.gui.tabs.scan_tab.ScanTab
A scan tab that allows the user to configure how the determine the next initial geometry
- COLUMN = <schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinateColumns object>¶
- PROXY_MODEL_CLASS¶
alias of
schrodinger.application.jaguar.gui.tabs.scan_tab.RelaxedScanCoordinatesProxyModel
- UI_MODULES = (<module 'schrodinger.application.jaguar.gui.ui.scan_tab_ui' from '/scr/buildbot/savedbuilds/2024-3/NB/build-133/internal/lib/python3.11/site-packages/schrodinger/application/jaguar/gui/ui/scan_tab_ui.py'>, <module 'schrodinger.application.jaguar.gui.ui.scan_tab_nextgeom_ui' from '/scr/buildbot/savedbuilds/2024-3/NB/build-133/internal/lib/python3.11/site-packages/schrodinger/application/jaguar/gui/ui/scan_tab_nextgeom_ui.py'>)¶
- class NextGeomFrom(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
enum.Enum
- Init = 1¶
- Prev = 2¶
- ALLOW_SCAN_CONSTRAINT = True¶
- setup()¶
Perform tab specific initialization. This function should be defined in subclasses if initialization is needed.
- reset()¶
Reset the tab to its original state. Note that this function is only necessary for settings that are not stored in the mmjag handle. For mmjag settings, reset will be carried out using
loadSettings
with a defaultschrodinger.application.jaguar.input.JaguarInput
object. This function should only be defined in subclasses if there are any settings that cannot be reset vialoadSettings
.
- nextGeom()¶
Return the setting for the next initial geometry
- Returns
The next initial geometry settings
- Return type
- class schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinateData(st, atoms, coordinate_type, start_value=None, final_value=None, increment=None, fixed_value=False)¶
Bases:
schrodinger.application.jaguar.gui.tabs.coordinates.CoordinateData
This class stores all data for a single scan coordinate.
- Variables
COORDINATE_FUNCS (dict) – dictionary that maps coordinate type to mmct function uses to calculate coordinate value.
st (
schrodinger.structure.Structure
) – ct structure for which coordinates are definedatom_indices (list) – indices of atoms, which define this coordinate
coordinate_name (str) – name of this coordinate based on atom indices
coordinate_type (int) – coordinate type
num_steps (int) – number of steps
current_value (float) – current value of this coordinate
start_value (float) – starting coordinate value
final_value (float) – final coordinate value
increment (float) – increment value
- COORDINATE_FUNCS = {0: <built-in function mmct_atom_get_x>, 1: <built-in function mmct_atom_get_y>, 2: <built-in function mmct_atom_get_z>, 4: <built-in function mmct_atom_get_distance>, 5: <built-in function mmct_atom_get_bond_angle>, 6: <built-in function mmct_atom_get_dihedral_angle>}¶
- COORDINATE_DISTANCE_OFFSET = 0.2¶
- COORDINATE_DISTANCE_INCREMENT = 0.1¶
- COORDINATE_ANGLE_OFFSET = 20.0¶
- COORDINATE_ANGLE_INCREMENT = 5.0¶
- __init__(st, atoms, coordinate_type, start_value=None, final_value=None, increment=None, fixed_value=False)¶
Initialize coordinates data given a structure, set of atom indices and coordinate type.
- Parameters
st (
schrodinger.structure.Structure
) – structureatoms (list) – atom indices
coordinate_type (int) – coordinate type
start_value (float) – starting coordinate value
final_value (float) – final coordinate value
increment (float) – increment value
fixed_value (bool) – ‘fixed value’ data
- class schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinatesDelegate¶
Bases:
PyQt6.QtWidgets.QItemDelegate
This delegate is used to define how float coordinate values are displayed in a line edit widget. This class is needed for mapping between table view and other widgets as defined via QDataWidgetMapper.
- COLUMN = <schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinateColumns object>¶
- setEditorData(editor, index)¶
This function is used to initialize editor with the relevant data.
- Parameters
editor (
QtWidgets.QWidget
) – editorindex (
QtCore.QModelIndex
) – index of data in source model
- setModelData(editor, model, index)¶
This function is responsible for transferring data from the editors back to the model. So, here we convert text string into float number.
- Parameters
editor (
QtWidgets.QWidget
) – editormodel (
QtCore.QAbstractItemModel
) – data modelindex (
QtCore.QModelIndex
) – index of data in source model
- class schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinatesModel(parent=None)¶
Bases:
schrodinger.application.jaguar.gui.tabs.coordinates.CoordinatesModel
A model to store scan tab coordinates data.
- COLUMN = <schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinateColumns object>¶
- addCoordinate(st, atoms, coordinate_type, start_value=None, final_value=None, increment=None, fixed_value=True)¶
Add new coordinate row.
- Parameters
st (
schrodinger.structure.Structure
) – structureatoms (list) – atom indices
coordinate_type (int) – coordinate type
start_value (float) – starting coordinate value
final_value (float) – final coordinate value
increment (float) – increment value
fixed_value (bool) – whether fixed value or dynamic constraint should be used
- Returns
returns True if this is a new coordinate and False otherwise.
- Return type
bool
- data(index, role=ItemDataRole.DisplayRole)¶
Retrieve the requested data
- Parameters
index (
PyQt5.QtCore.QModelIndex
) – The index to retrieve data forrole (int) – The role to retrieve data for
- Returns
The requested data
- setData(index, value, role=ItemDataRole.EditRole)¶
Modify coordinate values.
- Parameters
index (
QtCore.QModelIndex
) – the index of table cellvalue – new value
role (int) – The role to set data for.
- flags(index)¶
See base class for documentation.