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

Class AddKollmanChargesCommand

source code

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

Kollman united atom partial charges are added to atoms by looking up each atom's parent's type to get a dictionary of charges for specific atom names (from Pmv.qkollua).  Missing entries are assigned charge 0.0.  These partial charges are entered in each atom's '_charges' dictionary as value for key 'Kollman'. Sets the current charge (its chargeSet field) of each atom to 'Kollman'.
    
Package:Pmv
    
Module :editCommands
    
Class:AddKollmanChargesCommand
    
Command:addKollmanCharges
    
Synopsis:

        totalCharge<---addKollmanCharges(nodes, **kw)
    
Required Arguments:

        nodes --- TreeNodeSet holding the current selection
        
totalCharge --- sum of partial charges on nodes.



Instance Methods [hide private]
  __init__(self, func=None)
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  __call__(self, nodes, **kw)
totalCharge<---addKollmanCharges(nodes, **kw)
  setupUndoBefore(self, nodes)
This method builds the self.undoCmds string.
  doit(self, nodes)
virtual method.
  fixNterminus(self, nres, total)
newTotal<-fixNterminu(nres, total)
  fixCterminus(self, cres, total)
newTotal<-fixCterminu(cres, total)
  fixHisRes(self, his, total)
newTotal<-fixHisRes(his, total)
  fixCysRes(self, cys, total)

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, 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__

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

source code 

totalCharge<---addKollmanCharges(nodes, **kw)

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

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)

doit(self, nodes)

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

fixNterminus(self, nres, total)

source code 

newTotal<-fixNterminu(nres, total)

nres is the N-terminal residue

total is previous charge total on residueSet

newTotal is adjusted total after changes to nres.charges

fixCterminus(self, cres, total)

source code 

newTotal<-fixCterminu(cres, total)

cres is the C-terminal residue

total is previous charge total on residueSet

newTotal is adjusted total after changes to cres.charges

fixHisRes(self, his, total)

source code 

newTotal<-fixHisRes(his, total)

his is a HISTIDINE residue

total is previous charge total on residueSet

newTotal is adjusted total after changes to his.charges

fixCysRes(self, cys, total)

source code 
None