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

Class DisplayCPK

source code

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

The displayCPK command allows the user to display/undisplay the given nodes using a CPK representation, where each atom is represented with a sphere. A scale factor and the quality of the spheres are user
    defined parameters.
    
Package : Pmv
    
Module  : displayCommands
    
Class   : DisplayCPK
    
Command : displayCPK
    
Synopsis:

        None <- displayCPK(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)

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

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

    



Instance Methods [hide private]
  onAddCmdToViewer(self)
  onAddObjectToViewer(self, obj)
Adds the cpk geometry and the cpk Atomset to the object's geometry container
  setupUndoBefore(self, nodes, only=False, negate=False, scaleFactor=1.0, cpkRad=0.0, quality=0)
This method builds the self.undoCmds string.
  doit(self, nodes, only=False, negate=False, scaleFactor=1.0, cpkRad=0.0, quality=0)
virtual method.
  cleanup(self)
virtual method.
  __call__(self, nodes, only=False, negate=False, scaleFactor=1.0, cpkRad=0.0, quality=0, **kw)
None <- displayCPK(nodes, only=False, negate=False,scaleFactor=None, cpkRad=0.0, quality=None, **kw)...
  buildFormDescr(self, formName='default')
  guiCallback(self)

Inherited from DisplayCommand: __init__, 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]

Inherited from ViewerFramework.VFCommand.Command: negateKw, objArgOnly


Method Details [hide private]

onAddCmdToViewer(self)

source code 
None
Overrides: DisplayCommand.onAddCmdToViewer

onAddObjectToViewer(self, obj)

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

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

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)

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, only=False, negate=False, scaleFactor=1.0, cpkRad=0.0, quality=0, **kw)
(Call operator)

source code 
None <- displayCPK(nodes, only=False, negate=False,scaleFactor=None, cpkRad=0.0, quality=None, **kw)
           
nodes --- TreeNodeSet holding the current selection
           
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__

buildFormDescr(self, formName='default')

source code 
None
Overrides: DisplayCommand.buildFormDescr

guiCallback(self)

source code 
None
Overrides: DisplayCommand.guiCallback