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

Class DisplayLines

source code

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

The displayLines allows the user to display/undisplay the selected nodes using a lines for bonded atoms, dots for non bonded atoms and doted lines for an aromatic ring. The number of lines when representing a bond will vary depending on the bondOrder.
    
Package : Pmv
    
Module  : displayCommands
    
Class   : DisplayLines
    
Command : displayLines
    
Synopsis:

    None <--- displayLines(self, nodes, lineWidth=2, displayBO = 1, only = 0,
                         negate = 0, **kw)

    
Required Arguments:

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


    
Optional Arguments:

    lineWidth --- int specifying the width of the lines, dots or doted lines
                 representing the selection. (default = 2)

    displayBO --- boolean flag specifying whether or not to display the
                 bond order (default = False)

    only   --- boolean flag specifying whether or not to display only the
                 current selection. (default = False)

    negate --- boolean flag  specifying whether or not to negate the current
                 selection. (default = False)

                 

    keywords: display wireframe, lines, bond order, non bonded atoms.
    



Instance Methods [hide private]
  onAddObjectToViewer(self, obj)
Creates the lines, the points , the dotted lines and the bond order lines geometries and add these new geometries to the geomContainer.geoms of the new molecule.
  atomPropToVertices(self, geom, atms, propName, propIndex=None)
Function called to compute the array of properties
  setupUndoBefore(self, nodes, only=False, negate=False, displayBO=False, lineWidth=2)
This method builds the self.undoCmds string.
  __call__(self, nodes, lineWidth=2, displayBO=False, only=False, negate=False, **kw)
None <- displayLinesBO(self, nodes, lineWidth=2, displayBO=False,only=False, negate=False, **kw) Required Arguments: nodes --- any set of MolKit nodes describing molecular components Optional Arguments: lineWidth --- int specifying the width of the lines, dots or doted lines representing the selection.
  doit(self, nodes, lineWidth=2, displayBO=False, only=False, negate=False, **kw)
virtual method.
  buildFormDescr(self, formName='default')
  guiCallback(self)
  onRemoveObjectFromViewer(self, mol)
Function to remove the sets able to reference a TreeNode created in this command : Here remove bbDisconnactedAfter created for each chains and bonds created for each elements of each level in buildBondsByDistance.
  cleanup(self)
Method called by afterDoit to cleanup things eventhough doit failes

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]

onAddObjectToViewer(self, obj)

source code 
Creates the lines, the points , the dotted lines and the bond order lines geometries and add these new geometries to the geomContainer.geoms of the new molecule. New AtomSet are created as well and added to the geomContainer.atoms

atomPropToVertices(self, geom, atms, propName, propIndex=None)

source code 
Function called to compute the array of properties

setupUndoBefore(self, nodes, only=False, negate=False, displayBO=False, lineWidth=2)

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)

__call__(self, nodes, lineWidth=2, displayBO=False, only=False, negate=False, **kw)
(Call operator)

source code 
None <- displayLinesBO(self, nodes, lineWidth=2, displayBO=False,only=False, negate=False, **kw)

        
Required Arguments:

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


        
Optional Arguments:

        lineWidth --- int specifying the width of the lines, dots or doted lines
                     representing the selection. (default = 2)

        displayBO --- boolean flag specifying whether or not to display the
                     bond order (default = False)

        only --- boolean flag specifying whether or not to display only
                     the current selection. (default = False)

        negate --- boolean flag specifying whether or not to negate the
                     current selection. (default = False)

        

Overrides: ViewerFramework.VFCommand.Command.__call__

doit(self, nodes, lineWidth=2, displayBO=False, only=False, negate=False, **kw)

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

buildFormDescr(self, formName='default')

source code 
None
Overrides: DisplayCommand.buildFormDescr

guiCallback(self)

source code 
None
Overrides: DisplayCommand.guiCallback

onRemoveObjectFromViewer(self, mol)

source code 
Function to remove the sets able to reference a TreeNode created in this command : Here remove bbDisconnactedAfter created for each chains and bonds created for each elements of each level in buildBondsByDistance.

cleanup(self)

source code 
Method called by afterDoit to cleanup things eventhough doit failes
Overrides: ViewerFramework.VFCommand.Command.cleanup