Package Pmv :: Module traceCommands :: Class ComputeTraceCommand
[hide private]
[frames] | no frames]

Class ComputeTraceCommand

source code

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

This command computes the oriented spline (trace) for the molecules in the current selection. It creates a Coil object for each chaine of the molecule having at least one node in the current selection.The Coil object can only be created for the residues having the chosen ctlAtm and torsAtm.
    
Package : Pmv
    
Module  : traceCommands
    
Class   : ComputeTraceCommand
    
Command : computeTrace
    
keywords: compute trace
    
Synopsis:

        None <- computeTrace(nodes, traceName='CATrace', ctlAtmName='CA',
                             torsAtmName='O',nbchords = 4, **kw)
    
Required Arguments:
    
        nodes --- any set of MolKit nodes describing molecular components
    
Optional Arguments:
    
        traceName --- string representing the name of the computed trace.
                     default 'CATrace'
        
ctlAtmName --- name of the atom to be used for control (defaul='CA')
        
torsAtmName --- name of the atom to be used to control the torsion.
                     default='O'
        
nbchords --- number of points per residue. The higher the number the
                     smoother the trace will be.
    



Instance Methods [hide private]
  __init__(self)
  pickedVerticesToAtoms(self, geom, vertInd)
Function called to convert a picked vertex into the first atom of the picked residue
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  atomPropToVertices(self, geom, residues, propName, propIndex=None)
Function called to compute the array of property for the given residues
  dialog(self, mol)
  createGeometries(self, mol, nodes)
Initialize the geometries that will be used to represent the CA Trace objects for the given molecule mol.
  doit(self, nodes, traceName='CATrace', ctlAtmName='CA', torsAtmName='O', nbchords=4)
virtual method.
  getAvailableTrace(self)
  buildFormDescr(self, formName)
descr <- buildFormDescr(self, formName): this virtual method is implemented in the classes derived from Command.
  guiCallback(self)
Default callback function called by the gui
  __call__(self, nodes, traceName='CATrace', ctlAtmName='CA', torsAtmName='O', nbchords=4, **kw)
None <- computeTrace(nodes, traceName='CATrace', ctlAtmName='CA', torsAtmName='O',nbchords = 4, **kw) Required Arguments: nodes : any set of MolKit nodes describing molecular components Optional Arguments: traceName : string representing the name of the computed trace.

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


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__

pickedVerticesToAtoms(self, geom, vertInd)

source code 
Function called to convert a picked vertex into the first atom of the picked residue

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)

atomPropToVertices(self, geom, residues, propName, propIndex=None)

source code 
Function called to compute the array of property for the given residues

dialog(self, mol)

source code 
None

createGeometries(self, mol, nodes)

source code 
Initialize the geometries that will be used to represent the CA Trace objects for the given molecule mol.

doit(self, nodes, traceName='CATrace', ctlAtmName='CA', torsAtmName='O', nbchords=4)

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

getAvailableTrace(self)

source code 
None

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)

guiCallback(self)

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

__call__(self, nodes, traceName='CATrace', ctlAtmName='CA', torsAtmName='O', nbchords=4, **kw)
(Call operator)

source code 
None <- computeTrace(nodes, traceName='CATrace', ctlAtmName='CA',
                             torsAtmName='O',nbchords = 4, **kw)
        
Required Arguments:

            nodes     : any set of MolKit nodes describing molecular components
        
Optional Arguments:

            traceName : string representing the name of the computed trace.
                    (default 'CATrace')
            
ctlAtmName : name of the atom to be used for control (defaul='CA')
            
torsAtmName: name of the atom to be used to control the torsion.
                     (default='O')
            
nbchords   : number of points per residue. The higher the number the smoother the trace will be. (default = 4)
        

Overrides: ViewerFramework.VFCommand.Command.__call__