Package schrodinger :: Package application :: Package jaguar :: Package gui :: Package tabs :: Package sub_tab_widgets :: Module basis_set_widgets :: Class BasisSetModel
[hide private]
[frames] | no frames]

Class BasisSetModel

PyQt4.QtCore.QAbstractTableModel --+    
                                   |    
            base_widgets.SubTabModel --+
                                       |
                                      BasisSetModel

Nested Classes [hide private]
type COLUMN
A class containing column constants for the table.
type ROW_CLASS
The SubTabRow subclass that represents a row of data
Instance Methods [hide private]
object
_displayAndSortData(self, col, basis_row, role)
Retrieve data for the display and sort roles
object
_backgroundData(self, col, row_data)
Mark any invalid basis sets as errors.
object
_setData(self, col, row_data, value, role, row_num)
Set data for the specified index and role.
 
removeRows(self, row, count, parent=None)
dict
perAtomBasisForEid(self, eid, name=False)
Return the per-atom basis sets for the specified entry ID

Inherited from base_widgets.SubTabModel: __init__, addMarkerForRow, addRow, clearDataForEid, columnCount, data, flags, headerData, removeMarkerForRow, reset, rowCount, rowsForEid, setData, updateEntryTitles

Class Variables [hide private]
iterable UNEDITABLE = COLUMN.ATOM, COLUMN.ID, COLUMN.TITLE
A list of all column numbers that should be flagged as uneditable
dict MARKER_SETTINGS = {"color": "orange", "alt_color": "yellow"}
The settings for the workspace markers.
  basisChanged = QtCore.pyqtSignal(str)

Inherited from base_widgets.SubTabModel: ERROR_BACKGROUND_BRUSH

Instance Variables [hide private]

Inherited from base_widgets.SubTabModel: addMarker, removeMarker

Method Details [hide private]

_displayAndSortData(self, col, basis_row, role)

 

Retrieve data for the display and sort roles

Parameters:
  • col - The column to return data for
  • row_data - The ROW_CLASS instance to retrieve data from
  • role - The role to retrieve data for
Returns: object
The requested data
Overrides: base_widgets.SubTabModel._displayAndSortData
(inherited documentation)

_backgroundData(self, col, row_data)

 

Mark any invalid basis sets as errors. Don't color cells where the user hasn't yet entered a basis, since there's already a "Double-click to edit" message in those cells.

See parent class for documentation on the arguments and return value

Parameters:
  • col - The column to return data for
  • row_data - The ROW_CLASS instance to retrieve data from
Returns: object
The requested data
Overrides: base_widgets.SubTabModel._backgroundData

_setData(self, col, row_data, value, role, row_num)

 

Set data for the specified index and role. Note that sub-classes should redefine this method rather than setData whenever possible.

Parameters:
  • col - The column to set data for
  • row_data - The ROW_CLASS instance to modify
  • value - The value to set
  • value - object
  • role - The role to set data for
  • row_num - The row number
Returns: object
False if setting failed. All other values are considered successes.
Overrides: base_widgets.SubTabModel._setData
(inherited documentation)

removeRows(self, row, count, parent=None)

 
Overrides: base_widgets.SubTabModel.removeRows

perAtomBasisForEid(self, eid, name=False)

 

Return the per-atom basis sets for the specified entry ID

Parameters:
  • eid (str) - The entry id
  • name (bool) - If True, the return dictionary keys will be atom names. If False, the keys will be atom numbers.
Returns: dict
A dictionary of {atom number: basis set} or {atom name: basis set}