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

Class CoordinatesModel

         object --+                    
                  |                    
  sip.simplewrapper --+                
                      |                
            sip.wrapper --+            
                          |            
       PyQt5.QtCore.QObject --+        
                              |        
PyQt5.QtCore.QAbstractItemModel --+    
                                  |    
   PyQt5.QtCore.QAbstractTableModel --+
                                      |
                                     CoordinatesModel
Known Subclasses:

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.

Nested Classes [hide private]

Inherited from PyQt5.QtCore.QAbstractItemModel: LayoutChangeHint

Instance Methods [hide private]
 
__init__(self, parent=None)
x.__init__(...) initializes x; see help(type(x)) for signature
 
headerData(self, section, orientation, role)
Retrieve the requested header data.
int
rowCount(self, parent=None)
Return the number of rows in the model
int
columnCount(self, parent=None)
Return the number of columns in the model
bool
checkNewCoordinate(self, atoms, coordinate_type)
This function check whether this coordinate is already present in this model.
 
reset(self)
Remove any existing data
bool
removeRow(self, row, parent=QtCore.QModelIndex())
Removes the given row from the child items of the parent specified.
bool
removeCoordinate(self, atoms, coordinate_type)
This function searches for a given coordinate.
int or None
findCoordinate(self, atoms, coordinate_type)
This function searches for coordinate defined by atoms list and coordinate type.

Inherited from PyQt5.QtCore.QAbstractTableModel: dropMimeData, flags, hasChildren, index, parent, sibling

Inherited from PyQt5.QtCore.QAbstractItemModel: beginInsertColumns, beginInsertRows, beginMoveColumns, beginMoveRows, beginRemoveColumns, beginRemoveRows, beginResetModel, buddy, canDropMimeData, canFetchMore, changePersistentIndex, changePersistentIndexList, columnsAboutToBeInserted, columnsAboutToBeMoved, columnsAboutToBeRemoved, columnsInserted, columnsMoved, columnsRemoved, createIndex, data, dataChanged, decodeData, encodeData, endInsertColumns, endInsertRows, endMoveColumns, endMoveRows, endRemoveColumns, endRemoveRows, endResetModel, fetchMore, hasIndex, headerDataChanged, insertColumn, insertColumns, insertRow, insertRows, itemData, layoutAboutToBeChanged, layoutChanged, match, mimeData, mimeTypes, modelAboutToBeReset, modelReset, moveColumn, moveColumns, moveRow, moveRows, persistentIndexList, removeColumn, removeColumns, removeRows, resetInternalData, revert, roleNames, rowsAboutToBeInserted, rowsAboutToBeMoved, rowsAboutToBeRemoved, rowsInserted, rowsMoved, rowsRemoved, setData, setHeaderData, setItemData, sort, span, submit, supportedDragActions, supportedDropActions

Inherited from PyQt5.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChildren, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, objectNameChanged, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr

Inherited from sip.simplewrapper: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
object COLUMN = None
class that contains information about columns in which coordinates data is displayed.

Inherited from PyQt5.QtCore.QAbstractItemModel: HorizontalSortHint, NoLayoutChangeHint, VerticalSortHint

Inherited from PyQt5.QtCore.QObject: staticMetaObject

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent=None)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

headerData(self, 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
Overrides: PyQt5.QtCore.QAbstractItemModel.headerData

rowCount(self, parent=None)

 

Return the number of rows in the model

Parameters:
  • parent - Unused, but preset for PyQt compatibility
Returns: int
The number of rows in the model.
Overrides: PyQt5.QtCore.QAbstractItemModel.rowCount

columnCount(self, parent=None)

 

Return the number of columns in the model

Parameters:
  • parent - Unused, but preset for PyQt compatibility
Returns: int
The number of columns in the model.
Overrides: PyQt5.QtCore.QAbstractItemModel.columnCount

checkNewCoordinate(self, 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: bool
True if this coordinate has not been found and False otherwise.

removeRow(self, row, parent=QtCore.QModelIndex())

 

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: bool
True or False
Overrides: PyQt5.QtCore.QAbstractItemModel.removeRow

removeCoordinate(self, 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: bool
True if this coordinate was found and removed, False otherwise.

findCoordinate(self, 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: int or None
row index if this coordinate has been found and None otherwise.

Class Variable Details [hide private]

COLUMN

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.
Type:
object
Value:
None