Package schrodinger :: Package application :: Package jaguar :: Package gui :: Package tabs :: Module coordinates :: Class CoordinateTab
[hide private]
[frames] | no frames]

Class CoordinateTab

PyQt4.QtGui.QWidget --+    
                      |    
       base_tab.BaseTab --+
                          |
                         CoordinateTab

A parent class for the Scan and Optimization tabs

Instance Methods [hide private]
 
setup(self)
Perform tab specific initialization.
list
_getAtomsForRow(self, row_num)
Get the atom indices for the specified row
 
_highlightSelectedMarkers(self, current_sel, previous_sel)
Respond to a change in the selected table rows by changing the currently selected workspace marker
 
_checkSelection(self, sel, signal)
If the specified table selection is not empty, emit the given signal with the atom indices from the selected row.
NoneType or str
_determineIfConstraintsAddable(self)
Determine if the panel, workspace, and project are in a state where we can add constraints.
 
setAcceptableContraintEids(self, eids, picking_err)
Set the constraint picking restrictions
 
stopPicking(self)
Stop constraint picking
 
_resetDefaults(self)
This function resets coordinates table and sets coordinate picking to its default state.
 
_emitCoordinateAdded(self, atoms, coordinate_type)
If a marker doesn't yet exist for the specified atoms, emit the coordinateAdded signal to request that one be created.
 
_emitCoordinateDeleted(self, atoms)
After a constraint has been deleted for the specified atoms, delete the corresponding marker if there are no other constraints for that group of atoms.

Inherited from base_tab.BaseTab: __init__, activate, deactivate, error, getDefaultKeywords, getMmJagKeywords, loadPerAtomSettings, loadSettings, reset, saveSettings, validate, warning

Inherited from base_tab.BaseTab (private): _populateUi

Class Variables [hide private]
PyQt4.QtCore.pyqtSignal coordinateAdded = QtCore.pyqtSignal(list, int)
A signal emitted when user adds new coordinate.
PyQt4.QtCore.pyqtSignal coordinateDeleted = QtCore.pyqtSignal(list)
A signal emitted when user deletes a coordinate.
PyQt4.QtCore.pyqtSignal allCoordinatesDeleted = QtCore.pyqtSignal()
A signal emitted when all coordinates are deleted.
PyQt4.QtCore.pyqtSignal coordinateSelected = QtCore.pyqtSignal(list)
A signal emitted when user selects a coordinate in the table.
PyQt4.QtCore.pyqtSignal coordinateDeselected = QtCore.pyqtSignal(list)
A signal emitted when user deselects a coordinate in the table.
  refreshMarkers = QtCore.pyqtSignal()
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.

Inherited from base_tab.BaseTab: HELP_TOPIC, NAME, UI_MODULES

Instance Variables [hide private]

Inherited from base_tab.BaseTab: input_selector, task_name, ui

Method Details [hide private]

setup(self)

 

Perform tab specific initialization. This function should be defined in subclasses if initialization is needed.

Overrides: base_tab.BaseTab.setup
(inherited documentation)

_getAtomsForRow(self, row_num)

 

Get the atom indices for the specified row

Parameters:
  • row_num (int) - A row number
Returns: list
A list of atom indices

_highlightSelectedMarkers(self, current_sel, previous_sel)

 

Respond to a change in the selected table rows by changing the currently selected workspace marker

Parameters:
  • current_sel (PyQt4.QtGui.QItemSelection) - The new table selection
  • previous_sel (PyQt4.QtGui.QItemSelection) - The previous table selection

_checkSelection(self, sel, signal)

 

If the specified table selection is not empty, emit the given signal with the atom indices from the selected row.

Parameters:
  • sel (PyQt4.QtGui.QItemSelection) - The table selection
  • signal (PyQt4.QtCore.pyqtSignal) - The singal to emit

_determineIfConstraintsAddable(self)

 

Determine if the panel, workspace, and project are in a state where we can add constraints.

Returns: NoneType or str
If we can add constraints, return None. Otherwise, return the text of the error message that should be displayed to the user.

setAcceptableContraintEids(self, 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.

_resetDefaults(self)

 

This function resets coordinates table and sets coordinate picking to its default state. Note that this function is not called reset() since it does not need to be called from the panel class.

_emitCoordinateAdded(self, atoms, coordinate_type)

 

If a marker doesn't yet exist for the specified atoms, emit the coordinateAdded signal to request that one be created. For single atom markers, We use _marker_count to keep track of the the number of constraints per marker. Note that We can only get multiple constraints per markers for single atom markers (i.e. if there's a Coordinate - X constraint and a Coordinate - Y constraint for the same atom)

Parameters:
  • atoms (list) - A list of atom indices for the atoms to mark
  • coordinate_type (int) - The coordinate type

_emitCoordinateDeleted(self, atoms)

 

After a constraint has been deleted for the specified atoms, delete the corresponding marker if there are no other constraints for that group of atoms.

Parameters:
  • atoms (list) - A list of atom indices for the deleted constraint

Class Variable Details [hide private]

coordinateAdded

A signal emitted when user adds new coordinate. The signal is emitted with:
  • a list of atom numbers
  • coordinate type
Type:
PyQt4.QtCore.pyqtSignal
Value:
QtCore.pyqtSignal(list, int)

coordinateDeleted

A signal emitted when user deletes a coordinate. Emitted with a list of atom numbers.
Type:
PyQt4.QtCore.pyqtSignal
Value:
QtCore.pyqtSignal(list)

allCoordinatesDeleted

A signal emitted when all coordinates are deleted. Emitted with no arguments.
Type:
PyQt4.QtCore.pyqtSignal
Value:
QtCore.pyqtSignal()

coordinateSelected

A signal emitted when user selects a coordinate in the table. Emitted with a list of atom numbers for the selected coordinate.
Type:
PyQt4.QtCore.pyqtSignal
Value:
QtCore.pyqtSignal(list)

coordinateDeselected

A signal emitted when user deselects a coordinate in the table. Emitted with a list of atom numbers for the deselected coordinate.
Type:
PyQt4.QtCore.pyqtSignal
Value:
QtCore.pyqtSignal(list)