Table of Contents

Class: CodeSelection chimera/selection/__init__.py

CodeSelection class

CodeSelection(code_string, name, descriptin) => CodeSelection instance

Encapsulate Python code into a selection. The code has access to several local variables:

models
: reference to chimera.openModels. vFunc -- the function to apply to vertices. eFunc -- the function to apply to edges. funcs -- a dictionary of all of the [gsve]func's. selApply -- a function that applies the right [ve]func to the given object.

Note: if the code-string is not legal Python code, then the constructor will raise a SyntaxError exception.

Base Classes   
Selection
Methods   
__init__
__str__
apply
barrenGraphs
  __init__ 
__init__ ( self,  codestr )

  __str__ 
__str__ ( self )

String representation is code string

  apply 
apply (
        self,
        vFunc=None,
        eFunc=None,
        )

Apply given functions to selected objects

selection.apply(vFunc=lambda...) => None

It is incumbant on the code to follow guarantees that the the vertex function is called before the edge function.

Note: many types of exceptions can happen when the code is executed.

  barrenGraphs 
barrenGraphs ( self,  asDict=False )


Table of Contents

This document was automatically generated on Wed May 19 13:58:58 2004 by HappyDoc version 2.0.1