Package Pmv :: Module selectionCommands :: Class MVSelectFromStringCommand
[hide private]
[frames] | no frames]

Class MVSelectFromStringCommand

source code

ViewerFramework.VFCommand.Command --+    
                                    |    
                  mvCommand.MVCommand --+
                                        |
                                       MVSelectFromStringCommand
Known Subclasses:
MVDirectSelectCommand, sdCommands.ApplyTransformations

molStr,chainStr,residueStr,atomStr Select items by typed-in strings: one for each level. No entry corresponds to select everything at this level. Strings are parsed as would-be regular expressions, replacing * by .*.... 
    
Package : Pmv
    
Module  : selectionCommands
    
Class   : MVSelectFromStringCommand
    
Command : selectFromString
    
Synopsis:

        None <- selectFromString(mols='', chains='', res='', atoms='', deselect=False, silent=False, **kw)
    
Arguments:

    mols, chains, res and atoms are strings. *?-, are supported
    
silent --- when true, the program changes level without asking the user
    
negate --- when True, the command does a deselect operation
    



Instance Methods [hide private]
  __init__(self)
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  setupUndoBefore(self, *args, **kw)
This method builds the self.undoCmds string.
  doit(self, mols='', chains='', res='', atoms='', negate=False, silent=False, xor=False, intersect=False, nodes=None)
virtual method.
  __call__(self, mols='', chains='', res='', atoms='', negate=False, silent=True, xor=False, intersect=False, nodes=None, **kw)
None <- selectFromString(nodes, mols='', chains='', res='', atoms='', deselect=False, silent=False, **kw)
  buildForm(self, event=None)
  setButtonState(self, event=None)
  guiCallback(self)
Default callback function called by the gui
  increaseCts(self, dict, newStr)
  decreaseCts(self, dict, newStr)
  getMolVal(self, event=None)
  getChainVal(self, event=None)
  getResSetsVal(self, event=None)
  getAtomSetsVal(self, event=None)
  getSetsVal(self, event=None)
  buildMenu(self, mB, nameList, varDict, oldvarDict, cmd)
  buildMolMenus(self, event=None)
  buildChainMenus(self, event=None)
  buildResMenus(self, event=None)
  buildAtomMenus(self, event=None)
  buildSetsMenus(self, event=None)
  Dismiss_cb(self)
  saveSel(self)
  xor(self)
  remove(self)
  add(self)
  intersect(self)
  invert(self, event=None)
  clearSel(self)
  clearForm(self)
  startSelPick(self)
  toggleSelSpheres(self, event=None)
  getPickInfo_cb(self, atoms)
  buildArgs(self, negate=False, xor=False, intersect=False)
  callDontDoit(self)
  callDoit(self)
  callIt(self, args)
  updateselLevel(self, lev)

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, 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)
(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)

setupUndoBefore(self, *args, **kw)

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, mols='', chains='', res='', atoms='', negate=False, silent=False, xor=False, intersect=False, nodes=None)

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

__call__(self, mols='', chains='', res='', atoms='', negate=False, silent=True, xor=False, intersect=False, nodes=None, **kw)
(Call operator)

source code 

None <- selectFromString(nodes, mols='', chains='', res='', atoms='', deselect=False, silent=False, **kw)

mols, chains, res and atoms are strings. *?-, are supported

silent: when true, the program changes level without asking the user

negate: when True, the command does a deselect operation

nodes : nodes that will expand to molecules to be used to select from
Overrides: ViewerFramework.VFCommand.Command.__call__

buildForm(self, event=None)

source code 
None

setButtonState(self, event=None)

source code 
None

guiCallback(self)

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

increaseCts(self, dict, newStr)

source code 
None

decreaseCts(self, dict, newStr)

source code 
None

getMolVal(self, event=None)

source code 
None

getChainVal(self, event=None)

source code 
None

getResSetsVal(self, event=None)

source code 
None

getAtomSetsVal(self, event=None)

source code 
None

getSetsVal(self, event=None)

source code 
None

buildMenu(self, mB, nameList, varDict, oldvarDict, cmd)

source code 
None

buildMolMenus(self, event=None)

source code 
None

buildChainMenus(self, event=None)

source code 
None

buildResMenus(self, event=None)

source code 
None

buildAtomMenus(self, event=None)

source code 
None

buildSetsMenus(self, event=None)

source code 
None

Dismiss_cb(self)

source code 
None

saveSel(self)

source code 
None

xor(self)

source code 
None

remove(self)

source code 
None

add(self)

source code 
None

intersect(self)

source code 
None

invert(self, event=None)

source code 
None

clearSel(self)

source code 
None

clearForm(self)

source code 
None

startSelPick(self)

source code 
None

toggleSelSpheres(self, event=None)

source code 
None

getPickInfo_cb(self, atoms)

source code 
None

buildArgs(self, negate=False, xor=False, intersect=False)

source code 
None

callDontDoit(self)

source code 
None

callDoit(self)

source code 
None

callIt(self, args)

source code 
None

updateselLevel(self, lev)

source code 
None