From: Axel Kohlmeyer (
Date: Thu Jul 12 2007 - 10:03:43 CDT

On Thu, 12 Jul 2007 wrote:

PB> Dear community,

dear pascal.

PB> I would like to give frame numbers in the vmd tcl console, such as "$sel frame
PB> 344", to update the graphical display to the frame containing this structure.
PB> However, this command seems more designed to compute some structural property of
PB> a given frame than to update the graphics display. This second operation could

you should use 'animate goto <frame>' to move the display to a given frame.

PB> of course be done by typing in the desired frame number in the main menu, but I
PB> would like to have a tcl script to click through a subset of given frame numbers
PB> (i.e. 2, 4, 56, 107, 233, 5466, etc.) without having to rewrite the trajectory
PB> or type these numbers every new frame. I could imagine a possibility by storing
PB> the desired frame numbers in a tcl array and having vmd loop through it.. Would
PB> anybody know if this is feasible and/or have an example script?

yes. this is feasable. just have a look at a Tk/tcl tutorial on how to
create a button. you can then store the list of frame numbers in an
array, then have this button increment from 0 through the max index in
this array (with or without wrapping around) and then call animate goto
with the frame retrieved from this array. there are probably several
equivalent ways to achieve the same thing, but i hope you get the


PB> Thanks a lot in advance!
PB> Pascal
PB> *******************************************************************************
PB> Pascal Baillod (PhD student)
PB> *******************************************************************************
PB> Swiss Federal Institute of Technology EPFL Tel: +41-(0)21-693-0322
PB> Institute of Chemical Sciences and Engineering , Fax: +41-(0)21-693-0320
PB> Laboratory of Computational Chemistry and Biochemistry
PB> Room BCH 4121, Avenue Forel,
PB> CH-1015 Lausanne
PB> *******************************************************************************

Axel Kohlmeyer
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
If you make something idiot-proof, the universe creates a better idiot.