Package schrodinger :: Package application :: Package matsci :: Module reordergui :: Class StructureFrame
[hide private]
[frames] | no frames]

Class StructureFrame

PyQt4.QtGui.QFrame --+
                     |
                    StructureFrame

A QFrame that contains a 2D image of a structure. This also creates a QListWidget that is coordinated with the 2D image. This is the base class for both the Reference and Comparison structures.

Instance Methods [hide private]
 
__init__(self, master, structure_layout, list_layout, struct=None, mytype=COMPARISON)
Create a StructureFrame instance
 
setLabel(self, guessing=False)
Set the label that describes what the user should do
 
setStructure(self, struct)
Set the structure for this frame.
 
highlightAtom(self, index, guess=False)
Highlight the given atom
 
unmapAtom(self, index)
Mark an atom as unmapped
 
reset(self, reset_structure=True)
Reset to a blank frame, or remove any mapping but keep the structure
bool
isValidAtomIndex(self, index)
Check if this index is a valid atom index for the loaded structure
Method Details [hide private]

__init__(self, master, structure_layout, list_layout, struct=None, mytype=COMPARISON)
(Constructor)

 

Create a StructureFrame instance

Parameters:
  • master (ReorderAtomFrame) - The master Frame for this widget
  • structure_layout (QBoxLayout) - The layout to add this widget to.
  • list_layout (QBoxLayout) - The layout to add the associated ListWidget to.
  • struct (schrodinger.structure.Structure) - The structure for this frame
  • mytype (str) - Either REFERENCE or COMPARISON, the type of structure this Frame applies to.

setLabel(self, guessing=False)

 

Set the label that describes what the user should do

Parameters:
  • guessing (bool) - True if there is currently a guess in place, False if not.

setStructure(self, struct)

 

Set the structure for this frame. Updates the image and the list widget

Parameters:

highlightAtom(self, index, guess=False)

 

Highlight the given atom

Parameters:
  • index (int) - The atom index to highlight
  • guess (bool) - True if this atom is marked by a guess, False if it was marked by the user. The background color used depends on this parameter.

unmapAtom(self, index)

 

Mark an atom as unmapped

Parameters:
  • index (int) - The atom index to mark

reset(self, reset_structure=True)

 

Reset to a blank frame, or remove any mapping but keep the structure

Parameters:
  • reset_structure - True if the structure should be reset, False if it should be kept
  • reset_structures (bool)

isValidAtomIndex(self, index)

 

Check if this index is a valid atom index for the loaded structure

Parameters:
  • index (int) - The atom index to check
Returns: bool
True 0 < index <= atom_total, False otherwise