From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Jul 26 2007 - 16:25:21 CDT

Pascal,
  You should be able to make VMD animate a subset of your trajectory
simply by executing a loop or a "foreach" over the frames of interest,
with the contents of the loop doing something like this:
  animate goto $frame
  display update ui

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Jul 24, 2007 at 04:36:35PM +0200, pascal.baillod_at_epfl.ch wrote:
>
> Hi Axel,
>
> Thanks a lot for your very helpful suggestion! I am too lazy to program buttons,
> but the following recipee is more than sufficient to me and might help others..
> By the way, if you or anyone else has an idea on how to get vmd to play the
> frames of the subset like a movie with a simple command line, I would be glad to
> here from you!
>
> Thanks!!
>
> Pascal
>
>
> #----------- browsing through a subset of frames --------------
>
> 1) Have matlab (my case) or any other program write a file containing relevant
> frame numbers, in the following tcl syntax that can be used in vmd:
>
> set myFr(1) 5246
> set myFr(2) 5309
> set myFr(3) 5310
> set myFr(4) 5339
> etc. ...
>
> ..where the number between parenthesis is just the index in the matlab loop that
> writes the file.
>
> 2) paste the content of the file written in 1) in the vmd tkl console. The array
> myFr is now store in vmd.
>
> 3) type "set fr 1" in the vmd tkl console.
>
> 4) type the following in the tkl console to move the display to the next frame
> of the subset stored in 1):
> > animate goto $myFr($fr)
> > set fr [expr {$fr+1}]
>
> 5) type the following in the tkl console to move the display to the previous
> frame of the subset stored in 1):
> > set fr [expr {$fr-2}]
> > animate goto $myFr($fr)
> > set fr [expr {$fr-1}]
>
> In 4) and 5), the 2 or 3 lines can be pasted uppon a single mouse middle-button
> click for Linux users (ctrl+v at worst with Windows?).
>
>
>
>
>
>
>
> *******************************************************************************
> Pascal Baillod (PhD student)
> *******************************************************************************
> Swiss Federal Institute of Technology EPFL Tel: +41-(0)21-693-0322
> Institute of Chemical Sciences and Engineering , Fax: +41-(0)21-693-0320
> Laboratory of Computational Chemistry and Biochemistry pascal.baillod_at_epfl.ch
> Room BCH 4121, Avenue Forel, http://lcbcpc21.epfl.ch
> CH-1015 Lausanne
> *******************************************************************************

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078