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', 'Current Value', 'Starting Value', 'Final Value', 'Increment')
NUM_COLS = 8
INDICES = 0
COORD_NAME = 1
COORD_TYPE = 2
STEPS = 3
CURRENT_VAL = 4
START_VAL = 5
FINAL_VAL = 6
INCREMENT = 7
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/2018-2/NB/build-169/internal/lib/python3.6/site-packages/schrodinger/application/jaguar/gui/ui/scan_tab_ui.py'>,)
COLUMN = <schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinateColumns object>
MAX_ROW_COUNT = 5
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 indices
  • deselected (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.

addCoordinate(st, atoms, coordinate_type, start_value=None, final_value=None, increment=None)

Add new coordinate row.

Parameters:
  • st (schrodinger.structure.Structure) – structure
  • atoms (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

UI_MODULES = (<module 'schrodinger.application.jaguar.gui.ui.scan_tab_ui' from '/scr/buildbot/savedbuilds/2018-2/NB/build-169/internal/lib/python3.6/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/2018-2/NB/build-169/internal/lib/python3.6/site-packages/schrodinger/application/jaguar/gui/ui/scan_tab_nextgeom_ui.py'>)
class NextGeomFrom

Bases: enum.Enum

An enumeration.

Init = 1
Prev = 2
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 default schrodinger.application.jaguar.input.JaguarInput object. This function should only be defined in subclasses if there are any settings that cannot be reset via loadSettings.

nextGeom()

Return the setting for the next initial geometry

Returns:The next initial geometry settings
Return type:NextGeomFrom
class schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinateData(st, atoms, coordinate_type, start_value=None, final_value=None, increment=None)

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 defined
  • atom_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
class schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinatesDelegate

Bases: PyQt5.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) – editor
  • index (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) – editor
  • model (QtCore.QAbstractItemModel) – data model
  • index (QtCore.QModelIndex) – index of data in source model
class schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinatesProxyModel(parent)

Bases: PyQt5.QtCore.QSortFilterProxyModel

A proxy model that allows to hide columns.

COLUMN = <schrodinger.application.jaguar.gui.tabs.scan_tab.ScanCoordinateColumns object>
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.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)

Add new coordinate row.

Parameters:
  • st (schrodinger.structure.Structure) – structure
  • atoms (list) – atom indices
  • coordinate_type (int) – coordinate type
  • start_value (float) – starting coordinate value
  • final_value (float) – final coordinate value
  • increment (float) – increment value
Returns:

returns True if this is a new coordinate and False otherwise.

Return type:

bool

data(index, role=0)

Retrieve the requested data

Parameters:
  • index (PyQt5.QtCore.QModelIndex) – The index to retrieve data for
  • role (int) – The role to retrieve data for
Returns:

The requested data

setData(index, value, role=2)

Modify coordinate values.

Parameters:
  • index (QtCore.QModelIndex) – the index of table cell
  • value – new value
  • role (int) – The role to set data for.