From: pascal.baillod_at_epfl.ch
Date: Tue Jul 24 2007 - 09:36:35 CDT

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
*******************************************************************************