Package Pmv :: Module displayCommands :: Class DisplayCPKByProperty
[hide private]
[frames] | no frames]

Class DisplayCPKByProperty

source code

 ViewerFramework.VFCommand.Command --+        
                                     |        
                   mvCommand.MVCommand --+    
                                         |    
ViewerFramework.VFCommand.ICOM --+       |    
                                 |       |    
                  mvCommand.MVICOM --+   |    
                                     |   |    
                  mvCommand.MVAtomICOM --+    
                                         |    
                            DisplayCommand --+
                                             |
                                            DisplayCPKByProperty

The displayCPKByProperty command allows the user to specify a property used to display/undisplay the given nodes using a CPK representation, where each atom is represented with a sphere whose radius is set by the particular value of the property for that atom. A scale factor and the quality of the spheres are also used.
    defined parameters.
    
Package : Pmv
    
Module  : displayCommands
    
Class   : DisplayCPKByProperty
    
Command : displayCPKByProperty
    
Synopsis:

        None <- displayCPKByProperty(nodes, only=False, negate=False, 
                           scaleFactor=None, quality=None, **kw)

        nodes --- any set of MolKit nodes describing molecular components

        only --- Boolean flag specifying whether or not to only display
                     the current selection

        negate --- Boolean flag specifying whether or not to undisplay
                     the current selection

        scaleFactor --- specifies a scale factor that will be applied to the atom
                     radii to compute the spheres radii. (default is 1.0)

        property ---  property name of type integer or float or property defined by a 
                     function returning a list of float or int.

        quality  --- specifies the quality of the spheres. (default 10)

        keywords --- display, CPK, space filling, undisplay.

    



Instance Methods [hide private]
  __init__(self, func=None)
  onAddCmdToViewer(self)
  getPropValues(self, nodes, prop, propertyLevel=None)
  onAddObjectToViewer(self, obj)
Adds the cpkByProp geometry and the cpkByProp Atomset to the object's geometry container
  setupUndoBefore(self, nodes, only=False, negate=False, scaleFactor=1.0, cpkRad=0.0, quality=0, **kw)
This method builds the self.undoCmds string.
  doit(self, nodes, only=False, negate=False, scaleFactor=1.0, cpkRad=0.0, quality=0, **kw)
virtual method.
  cleanup(self)
virtual method.
  __call__(self, nodes, property, only=False, negate=False, scaleFactor=1.0, cpkRad=0.0, quality=0, **kw)
None <- displayCPKByProperty(nodes, property, only=False, negate=False,scaleFactor=None, cpkRad=0.0, quality=None, **kw)...
  updateLevel_cb(self, tag)
  updateChooser(self, selection)
  getPropValues2(self, nodes, function, lambdaFunc)
  updateMiniMaxi(self, cmName, event=None)
  updateValMinMax(self, event=None)
  updatePropVals(self, event=None)
  updateCM(self, event=None)
  buildFormDescr(self, formName='default')
  guiCallback(self)

Inherited from DisplayCommand: getFormValues, getLastUsedValues, getNodes, handleDisplayValue, handleNegateOnly, setLastUsedValues, updateGeom

Inherited from mvCommand.MVCommand: strArg

Inherited from mvCommand.MVCommand (private): _strArg

Inherited from ViewerFramework.VFCommand.Command: __repr__, addCallbackAfter, addCallbackBefore, addUndoCall, afterDoit, beforeDoit, buildLogArgList, checkDependencies, customizeGUI, doitWrapper, getArguments, getHelp, getLogArgs, getValNamedArgs, log, logString, onAddNewCmd, onCmdRun, setupUndoAfter, showForm, tkCb, warningMsg

Inherited from mvCommand.MVAtomICOM: getObjects

Inherited from ViewerFramework.VFCommand.ICOM: initICOM, startICOM, stopICOM


Class Variables [hide private]
  levelOrder = {'Residue': 1, 'Molecule': 3, 'Chain': 2, 'Atom': 0}

Inherited from ViewerFramework.VFCommand.Command: negateKw, objArgOnly


Method Details [hide private]

__init__(self, func=None)
(Constructor)

source code 
None
Overrides: DisplayCommand.__init__

onAddCmdToViewer(self)

source code 
None
Overrides: DisplayCommand.onAddCmdToViewer

getPropValues(self, nodes, prop, propertyLevel=None)

source code 
None

onAddObjectToViewer(self, obj)

source code 
Adds the cpkByProp geometry and the cpkByProp Atomset to the object's geometry container

setupUndoBefore(self, nodes, only=False, negate=False, scaleFactor=1.0, cpkRad=0.0, quality=0, **kw)

source code 
This method builds the self.undoCmds string. This method should have the same signature than the __call__. When this string is executed it should undo the actions of this command. This string will be appended to the undoCmdStack list if the command is successfuly carried out. This method handles only commands with the negateKw. Other commands have to overwrite it.
Overrides: ViewerFramework.VFCommand.Command.setupUndoBefore
(inherited documentation)

doit(self, nodes, only=False, negate=False, scaleFactor=1.0, cpkRad=0.0, quality=0, **kw)

source code 
virtual method. Has to be implemented by the sub classes
Overrides: ViewerFramework.VFCommand.Command.doit
(inherited documentation)

cleanup(self)

source code 
virtual method. Has to be implemented by sub classes if some things need to be clean up after doit has been executed. Will be called by doitWrapper
Overrides: ViewerFramework.VFCommand.Command.cleanup
(inherited documentation)

__call__(self, nodes, property, only=False, negate=False, scaleFactor=1.0, cpkRad=0.0, quality=0, **kw)
(Call operator)

source code 
None <- displayCPKByProperty(nodes, property,  only=False, negate=False,scaleFactor=None, cpkRad=0.0, quality=None, **kw)
           
nodes --- TreeNodeSet holding the current selection
           
property --- property used to set radii
           
only --- Boolean flag when True only the current selection will be
                    displayed
           
negate --- Boolean flag when True undisplay the current selection
           
scaleFactor --- value used to compute the radii of the sphere representing the atom (Sphere Radii = cpkRad + atom.radius * scaleFactor (default is 1.0)
           
cpkRad --- value used to compute the radii of the sphere representing the atom (Sphere Radii = cpkRad + atom.radius * scaleFactor (default 0.0)
           
quality --- sphere quality default value is 10

Overrides: ViewerFramework.VFCommand.Command.__call__

updateLevel_cb(self, tag)

source code 
None

updateChooser(self, selection)

source code 
None

getPropValues2(self, nodes, function, lambdaFunc)

source code 
None

updateMiniMaxi(self, cmName, event=None)

source code 
None

updateValMinMax(self, event=None)

source code 
None

updatePropVals(self, event=None)

source code 
None

updateCM(self, event=None)

source code 
None

buildFormDescr(self, formName='default')

source code 
None
Overrides: DisplayCommand.buildFormDescr

guiCallback(self)

source code 
None
Overrides: DisplayCommand.guiCallback

Class Variable Details [hide private]

levelOrder

None
Value:
{'Residue': 1, 'Molecule': 3, 'Chain': 2, 'Atom': 0}