Package Pmv :: Module bondsCommands :: Class BuildBondsByDistance
[hide private]
[frames] | no frames]

Class BuildBondsByDistance

source code

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

This command creates the bonds between atoms of the given set of nodes and connect the residues when necessary. The cut_off distance is based on the bond order radius of the two atoms to be bound. The command will use the bhtree functionality to find the pairs of atoms to be found when available.This command can be applied on a current selection or used interactively when bound to the mouse event.
   
Package : Pmv
   
Module  : bondsCommands
   
Class   : BuildBondsByDistance
   
Command : buildBondsByDistance
   
Synopsis:

        None<---buildBondsByDistance( nodes, display = True, **kw)

   
Required Arguments:
     
        nodes --- any set for MolKit nodes describing molecular components

        display --- when set to 1 the displayLines command is called and th
                 bonds are displayed as lines.

   
Optional Arguments:
        
        kw --- any of the additional optional keywords supported by commands
               (see ViewerFramework.VFCommands.Command documentation).

    
Required Commands:

      displayLines 
    
Known bugs:

      None

    
Examples:

      mol = mv.Mols[ 0 ]

      mv.buildBondsByDistance(mol, display=1)

    



Instance Methods [hide private]
  __init__(self, func=None)
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  doit(self, nodes, display=False)
virtual method.
  __call__(self, nodes, display=False, **kw)
None <- buildBondsByDistance(nodes, display=1,**kw) nodes : TreeNodeSet holding the current selection display : Boolean flag if set to True the displayLines commands are called.
  guiCallback(self, event=None)
Default callback function called by the gui

Inherited from mvCommand.MVCommand: 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

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]

__init__(self, func=None)
(Constructor)

source code 
None
Overrides: mvCommand.MVCommand.__init__

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)

doit(self, nodes, display=False)

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

__call__(self, nodes, display=False, **kw)
(Call operator)

source code 
None <- buildBondsByDistance(nodes, display=1,**kw)
        
nodes   : TreeNodeSet holding the current selection
        
display : Boolean flag if set to True the displayLines 
                  commands are called.
        
The buildBondsByDistance commands connects atoms and residues in the
        given set of nodes based on the covalent radius of each atoms to be
        connected.
        

Overrides: ViewerFramework.VFCommand.Command.__call__

guiCallback(self, event=None)

source code 
Default callback function called by the gui
Overrides: mvCommand.MVCommand.guiCallback