# create a movie from separate molecules. # load frames as separate molecules. of course in case of psf+pdb files, # this has to be 'mol new step-1.psf ; mol addfile step-1.pdb' mol new step-1.pdb mol new step-2.pdb mol new step-3.pdb mol new step-4.pdb mol new step-5.pdb # now disable all molecules for {set i 0} {$i < [molinfo num]} {incr i} { mol off $i } # now create an animation by sequentially # turning the molecules on and off # default is to wait a 1/10th second between frames proc molmovie {{loops 10} {delay 100}} { global molmovie_last set nmols [molinfo num] display update on if {![info exists molmovie_last]} { set molmovie_last [expr $nmols - 1] } for {set i 0} {$i < $loops} {incr i} { for {set n 0} {$n < $nmols} {incr n} { display update display update ui mol on $n mol off $molmovie_last set molmovie_last $n after $delay } } }