Package Pmv :: Module displayCommands :: Class BindGeomToMolecularFragment
[hide private]
[frames] | no frames]

Class BindGeomToMolecularFragment

source code

ViewerFramework.VFCommand.Command --+        
                                    |        
                  mvCommand.MVCommand --+    
                                        |    
          BindGeomToMolecularFragmentBase --+
                                            |
                                           BindGeomToMolecularFragment

Command to bind an Indexed Geometry to a molecule.

Instance Methods [hide private]
  __init__(self)
  checkDependencies(self)
virtual method.
  doit(self, g, nodes, cutoff_from=3.5, cutoff_to=BHTree_CUT, instanceMatrices=None, **kw)
virtual method.
  pickedVerticesToAtoms(self, geom, vertInd)
Function called to convert picked vertices into atoms
  findUniqueAtomSet(self, atomIndices, atoms)
  atomPropToVertices(self, geom, atoms, propName, propIndex=None)
Function called to map atomic properties to the vertices of the geometry
  __call__(self, geom, nodes, cutoff_from=3.5, cutoff_to=BHTree_CUT, instanceMatrices=None, **kw)
cl_atoms<-bindGeomToMolecularFragment(geom, molname, cutoff_from=3.5, cutoff_to=10.0 ) Finds the closest atom to each vertex of a given indexed geometry.
  guiCallback(self)
Default callback function called by the gui
  buildFormDescr(self, formName)
descr <- buildFormDescr(self, formName): this virtual method is implemented in the classes derived from Command.
  findClosestAtoms(self, obj_verts, atoms, cutoff_from=3.5, cutoff_to=BHTree_CUT, instanceMatrices=None)
For every vertex in a given set of vertices finds the closest atom.

Inherited from mvCommand.MVCommand: strArg

Inherited from mvCommand.MVCommand (private): _strArg

Inherited from ViewerFramework.VFCommand.Command: __repr__, addCallbackAfter, addCallbackBefore, addUndoCall, afterDoit, beforeDoit, buildLogArgList, 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 BindGeomToMolecularFragmentBase: data

Inherited from ViewerFramework.VFCommand.Command: negateKw, objArgOnly


Method Details [hide private]

__init__(self)
(Constructor)

source code 
None
Overrides: mvCommand.MVCommand.__init__

checkDependencies(self)

source code 
virtual method. Has to be implemented by the sub classes. Method called when command is loaded, if all the dependencies are not found the command won't be loaded.
Overrides: ViewerFramework.VFCommand.Command.checkDependencies
(inherited documentation)

doit(self, g, nodes, cutoff_from=3.5, cutoff_to=BHTree_CUT, instanceMatrices=None, **kw)

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

pickedVerticesToAtoms(self, geom, vertInd)

source code 
Function called to convert picked vertices into atoms

findUniqueAtomSet(self, atomIndices, atoms)

source code 
None

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

source code 
Function called to map atomic properties to the vertices of the geometry

__call__(self, geom, nodes, cutoff_from=3.5, cutoff_to=BHTree_CUT, instanceMatrices=None, **kw)
(Call operator)

source code 
cl_atoms<-bindGeomToMolecularFragment(geom, molname, cutoff_from=3.5, cutoff_to=10.0 ) Finds the closest atom to each vertex of a given indexed geometry. Binds the geometry to the molecule. geom is an input Geom object; molname is the name of an input molecule; cutoff_from is the initial distance from vertices in which the search for the closest atoms is performed. If no atoms are found, the search distance is gradually increased untill it reaches the 'cutoff_to' value.
Overrides: ViewerFramework.VFCommand.Command.__call__

guiCallback(self)

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

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)

findClosestAtoms(self, obj_verts, atoms, cutoff_from=3.5, cutoff_to=BHTree_CUT, instanceMatrices=None)

source code 
For every vertex in a given set of vertices finds the closest atom. Returns an array of corresponding atom indices. Based on bhtree library.