From: Jérôme Hénin (jhenin_at_ifr88.cnrs-mrs.fr)
Date: Sat Feb 26 2011 - 08:01:58 CST

Here is a working example, for representation 0 of molecule 0:

proc update_frames {name molid op} {
  set f [molinfo $molid get frame]

  set start [expr {$f - 3}]
  set end [expr {$f + 3}]
  mol drawframes $molid 0 $start:$end
}

trace variable vmd_frame(0) w update_frames

On 26 February 2011 14:43, Jérôme Hénin <jhenin_at_ifr88.cnrs-mrs.fr> wrote:
> Hi,
>
> You can get this behavior with Tcl scripting. Define a callback which
> traces the current frame number. In the callback procedure, modify the
> set of frames displayed by a representation. These individual steps
> are documented in the user's guide.
>
> Jerome
>
>
> On 25 February 2011 20:27, Lin, Kan-Ju <kxl281_at_psu.edu> wrote:
>> I create a pdb file that contains the frames of a trajectory. I know how to
>> animate them or show all or part of the trajectory by putting the frame
>> numbers in “Draw Multiple frames”. I’m wondering if there’s a way that I
>> could show an animation and each frame contains multiple frames? (for
>> example, showing 5 frames before and after the current frame) It seems like
>> in VMD we could update according to the selection of atoms, but what I want
>> is to visualize the trajectory to see if the shape of the trajectory is
>> consistent for a fixed duration.
>>
>>
>>
>>
>>
>> Kan-Ju Lin
>