schrodinger.application.jaguar.gui.tabs.coordinates module

class schrodinger.application.jaguar.gui.tabs.coordinates.CoordinateData(st, atoms, coordinate_type)

Bases: object

This class is a base class for constraint and scan coordinate classes. It should not(!) be initialized by itself.

Variables:
  • 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
  • COLUMN (object) – class that contains information about columns in which coordinates data is displayed. It should contain NAMES variable for column names and indices of columns. This object needs to be initialize in derived classes.
validate()

This function checks that atom indices contain correct number of elements for a given coordinate type. If thats not the case ValueError exception is raised.

class schrodinger.application.jaguar.gui.tabs.coordinates.CoordinatePicker(coordinate_types, pick_cb, coord_type_combo, pick_combo, parent=None)

Bases: PyQt5.QtCore.QObject

This class is responsible for atom and bond picking. Depending on the type of coordinate it will fill up the list of picked atoms up to a max size for the current coordinate type before emitting a signal.

Variables:
  • pickCompleted (PyQt5.QtCore.pyqtSignal) – A signal emitted when the user picks required number of atoms for current coordinate type. This signal is emitted with a list of picked atoms as an argument.
  • PICK_MAX_ATOMS (dict) – A dictionary that maps mmjag coordinate type to max number of atoms needed to define this coordinate. It should include all coordinate types used in Jaguar Scan and Optimization tabs, where picker is used.
PICK_MAX_ATOMS = OrderedDict([(0, 1), (1, 1), (2, 1), (3, 1), (4, 2), (5, 3), (6, 4)])
PINK = (1.0, 0.8, 0.8)
coordinateTypeChanged()

This slot is called when coordinate type is changed.

pickCompleted
populatePickCombo()

This function repopulates pick combo box depending on the current selection of coordinate type. It also attempts to preserve current pick type selection if possible.

populateTypeCombo()

This function is used to initialize coordinate type combox box.

class schrodinger.application.jaguar.gui.tabs.coordinates.CoordinateTab(parent, input_selector=None)

Bases: schrodinger.application.jaguar.gui.tabs.base_tab.BaseTab

A parent class for the Scan and Optimization tabs

Variables:
  • coordinateAdded (PyQt5.QtCore.pyqtSignal) –

    A signal emitted when user adds new coordinate. The signal is emitted with:

    • a list of atom numbers
    • coordinate type
  • coordinateDeleted (PyQt5.QtCore.pyqtSignal) – A signal emitted when user deletes a coordinate. Emitted with a list of atom numbers.
  • allCoordinatesDeleted (PyQt5.QtCore.pyqtSignal) – A signal emitted when all coordinates are deleted. Emitted with no arguments.
  • coordinateSelected (PyQt5.QtCore.pyqtSignal) – A signal emitted when user selects a coordinate in the table. Emitted with a list of atom numbers for the selected coordinate.
  • coordinateDeselected (PyQt5.QtCore.pyqtSignal) – A signal emitted when user deselects a coordinate in the table. Emitted with a list of atom numbers for the deselected coordinate.
  • refreshMarkers – A signal emitted when the workspace markers should be refreshed, i.e., when we should make sure that only markers for the currently selected tab are displayed.
allCoordinatesDeleted
coordinateAdded
coordinateDeleted
coordinateDeselected
coordinateSelected
refreshMarkers
setAcceptableContraintEids(eids, picking_err)

Set the constraint picking restrictions

Parameters:
  • eids (set) – The entry ids for which coordinate picking is acceptable.
  • picking_err (str or NoneType) – If picking should not be allowed at all, this is the text of the error that will displayed to the user. If picking is allowed, should be None.
setup()
stopPicking()

Stop constraint picking

class schrodinger.application.jaguar.gui.tabs.coordinates.CoordinatesModel(parent=None)

Bases: PyQt5.QtCore.QAbstractTableModel

A base class for cordinates models used for constraint and scan coordinates in Scan and Optimization tabs. This class should not(!) be initialized on its own. This model is used with Qt view.

Variables:COLUMN (object) – class that contains information about columns in which coordinates data is displayed. It should contain NAMES variable for column names and indices of columns. This object needs to be initialize in derived classes.
COLUMN = None
checkNewCoordinate(atoms, coordinate_type)

This function check whether this coordinate is already present in this model.

Parameters:
  • atoms (list) – atom indices
  • coordinate_type (int) – coordinate type
Returns:

True if this coordinate has not been found and False otherwise.

Return type:

bool

columnCount(parent=None)

Return the number of columns in the model

Parameters:parent – Unused, but preset for PyQt compatibility
Returns:The number of columns in the model.
Return type:int
findCoordinate(atoms, coordinate_type)

This function searches for coordinate defined by atoms list and coordinate type. If match is found this function returns row index and None otherwise.

Parameters:
  • atoms (list) – atom indices
  • coordinate_type (int) – coordinate type
Returns:

row index if this coordinate has been found and None otherwise.

Return type:

int or None

headerData(section, orientation, role)

Retrieve the requested header data. This data is used to show Qt view column/row headers.

Parameters:
  • section (int) – The row/column number to retrieve header data for
  • orientation (int) – The orientation of the header (Qt.Horizontal or Qt.Vertical) to retrieve data for
  • role (int) – The role to retrieve header data for
removeCoordinate(atoms, coordinate_type)

This function searches for a given coordinate. If match is found coordinate is removed.

Parameters:
  • atoms (list) – atom indices
  • coordinate_type (int) – coordinate type
Returns:

True if this coordinate was found and removed, False otherwise.

Return type:

bool

removeRow(row, parent=<PyQt5.QtCore.QModelIndex object>)

Removes the given row from the child items of the parent specified. Returns true if the row is removed; otherwise returns false.

Parameters:
  • row (int) – row index
  • index (QtCore.QModelIndex) – parent index
Returns:

True or False

Return type:

bool

reset()

Remove any existing data

rowCount(parent=None)

Return the number of rows in the model

Parameters:parent – Unused, but preset for PyQt compatibility
Returns:The number of rows in the model.
Return type:int