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

Class DisplaySticksAndBalls

source code

 ViewerFramework.VFCommand.Command --+        
                                     |        
                   mvCommand.MVCommand --+    
                                         |    
ViewerFramework.VFCommand.ICOM --+       |    
                                 |       |    
                  mvCommand.MVICOM --+   |    
                                     |   |    
                  mvCommand.MVAtomICOM --+    
                                         |    
                            DisplayCommand --+
                                             |
                                            DisplaySticksAndBalls
Known Subclasses:
DisplayBackboneTrace, DisplaySSSB

The displaySticksAndBalls command allows the user to display/undisplay
the given nodes using the sticks and balls representation, where the bonds are
represented by cylinders and the atoms by balls.The radii of the cylinders and
the balls, and the quality of the spheres are user defined. The user can chose
to display or not the balls.
Package : Pmv
Module  : displayCommands
Class   : DisplaySticksAndBalls
Command : displaySticksAndBalls
Synopsis:
    None <--- displaySticksAndBalls(nodes,  only=0, negate=0,
                                    sticksBallsLicorice='Sticks and Balls',
                                    bradii=0.4, bquality=0, cradius=0.2,
                                    absolute=1, **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

    sticksBallsLicorice --- String specifying the type of rendering
    cradius --- specifies the cylinder radius

    bradii --- specifies the radius of the balls if displayed.
    bquality --- specifies the quality of the balls if displayed.
    keywords --- display sticks and balls representation



Instance Methods [hide private]
  onRemoveObjectFromViewer(self, mol)
  onAddObjectToViewer(self, obj)
  setupUndoBefore(self, nodes, only=False, negate=False, bRad=0.3, bScale=0.0, bquality=0, cradius=0.2, cquality=0, absolute=True, sticksBallsLicorice='Sticks and Balls')
This method builds the self.undoCmds string.
  doit(self, nodes, only=False, negate=False, bRad=0.3, bScale=0.0, bquality=0, cradius=0.2, cquality=0, sticksBallsLicorice='Sticks and Balls', **kw)
virtual method.
  cleanup(self)
virtual method.
  ballsAndLicorice_cb(self, sticksBallsLicorice=None)
  buildFormDescr(self, formName='default', title="Display sticks and balls")
This is where descr gets created.
  guiCallback(self)
  __call__(self, nodes, only=False, negate=False, bRad=0.3, bScale=0.0, bquality=0, cradius=0.2, cquality=0, sticksBallsLicorice='Sticks and Balls', **kw)
None <- displaySticksAndBalls(nodes, only=False, negate=False, noballs=False, bRad=0.3,bScale=0.0, bquality=4, cradius=0.2, absolute=True, **kw) nodes --- any set of MolKit nodes describing molecular components only --- flag to only display the current selection negate --- flag to undisplay the current selection noballs --- flag to undisplay the balls of the current selection bRad --- defines the radius of the balls bScale --- defines the scale factor to be applied to the atom radius to compute the sphere radius.

Inherited from DisplayCommand: __init__, getFormValues, getLastUsedValues, getNodes, handleDisplayValue, handleNegateOnly, onAddCmdToViewer, 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]

onRemoveObjectFromViewer(self, mol)

source code 
None

onAddObjectToViewer(self, obj)

source code 
None

setupUndoBefore(self, nodes, only=False, negate=False, bRad=0.3, bScale=0.0, bquality=0, cradius=0.2, cquality=0, absolute=True, sticksBallsLicorice='Sticks and Balls')

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, bRad=0.3, bScale=0.0, bquality=0, cradius=0.2, cquality=0, sticksBallsLicorice='Sticks and Balls', **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)

ballsAndLicorice_cb(self, sticksBallsLicorice=None)

source code 
None

buildFormDescr(self, formName='default', title="Display sticks and balls")

source code 
This is where descr gets created. It is called for each formName if the associated form doesn't already exists. If a command has several form buildFormDescr will be called for each formName.
Overrides: DisplayCommand.buildFormDescr

guiCallback(self)

source code 
None
Overrides: DisplayCommand.guiCallback

__call__(self, nodes, only=False, negate=False, bRad=0.3, bScale=0.0, bquality=0, cradius=0.2, cquality=0, sticksBallsLicorice='Sticks and Balls', **kw)
(Call operator)

source code 
None <- displaySticksAndBalls(nodes, only=False, negate=False,
                                      noballs=False, bRad=0.3,bScale=0.0,
                                      bquality=4, cradius=0.2,
                                      absolute=True, **kw)
        
nodes --- any set of MolKit nodes describing molecular components
        
only  --- flag to only display the current selection
        
negate  --- flag to undisplay the current selection
        
noballs --- flag to undisplay the balls of the current selection
        
bRad  --- defines the radius of the balls
        
bScale --- defines the scale factor to be applied to the atom radius to
                  compute the sphere radius. (sphere radius = bRad + atom.radius *bScale)
        
bquality --- defines the quality of the balls
        
cradius --- defines the cylinder radius
        
absolute --- flag to get absolute or not radii for the atoms
        

Overrides: ViewerFramework.VFCommand.Command.__call__