VMD Extension Functions
|
Functions | |
forFrames framenum sel block ?step? | |
forFramesMeasure framenum sel block | |
Convenience functions to iterate a block of TCL code over a set of frames. See documentation and examples below.
Note. If the selection is subject to changes between frames, do perform a "$sel update" inside the block. If you are using more than one selection, pass only the first as an argument and, if necessary, update the others inside the block.
Iterate and compute secondary structure:
forFrames | framenum sel block ?step? | ||
Iterators over frames in the current selection. While in ''block'', the first argument is set to the (integer) current frame number. The selection is used to get the frame range, and is automatically set with "frame" before executing the block. Note that, like '''for''', the variable name does not require the dollar symbol. Example:
forFrames fno $sel { puts "$fno: [measure rgyr $sel ]" }
forFramesMeasure | framenum sel block | ||
Similar to forFrames (in fact it is a plug-in replacement). If the block returns a value, also builds a list with the returned values.