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

Class TypeAtomsCommand

source code

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

This class uses the AtomHybridization class to assign atom types.
    
Package:Pmv
    
Module :editCommands
    
Class:TypeAtomsCommand
    
Command:typeAtoms
    
Synopsis:

        None <--- typeAtoms(nodes, **kw)
    
Required Arguments:
   
        nodes --- TreeNodeSet holding the current selection
    
example:

      >>> atype = AtomHybridization()

      >>> atype.assignHybridization(atoms)

      atoms has to be a list of atom objects

      Atom:

      a .element : atom's chemical element symbol (string)

      a .coords : 3-sequence of floats

      a .bonds : list of Bond objects

      Bond:

      b .atom1 : instance of Atom

      b .atom2 : instance of Atom

      After completion each atom has the following additional members:

      babel_type: string

      babel_atomic_number: int

      babel_organic

reimplementation of Babel1.6 in Python by Michel Sanner April 2000
Original code by W. Patrick Walters and Matthew T. Stahl


    



Instance Methods [hide private]
  __init__(self, func=None)
  doit(self, nodes)
virtual method.
  __call__(self, nodes, **kw)
None<---typeAtoms(nodes, **kw)
  guiCallback(self)
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, 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__

doit(self, nodes)

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

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

source code 

None<---typeAtoms(nodes, **kw)

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

guiCallback(self)

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