From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Fri Aug 15 2008 - 12:12:03 CDT

On Fri, 15 Aug 2008, Oren Elrad wrote:

OE> Hi all,
OE>
OE> I have a molecule (id 0) with a number of frames loaded into VMD for
OE> Win32 v 1.8.6 and a procedure that I would like to be run every time
OE> the frame changes. Following the example scipt* on the site, I tried
OE> the following in tkl:
OE>
OE> >Main< (VMD) 49 % proc do_stuff {} {puts "blah"}
OE> >Main< (VMD) 51 % trace variable vmd_frame(0) w do_stuff

you are doing this in TkCon, right?

please try the "normal" console instead. in tkcon you
are not on the toplevel, IIRC.

a second option is to write your commands into a scriptfile
and then execute it with the "play" command in tkcon.

cheers,
   axel.

p.s.: if you look at the code of tkcon, you'll actually wonder
how it can work _at all_. this is doing some deep tcl-magic... ;-)

OE>
OE> but this does not do anything when the frame changes. I've tried
OE> various permutations of this syntax, as well as tracing
OE> vmd_timestep(0)
OE>
OE> *http://www.ks.uiuc.edu/Research/vmd/script_library/scripts/sscache/sscache.tcl
OE>
OE> Any help would be appreciated.
OE>
OE> Oren
OE>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   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.