Package Pmv :: Module superImposeCommands :: Class SuperImposeAtomsGUICommand
[hide private]
[frames] | no frames]

Class SuperImposeAtomsGUICommand

source code

 ViewerFramework.VFCommand.Command --+    
                                     |    
                   mvCommand.MVCommand --+
                                         |
ViewerFramework.VFCommand.ICOM --+       |
                                 |       |
                  mvCommand.MVICOM --+   |
                                     |   |
                  mvCommand.MVAtomICOM --+
                                         |
                                        SuperImposeAtomsGUICommand


The SuperImposeAtomsGUICommand provides a GUI interface to the  SuperImposeAtomsCommand.
- For now Only two 2 sets of Atoms belonging to a ref molecule and a mobile molecule
can be superimposed simultaneously.

- The command provides two way of defining those two sets of atoms:

  * By picking nodes at the different levels (Molecule, Chain, Residue, Atom) the first pick
  will define the reference set and the second the mobile set. The picking process will have
  be done later on the same way and defines a list of pairs of atoms.
  If the user drags a box only the first node will be considered. Nodes are then converted into
  an set of Atoms. The 'Edit Atoms Pairs' allows the user to see the pairs but also to alter those
  sets. For example only the backbone atoms can be considered or all atoms etc. The user can also
  create his own filter by typing a lambda function in the entry of the combobox.
  If the 2 sets are not of the same length the extra atoms can be removed either from the beginning,
  the end or half and half of the longest set allowing a bit more flexibility.
  If the resulting 2 sets are None then the superimposition cannot be computed. You can reset the
  process and start over or alter your set using the tools described above.

  * By string: If the user knows the set of nodes of respectively the reference molecule and mobile
  molecule to be use for the computation two string selector widgets allows him to proceed more
  efficiently.

- Known bug:
  * If the reference molecule is transformed independently of the mobile molecule the mobile
  molecule will be superimposed onto the original location of the reference molecule. (Working on it)
  * Cannot superimpose simultaneously multiple sets of molecule.
  * And probably many more ....



Instance Methods [hide private]
  __init__(self, func=None)
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  onRemoveObjectFromViewer(self, obj)
  guiCallback(self)
Default callback function called by the gui
  buildFormDescr(self, formName)
descr <- buildFormDescr(self, formName): this virtual method is implemented in the classes derived from Command.
  initICOM(self, modifier)
gets called when the ICOM is registered using the set method of the interactiveCommandCaller.
  setDefault(self, text)
  editPairs_cb(self, event=None)
  dismiss_cb(self, event=None)
  string_cb(self, event=None)
  continuous_cb(self, event=None)
  labelByName(self, pick)
  unlabelLevel(self, newLevel, oldLevel)
  stopICOM(self)
gets called when this command stops being bound to picking here one should withdraw forms mainly
  updateChooser(self, set1, set2)
  reset_cb(self, event=None)
Button to reset the superimposition and the list of pairs.
  delete_cb(self, event=None)
  superimpose_cb(self, event=None)
  __call__(self, atoms, **kw)
None <- commandName( *args, **kw)
  doit(self, nodes)
Create the 2 sets of atom that will be used to do the superimposition.
  alignment_cb(self, event=None)

Inherited from mvCommand.MVCommand: strArg

Inherited from mvCommand.MVCommand (private): _strArg

Inherited from ViewerFramework.VFCommand.Command: __repr__, addCallbackAfter, addCallbackBefore, addUndoCall, afterDoit, beforeDoit, buildLogArgList, checkDependencies, cleanup, customizeGUI, doitWrapper, getArguments, getHelp, getLastUsedValues, getLogArgs, getValNamedArgs, log, logString, onAddNewCmd, onCmdRun, setLastUsedValues, setupUndoAfter, setupUndoBefore, showForm, tkCb, updateGeom, warningMsg

Inherited from mvCommand.MVAtomICOM: getObjects

Inherited from ViewerFramework.VFCommand.ICOM: startICOM


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)

onRemoveObjectFromViewer(self, obj)

source code 
None

guiCallback(self)

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

buildFormDescr(self, formName)

source code 
descr <- buildFormDescr(self, formName): this virtual method is implemented in the classes derived from Command. This is where the inputFormDescr is created and the description of the widgets appended. If a command has several inputForm buildFormDescr should build all the inputFormDescr and you do a if / elif check to know which one to create. formName : string name of the form corresponding to this descr.
Overrides: ViewerFramework.VFCommand.Command.buildFormDescr
(inherited documentation)

initICOM(self, modifier)

source code 
gets called when the ICOM is registered using the set method of the interactiveCommandCaller.
Overrides: ViewerFramework.VFCommand.ICOM.initICOM
(inherited documentation)

setDefault(self, text)

source code 
None

editPairs_cb(self, event=None)

source code 
None

dismiss_cb(self, event=None)

source code 
None

string_cb(self, event=None)

source code 
None

continuous_cb(self, event=None)

source code 
None

labelByName(self, pick)

source code 
None

unlabelLevel(self, newLevel, oldLevel)

source code 
None

stopICOM(self)

source code 
gets called when this command stops being bound to picking here one should withdraw forms mainly
Overrides: ViewerFramework.VFCommand.ICOM.stopICOM
(inherited documentation)

updateChooser(self, set1, set2)

source code 
None

reset_cb(self, event=None)

source code 
Button to reset the superimposition and the list of pairs.

delete_cb(self, event=None)

source code 
None

superimpose_cb(self, event=None)

source code 
None

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

source code 
None <- commandName( *args, **kw)
Overrides: ViewerFramework.VFCommand.Command.__call__
(inherited documentation)

doit(self, nodes)

source code 
Create the 2 sets of atom that will be used to do the superimposition. Then call the superImposeCommand with these 2 sets. If continuous is on then the superimposition will be updated each time a pair of atoms is added otherwise the superimposition will be updated every 4 pairs of atoms.
Overrides: ViewerFramework.VFCommand.Command.doit

alignment_cb(self, event=None)

source code 
None