From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Jan 25 2011 - 08:55:42 CST

On Tue, Jan 25, 2011 at 8:50 AM, Nicolas Belloy
<nicolas.belloy_at_gmail.com> wrote:
> Hi,
> I'd like to make a movie (20 sec) of a protein but my trajectory is only 50
> frames long. As a result, the motions are too fast. In order to increase the
> number of frames, I try to duplicate frames from mol 0 to mol 1.
>
> Here is the script I wrote taking into account advices from
> http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/15380.html :
>
> mol new protein.psf
> mol new protein.psf
> mol top 0
> mol addfile trajectory.dcd 0
> set num [molinfo top get numframes]
> for {set i 0} {$i<$num} {incr i} {
> animate goto $i
> set mult [expr 48*$i]
> set step [molinfo 1 get numframes]
> for {set j $step} {$j<$mult} {incr j} {
> animate dup frame now 1
>     }
> }
>
> The duplication seems to work fine (2352 frames) but the display is empty

animate dup can only duplicate frames in the same molecule.
what you have to do is to create the 2352 frames that you need
in the second molecule through animate dup (they will be all empty)
and then create two selections and a nested loop to copy over the
atom positions. the latter can be done with code like this (untested):

set sel0 [atomselect 0 all]
set sel1 [atomselect 1 all]

set nf 0
for {set i 0} {$i < $num} {incr i} {
   $sel0 frame $i
   for {set j 0} {$j < $mult} {incr j} {
      $sel1 frame $nf
      $sel1 set {x y z} [$sel0 get {x y z}]
      incr nf
   }
}

axel.

> ...
> Advices are welcome.
> Thanks.
>
> Nicolas
>

-- 
Dr. Axel Kohlmeyer
akohlmey_at_gmail.com  http://goo.gl/1wk0
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.