Chimera Commands Index

perframe alias-name [frame-digits]


The perframe command specifies operations to be executed at each subsequent display frame, until stopped with ~perframe. The set of operations must have been defined previously as an alias.

The alias definition must start with ^ to indicate a beginning-of-line alias, and it can include one argument specified as $1. The perframe mechanism will replace $1 with a frame counter, starting at 1. If frame-digits is supplied, the number will be padded with leading zeroes up to the specified number of digits.

For example,

alias ^getx3d export $1.x3d
perframe getx3d 3;roll y 2 180;wait;~perf
will save X3D files 001.x3d, 002.x3d, ... 180.x3d as a structure is rotated in 2° increments about the Y axis.

The following example shows how this mechanism could be used to re-evaluate hydrogen bonds between two molecules as they are gradually changed from a previously saved position named undocked to a previously saved position named docked. This could be part of a movie script.

alias ^evalhb hb intramod false line 2
reset undocked
perframe evalhb;reset docked 40;wait;~perf
See also: alias, movie-related commands, per-frame scripts in MD Movie