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

Class ComputeGasteigerCommand

source code

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

Does work of computing gasteiger partial charges for each atom and entering each atom's charge in its '_charges' dictionary as value for key 'gasteiger' (rounded to 4 decimal places).  Calls babel.assignHybridization(mol.allAtoms) for each molecule with atoms in nodes.Sets the current charge (its chargeSet field) of each atom to gasteiger.
    
Package:Pmv
    
Module :editCommands
    
Class:ComputeGasteigerCommand
    
Command:computeGasteiger
    
Synopsis:

        None<---computeGasteiger(nodes, **kw)
    
Requiured Arguments:

        nodes --- TreeNodeSet holding the current selection
     



Instance Methods [hide private]
  __init__(self, func=None)
  setupUndoBefore(self, nodes)
This method builds the self.undoCmds string.
  __call__(self, nodes, **kw)
None <- computeGasteiger(nodes, **kw)
  doit(self, nodes)
virtual method.

Inherited from mvCommand.MVCommand: 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, onAddCmdToViewer, onAddNewCmd, onCmdRun, setLastUsedValues, setupUndoAfter, showForm, tkCb, updateGeom, warningMsg


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__

setupUndoBefore(self, nodes)

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, **kw)
(Call operator)

source code 

None <- computeGasteiger(nodes, **kw)

nodes --- TreeNodeSet holding the current selection
Overrides: ViewerFramework.VFCommand.Command.__call__

doit(self, nodes)

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