Package Pmv :: Module sdCommands :: Class ApplyTransformations
[hide private]
[frames] | no frames]

Class ApplyTransformations

source code

  ViewerFramework.VFCommand.Command --+        
                                      |        
                    mvCommand.MVCommand --+    
                                          |    
selectionCommands.MVSelectFromStringCommand --+
                                              |
                                             ApplyTransformations

Opens up the Transformation Control GUI which allows reading in and scanning through transformations. The molecule of interest is selected via the pull-down 'Molecule List...' menu. Selecting the directory and file of interest in the Qlist menus will cause that file to be read in (to update the list of files one must hit return in the Qlist directory entry field).

The qlist files have the format 'score tx ty tz rx ry rz theta rank', where tx,ty,tz is the translation, rx,ry,rz the direction of the rotation axis, theta the angle of rotation (in degrees) and rank the rank in the docking.

On reading in a file of transformations, the default center of rotation is the molecule's center of gravity. To change this, read in the quaternions with the Center Chooser Dialog button activated. The center of rotation can then be set to the current selection, or a type-in value. The center of rotation is remembered, so for a series of files the center need only be set on reading the first file, after which the toggle can be turned off.

Transformations of interest can be added to and removed from the preferred list, which can be written out to a file. The rank column in such a file contains the transformation's position in the original list.

All the data shown in the GUI are stored as attributes of the molecule. Thus, dockings for several molecules can be shown at once, and the GUI retrieves the information when a previous molecule is reselected.

Instance Methods [hide private]
  __init__(self)
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  __call__(self, mol, index, **kw)
None <- applyTransformations(self, molName, index, **kw) molName: index :
  doit(self, mol, index)
virtual method.
  reset(self)
  transformMol(self, mol, transform)
  transformGeoms(self, mol, transform)
  buildQlistMenu(self)
  getMolVal(self, event=None)
  buildArgs(self, displayRange=[1])
  clearForm(self)
  guiCallback(self)
Default callback function called by the gui
  selFromPref(self, entry)
  addToList(self)
  removeFromList(self)
  writeList(self)
The preferred list is a device for remembering which docking transformations looked good.
  writePdb(self)
The WritePDB and WritePDBQ buttons cause the coordinates to be updated by the current transformations applied to the geometries, and then written out.
  writePdbq(self)
The WritePDB and WritePDBQ buttons cause the coordinates to be updated by the current transformations applied to the geometries, and then written out.
  onIncrement(self, text, factor, increment)
  onChangeMolecule(self)
  onChangeRange(self)
  getRange(self)
  onChangeQdir(self)
  onChangeQlist(self, entry)
  verifyMolName(self, molName)

Inherited from selectionCommands.MVSelectFromStringCommand: Dismiss_cb, add, buildAtomMenus, buildChainMenus, buildForm, buildMenu, buildMolMenus, buildResMenus, buildSetsMenus, callDoit, callDontDoit, callIt, clearSel, decreaseCts, getAtomSetsVal, getChainVal, getPickInfo_cb, getResSetsVal, getSetsVal, increaseCts, intersect, invert, remove, saveSel, setButtonState, setupUndoBefore, startSelPick, toggleSelSpheres, updateselLevel, xor

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: selectionCommands.MVSelectFromStringCommand.__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: selectionCommands.MVSelectFromStringCommand.onAddCmdToViewer

__call__(self, mol, index, **kw)
(Call operator)

source code 
None <- applyTransformations(self, molName, index, **kw) molName: index :
Overrides: selectionCommands.MVSelectFromStringCommand.__call__

doit(self, mol, index)

source code 
virtual method. Has to be implemented by the sub classes
Overrides: selectionCommands.MVSelectFromStringCommand.doit

reset(self)

source code 
None

transformMol(self, mol, transform)

source code 
None

transformGeoms(self, mol, transform)

source code 
None

buildQlistMenu(self)

source code 
None

getMolVal(self, event=None)

source code 
None
Overrides: selectionCommands.MVSelectFromStringCommand.getMolVal

buildArgs(self, displayRange=[1])

source code 
None
Overrides: selectionCommands.MVSelectFromStringCommand.buildArgs

clearForm(self)

source code 
None
Overrides: selectionCommands.MVSelectFromStringCommand.clearForm

guiCallback(self)

source code 
Default callback function called by the gui
Overrides: selectionCommands.MVSelectFromStringCommand.guiCallback

selFromPref(self, entry)

source code 
None

addToList(self)

source code 
None

removeFromList(self)

source code 
None

writeList(self)

source code 
The preferred list is a device for remembering which docking transformations looked good. Favorable conformations can be added or removed from the list, which can be written out to a file for future reference. The `rank' record in the preferred list stores the conformations position in the original list.

writePdb(self)

source code 
The WritePDB and WritePDBQ buttons cause the coordinates to be updated by the current transformations applied to the geometries, and then written out. Since these transformations need not have arisen from the qlist, these commands are more generally useful: e.g. they can be used to write out the transformed coordinates resulting from the superimpose commands

writePdbq(self)

source code 
The WritePDB and WritePDBQ buttons cause the coordinates to be updated by the current transformations applied to the geometries, and then written out. Since these transformations need not have arisen from the qlist, these commands are more generally useful: e.g. they can be used to write out the transformed coordinates resulting from the superimpose commands

onIncrement(self, text, factor, increment)

source code 
None

onChangeMolecule(self)

source code 
None

onChangeRange(self)

source code 
None

getRange(self)

source code 
None

onChangeQdir(self)

source code 
None

onChangeQlist(self, entry)

source code 
None

verifyMolName(self, molName)

source code 
None