Package Pmv :: Module editCommands :: Class SplitNodesCommand
[hide private]
[frames] | no frames]

Class SplitNodesCommand

source code

ViewerFramework.VFCommand.Command --+    
                                    |    
                  mvCommand.MVCommand --+
                                        |
                                       SplitNodesCommand

This class allows the user to split current selection from unselected nodes. 
     
Package:Pmv
    
Module :editCommands
    
Class:SplitNodesCommand
    
Command:splitNodes
    
Synopsis:

        mol<---splitNodes(nodes, levelToSplit, top, renumber=1, **kw)
    
Required Arguments:

        nodes --- TreeNodeSet holding the current selection

        levelToSplit --- the splitting level

        top ---

        renumber --- default is 1

if levelToSplit is Molecule/Protein, the new molecule is returned
OTHERWISE the modified molecule is returned


The split is done at a level above nodes.  If more than one level above nodes exists, 
the user chooses the level at which to split. Result of split depends on the designated
splitting level: 

    splits at the Protein/Molecule level result in a new Protein/Molecule
 
splits at other levels result in adding new nodes to the Protein/Molecule: 

eg. splitting at the chain level adds a new chain to the Protein, etc. etc.


    



Instance Methods [hide private]
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  __call__(self, nodes, levelToSplit, top, renumber=True, **kw)
mol <- splitNodes(nodes, levelToSplit, top, renumber=1, **kw)...
  doit(self, nodes, levelToSplit, top, **kw)
virtual method.

Inherited from mvCommand.MVCommand: __init__, guiCallback, strArg

Inherited from mvCommand.MVCommand (private): _strArg

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


Class Variables [hide private]

Inherited from ViewerFramework.VFCommand.Command: negateKw, objArgOnly


Method Details [hide private]

onAddCmdToViewer(self)

source code 
method called when an instance of this command is added to the viewer. This enable viewer-addition time initializations
Overrides: ViewerFramework.VFCommand.Command.onAddCmdToViewer
(inherited documentation)

__call__(self, nodes, levelToSplit, top, renumber=True, **kw)
(Call operator)

source code 
mol <- splitNodes(nodes, levelToSplit, top, renumber=1, **kw)
           
nodes --- TreeNodeSet holding the current selection
           
levelToSplit --- the splitting level
           
top ---
           
renumber --- default is 1
           
if levelToSplit is Molecule/Protein, the new molecule is returned
           OTHERWISE the modified molecule is returned

Overrides: ViewerFramework.VFCommand.Command.__call__

doit(self, nodes, levelToSplit, top, **kw)

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