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

Class CoordinatePicker

       object --+                
                |                
sip.simplewrapper --+            
                    |            
          sip.wrapper --+        
                        |        
     PyQt4.QtCore.QObject --+    
                            |    
            Qt.QtCore.QObject --+
                                |
                               CoordinatePicker

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.

Instance Methods [hide private]
 
pickCompleted(...)
A signal emitted when the user picks required number of atoms for current coordinate type.
 
__init__(self, coordinate_types, pick_cb, coord_type_combo, pick_combo, parent=None)
Picker class initializer.
 
populateTypeCombo(self)
This function is used to initialize coordinate type combox box.
 
populatePickCombo(self)
This function repopulates pick combo box depending on the current selection of coordinate type.
 
coordinateTypeChanged(self)
This slot is called when coordinate type is changed.
 
_pickAtom(self, atom_or_asl)
This function is called when atom or atoms are picked.
 
_pickBond(self, atom1, atom2)
This function is called when bond is picked.
 
_checkPicked(self)
This function checks the number of currently picked atoms.
 
_setASL(self)
This function is used to show markers in the workspace for a set of currently picked atoms.
 
_pickChanged(self, index)
This function is called when we switch between atom and bond picking.
 
_clearPicked(self)
This function clears the list of picked atoms and remove markers from the workspace.

Inherited from Qt.QtCore.QObject: connect, emit

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

Inherited from sip.simplewrapper: __new__

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

Class Variables [hide private]
  PINK = (1.0, 0.8, 0.8)
dict PICK_MAX_ATOMS = OrderedDict([(0, 1), (1, 1), (2, 1), (3, 1), ...
A dictionary that maps mmjag coordinate type to max number of atoms needed to define this coordinate.

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

pickCompleted(...)

 
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.

__init__(self, coordinate_types, pick_cb, coord_type_combo, pick_combo, parent=None)
(Constructor)

 

Picker class initializer.

Parameters:
  • coordinate_types (collections.OrderedDict) - ordered dictionary that contains coordinate types that should be made available in the picker.
  • pick_cb (QtWidgets.QCheckBox) - check box used to pick atoms or bonds
  • coord_type_combo (QtWidgets.QComboBox) - combo box that allows to select coordinate type such as distance, angle etc.
  • pick_combo (QtWidgets.QComboBox) - combo box that allows to select pick type: atom or bond.
Overrides: object.__init__

populatePickCombo(self)

 

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.

_pickAtom(self, atom_or_asl)

 

This function is called when atom or atoms are picked.

Parameters:
  • atom_or_asl (int or str) - atom number of the picked atom or ASL string.

_pickBond(self, atom1, atom2)

 

This function is called when bond is picked.

Parameters:
  • atom1 (int) - atom number of the first bond atom
  • atom2 (int) - atom number of the second bond atom

_checkPicked(self)

 

This function checks the number of currently picked atoms. If we have enough atoms to define coordinate of the current type pickCompleted signal is emitted and list of currently picked atoms is cleared.


Class Variable Details [hide private]

PICK_MAX_ATOMS

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.
Type:
dict
Value:
OrderedDict([(0, 1), (1, 1), (2, 1), (3, 1), (4, 2), (5, 3), (6, 4)])