/ . / chimera / selection / CodeSelection
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.
Methods
|
|
|
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.
|
|
__str__
|
__str__ ( self )
String representation is code string
|
|
barrenGraphs
|
barrenGraphs ( self, asDict=False )
|
|
__init__
|
__init__ ( self, codestr )
|
|
|