Package Pmv :: Module secondaryStructureCommands :: Class ExtrudeSecondaryStructureCommand
[hide private]
[frames] | no frames]

Class ExtrudeSecondaryStructureCommand

source code

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

The ExtrudeCommand allows the user to represent the secondary structure elements by extruding 2D geometries along a 3D path.To execute this command use the entry 'extrude Secondary Structure' under the 'Compute' menu in the menu bar. 
   The panel that appears lets the user choose the 2D shapes for the extrusion. The entry 'default' in the listChooser lets do a traditional ribbon representation.nbchords represents the number of points in the path3D corresponding to one residue. The higher this parameter is the smoother the extruded geometries will look.gapBeg allows the user to introduce a gap of gapBeg points the extruded geometrie before each residues.gapEnd allows the user to introduce a gap of gapEnd points the extruded geometrie after each residues.The value of this two parameters depend on the value of the nbchords parameter and on each other's value.Once you clique OK on this panel another panel appears to let the user caracterize the chosen 2D geometry.Once the user chose all the parameters an ExtrudeSSElt object is created for each secondary structure element. The geometries associated to each secondary structure element are then updated with the new vertices and faces.Finally the displaySSCommand is executed.This command has the objArgsOnly flag.
    
Package : Pmv
    
Module  : secondaryStructureCommands
    
Class   : ExtrudeSecondaryStructureCommand
    
Command name : extrudeSecondaryStructure
    
Synopsis:

            None <--- extrudeSecondaryStructure(nodes, shape1=None, shape2=None,frontcap=1, endcap=True, arrow=True, nbchords=4, gapBeg=False,gapEnd=False, larrow=2, display=True,**kw)
    
Required Arguments:
    
        nodes ---  TreeNodeSet holding the current selection(mv.getSelection())
    
Optional Arguments:
    
        shape1 &
        shape2 --- DejaVu.Shapes.Shape2D objects. shape1 will be used to
                  represent the helix and strand, shape2 to represent coils and
                  turns.
        
frontcap &
        endcap   --- Boolean flag when set to True a  cap will be added to the
                   geom either at the front or at the end
        
arrow  --- Boolean flag when set to True an arow will be added to the
                   geometry representing the strand.
        
nbchords --- Nb of points per residues in the smooth array
        
gapBeg&  
        gapEnd  --- defines gap at the beginning or the end of each residue.
        
larrow  --- lenth of the arrow if arrow boolean flag set to 1
        
display  --- Boolean flag when set to True the displaySecondaryStructure
                   is called automatically
    



Instance Methods [hide private]
  __init__(self)
  pickedVerticesToAtoms(self, geom, vertInd)
This function gets called when a picking or drag select event has happened.
  atomPropToVertices(self, geom, residues, propName, propIndex=None)
Function called to compute the array of properties
  onAddObjectToViewer(self, obj)
  createGeometries(self, obj)
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  onRemoveObjectFromViewer(self, obj)
  __call__(self, nodes, shape1=None, shape2=None, frontcap=True, endcap=True, arrow=True, nbchords=4, gapBeg=0, gapEnd=0, larrow=2, display=True, **kw)
None<---extrudeSecondaryStructure(nodes,shape1=None,shape2=None,frontcap=1,endcap=True,arrow=True, nbchords=4,gapBeg=False,gapEnd=False,larrow=2,display=True,**kw) Required Arguments: nodes --- TreeNodeSet holding the current selection (mv.getSelection()) Optional Arguments: shape1 & shape2 --- DejaVu.Shapes.Shape2D objects.
  doit(self, nodes, shape1=None, shape2=None, frontcap=True, endcap=True, arrow=True, nbchords=4, gapBeg=0, gapEnd=0, larrow=2, display=True, **kw)
nodes, shape1, shape2=None, frontcap=True, endcap=True, arrow=True, nbchords=4, gapBeg=0, gapEnd=1, display=True
  gapValidateFunction(self, gapVal, *validateArgs)
Function to test if the value of the gap is correct.
  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

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 

This function gets called when a picking or drag select event has
happened. It gets called with a geometry and the list of vertex
indices of that geometry that have been picked.
This function is in charge of turning these indices into an AtomSet
This function takes the following arguments:
geom   : geometry picked, instance of a class derived from DejaVu.Geom
         (IndexedPolygons, IndexedPolylines.....)
vertInd: list of integer representing the indices of the picked
         vertices in the given geometry geom. 

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

source code 
Function called to compute the array of properties

onAddObjectToViewer(self, obj)

source code 
None

createGeometries(self, obj)

source code 
None

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

__call__(self, nodes, shape1=None, shape2=None, frontcap=True, endcap=True, arrow=True, nbchords=4, gapBeg=0, gapEnd=0, larrow=2, display=True, **kw)
(Call operator)

source code 
None<---extrudeSecondaryStructure(nodes,shape1=None,shape2=None,frontcap=1,endcap=True,arrow=True, nbchords=4,gapBeg=False,gapEnd=False,larrow=2,display=True,**kw)
        
Required Arguments:

        nodes ---  TreeNodeSet holding the current selection
                   (mv.getSelection())
        
Optional Arguments:

        shape1 &
        shape2 --- DejaVu.Shapes.Shape2D objects. shape1 will be used to
                  represent the helix and strand, shape2 to represent coils and
                  turns.
        
frontcap &
        endcap --- Boolean flag when set to True a  cap will be added to the
                   geom either at the front or at the end
        
arrow --- Boolean flag when set to True an arow will be added to the
                   geometry representing the strand.
        
nbchords --- Nb of points per residues in the smooth array
        
gapBeg&  
        gapEnd --- defines gap at the beginning or the end of each residue.
        
larrow  --- length of the arrow if arrow boolean flag set to 1
        
display --- Boolean flag when set to True the displaySecondaryStructure
                   is called automatically 

Overrides: ViewerFramework.VFCommand.Command.__call__

doit(self, nodes, shape1=None, shape2=None, frontcap=True, endcap=True, arrow=True, nbchords=4, gapBeg=0, gapEnd=0, larrow=2, display=True, **kw)

source code 
nodes, shape1, shape2=None, frontcap=True, endcap=True, arrow=True, nbchords=4, gapBeg=0, gapEnd=1, display=True
Overrides: ViewerFramework.VFCommand.Command.doit

gapValidateFunction(self, gapVal, *validateArgs)

source code 
Function to test if the value of the gap is correct. Its has to take for arguments the value of the entry you are testing and a list of arguments. Here the list has only one argument the value number of chords.

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