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

Class CustomTraceCommand

source code

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

This command computes and extrudes Trace 
        
Package : Pmv
        
Module  : traceCommands
        
Class   : CustomTraceCommand
        
Command : customTrace
        
keywords: custom trace
        
Synopsis:

        None<---customTrace(nodes,traceName='CATrace',shape2D=None,frontCap=1, endCap=1,ctlAtmName='CA',torsAtmName='O',nbchords=4,display=1,**kw)
        
Required Arguments:

            nodes --- TreeNodeSet holding the current selection
        
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. 
            
shape2D  --- instance of a DejaVu.Shape class describing the shape 2D
                   to be extruded along the path3D of the selected trace.
                   By default a Circle2D will be extruded
            
frontCap --- when set to True a cap is added to all the front of the
                   extruded geometry created to represent the selected trace.
            
endCap --- when set to True a cap is added to all the end of the extruded
                   geometry representing the selected trace.
            
display --- when set to True the displayTrace command is called.
    



Instance Methods [hide private]
  __init__(self)
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  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', shape2D=None, frontCap=1, endCap=1, ctlAtmName='CA', torsAtmName='O', nbchords=4, display=1, **kw)
None<---customTrace(nodes,traceName='CATrace',shape2D=None,frontCap=1, endCap=1,ctlAtmName='CA',torsAtmName='O',nbchords=4,display=1,**kw) Required Arguments: nodes --- TreeNodeSet holding the current selection Optional Arguments: traceName --- string representing the name of the computed trace.
  doit(self, nodes, **kw)
virtual method.

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__

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)

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', shape2D=None, frontCap=1, endCap=1, ctlAtmName='CA', torsAtmName='O', nbchords=4, display=1, **kw)
(Call operator)

source code 
None<---customTrace(nodes,traceName='CATrace',shape2D=None,frontCap=1, endCap=1,ctlAtmName='CA',torsAtmName='O',nbchords=4,display=1,**kw)
        
Required Arguments:

            nodes --- TreeNodeSet holding the current selection
        
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. 
            
shape2D  --- instance of a DejaVu.Shape class describing the shape 2D
                   to be extruded along the path3D of the selected trace.
                   By default a Circle2D will be extruded
            
frontCap --- when set to True a cap is added to all the front of the
                   extruded geometry created to represent the selected trace.
            
endCap --- when set to True a cap is added to all the end of the extruded
                   geometry representing the selected trace.
            
display --- when set to True the displayTrace command is called.             
        

Overrides: ViewerFramework.VFCommand.Command.__call__

doit(self, nodes, **kw)

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