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

Class AverageChargeErrorCommand

source code

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

Adjusts the charge on each atom in  residue with non-integral overall charge so that the sum of the charge on all the atoms in the residue is an integer.  Determines if initial sum is closer to the ceiling or the floor and then adds or subtracts the difference from this nearer value divided by the number of atoms to each atom.  The new chargeSet is called 'adjustedCharges'.
    
Package:Pmv
    
Module :editCommands
    
Class:AverageChargeErrorCommand
    
Command:averageChargeError
    
Synopsis:

        None<---averageChargeError(nodes, **kw)
    
Required Arguments:

        nodes --- TreeNodeSet holding the current selection
    



Instance Methods [hide private]
  __init__(self, func=None)
  guiCallback(self)
Default callback function called by the gui
  __call__(self, nodes, **kw)
None<---averageChargeError(nodes, **kw)
  doit(self, nodes)
virtual method.
  averageCharge(self, res)

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, onAddCmdToViewer, onAddNewCmd, onCmdRun, setLastUsedValues, setupUndoAfter, setupUndoBefore, 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__

guiCallback(self)

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

__call__(self, nodes, **kw)
(Call operator)

source code 

None<---averageChargeError(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)

averageCharge(self, res)

source code 
None