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

Class AddBondsCommand

source code

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


    The AddBondsCommand is a command to connect two given atoms.This command will not allow the creation inter-molecular bonds.This command doesn't have a GUI interface and can only be called through the pyShell.
   
Package : Pmv
   
Module  : bondsCommands
   
Class   : AddBondsCommand
   
Command : addBonds
   
Synopsis:

        None<-addBonds(atom1,atom2)

   
Required Arguments:
    
     atom1  : first atom

     atom2  : second atom 

   
Optional Arguments:
  
     bondOrder : Integer specifying the bondOrder of the bond that is going to be created between atom1 and atom2.The bondOrder by default is 1.

     origin  : string describing how bond was specified 
 
    



Instance Methods [hide private]
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  setupUndoBefore(self, atom1, atom2, bondOrder=1, origin='UserDefined')
This method builds the self.undoCmds string.
  undo(self, atom1, atom2, **kw)
  __call__(self, atom1, atom2, bondOrder=1, origin='UserDefined', **kw)
None<-addBonds(atom1, atom2)
  doit(self, atom1, atom2, **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, 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)

setupUndoBefore(self, atom1, atom2, bondOrder=1, origin='UserDefined')

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)

undo(self, atom1, atom2, **kw)

source code 
None

__call__(self, atom1, atom2, bondOrder=1, origin='UserDefined', **kw)
(Call operator)

source code 

None<-addBonds(atom1, atom2)

atom1 : first atom

atom2 : second atom

bondOrder : Integer specifying the bondOrder of the bond that is going to be created between atom1 and atom2.The bondOrder by default is 1.

origin : string describing how bond was specified
Overrides: ViewerFramework.VFCommand.Command.__call__

doit(self, atom1, atom2, **kw)

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