From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed May 03 2006 - 18:06:12 CDT

Hi,
  You can write a simple script that does this with a loop, say something like:

##
## Animate a range of frames
##
## Example:
## animateframerange 0 -1 1 5

proc animateframerange { first last step maxrepeat } {
  set numframes [molinfo top get numframes]

  if { $last < 0 } {
    set last [expr $numframes - 1]
  }

  for {set repeat 0} {$repeat < $maxrepeat} {incr repeat} {
    for {set frame $first} {$frame <= $last} {incr frame $step} {
      puts "Frame: $frame"
      animate goto $frame
      display update
    }
  }
}

    

On Tue, May 02, 2006 at 08:30:37PM +1000, David Chalmers wrote:
> Dear VMDlist,
>
> I would like to write a TCL script that allows me to replay part of a
> trajectory that I have already read in. Ideally I would like to be able to
> specify a start and end frame.
>
> It does not appear from the documentation that there is a ready way to do
> this using the 'animate' command. Can anybody suggest a method?
>
> Regards
>
> David
>
>
> ________________________________________________________________________
>
> David Chalmers Lab: 9903 9110
> Victorian College of Pharmacy Fax: 9903 9582
> 381 Royal Pde, Parkville, Vic 3053. Australia
> David.Chalmers_at_vcp.monash.edu.au
> ________________________________________________________________________
>

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