Package Pmv :: Module splineCommands :: Class ComputeSplineCommand
[hide private]
[frames] | no frames]

Class ComputeSplineCommand

source code

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

The CompueSplineCommand omplements a set of method to create an DejaVu.splineObject per chain given:a TreeNodeSet,type of control Atoms (atmtype),number of points per control point in the smooth array (nbchords),continuity of the curves (continuity).
    
Package : Pmv
    
Module  : splineCommands
    
Class   : ComputeSplineCommand
    
Command : computeSpline
    
keywords: compute spline
    
Synopsis:
None <- computeSpline(nodes, atmtype='CA', nbchords=4,
                              interp='interpolation'
                              continuity=2, closedSpline=0, **kw)
    
Required Arguments:

        nodes --- self.getSelection()
    
Optional Arguments:

        
atmtype --- specifies the atom type of the control points.
                      the atoms of the current selection of the given
                      atom type are used as the control points.
                      atmtype can be 'CA'(default value) 'CA,N' 'O' etc.... 
                      
        
curSel --- Boolean flag to use the atoms in current selection as control
                      points. (default=False)
        
nbchords --- number of point per control points in the smooth array
        
interp --- flag if set to 'interpolation' interpolate the control
                      points.
        
continuity  --- specifies the continuity of the curve.
        
closedSpline --- Boolean flag when set to True the spline will be closed (1st atom will be connected to the last atom. (default = False)
        
sortAtms --- Boolean flag to sort the ctlAtms or not. (default = True)
    



Instance Methods [hide private]
  __init__(self, func=None)
  onRemoveObjectFromViewer(self, obj)
  doit(self, nodes, atmtype="", curSel=False, nbchords=4, interp='interpolation', continuity=2, closedSpline=False, sortAtms=True)
virtual method.
  __call__(self, nodes, atmtype="CA", curSel=False, nbchords=4, interp='interpolation', continuity=2, closedSpline=False, sortAtms=True, **kw)
None <- computeSpline(nodes, atmtype='CA', nbchords=4, interp='interpolation' continuity=2, closedSpline=0, **kw) Required Arguments: nodes --- self.getSelection() Optional Arguments: atmtype --- specifies the atom type of the control points.

Inherited from mvCommand.MVCommand: guiCallback, 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, onAddCmdToViewer, 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, func=None)
(Constructor)

source code 
None
Overrides: mvCommand.MVCommand.__init__

onRemoveObjectFromViewer(self, obj)

source code 
None

doit(self, nodes, atmtype="", curSel=False, nbchords=4, interp='interpolation', continuity=2, closedSpline=False, sortAtms=True)

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

__call__(self, nodes, atmtype="CA", curSel=False, nbchords=4, interp='interpolation', continuity=2, closedSpline=False, sortAtms=True, **kw)
(Call operator)

source code 
None <- computeSpline(nodes, atmtype='CA', nbchords=4,
                              interp='interpolation'
                              continuity=2, closedSpline=0, **kw)
        
Required Arguments:

        nodes  --- self.getSelection()
        
Optional Arguments:

        atmtype  --- specifies the atom type of the control points.
                      the atoms of the current selection of the given
                      atom type are used as the control points.
                      atmtype can be 'CA'(default value) 'CA,N' 'O' etc.... 
                      
        
curSel  --- Boolean flag to use the atoms in current selection as control
                      points. (default=False)
        
nbchords --- number of point per control points in the smooth array
        
interp --- flag if set to 'interpolation' interpolate the control
                      points.
        
continuity --- specifies the continuity of the curve.
        
closedSpline --- Boolean flag when set to True the spline will be closed (1st atom will be connected to the last atom. (default = False)
        
sortAtms --- Boolean flag to sort the ctlAtms or not. (default = True)
                   
        

Overrides: ViewerFramework.VFCommand.Command.__call__