From: Chang, Christopher (Christopher_Chang_at_nrel.gov)
Date: Mon Jul 18 2005 - 16:32:09 CDT

Ken,
 
Maybe try moving the movesel into the loop, i.e.
 
# atom move and rmsd calculation loop
  for {set i 1 } {$i < $nf } { incr i } {
      set sel [atomselect $selid $seltext frame $i]
      set movesel [atomselect $selid all frame $i]
      $movesel move [measure fit $sel $ref]
      puts $outfile "[measure rmsd $sel $ref]"
  }

and remove it from outside the loop?
 
Chris
 
Christopher H. Chang, Ph.D.
Research Associate
National Renewable Energy Laboratory
1617 Cole Blvd., Mail Stop 1608
Golden, CO 80401
Phone (303) 275-3751
Fax (303) 275-4007

-----Original Message-----
From: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu]On Behalf Of Sale, Kenneth L
Sent: Monday, July 18, 2005 1:48 PM
To: vmd-l_at_ks.uiuc.edu
Subject: vmd-l:

I am trying to overlay each frame of a trajectory onto another structure using the move command in a loop over the trajectory. However, the only frame that moves is the very last frame of the trajectory. My script is:

proc fit2mols_traj { refid reftext selid seltext } {
  set ref [atomselect $refid $reftext]
  set sel [atomselect $selid $seltext]
  set movesel [atomselect $selid all]

  set outfile [open rmsd.dat w];
  set nf [molinfo $selid get numframes]

# atom move and rmsd calculation loop
  for {set i 1 } {$i < $nf } { incr i } {
      set sel [atomselect $selid $seltext frame $i]
      $movesel move [measure fit $sel $ref]
      puts $outfile "[measure rmsd $sel $ref]"
  }
  close $outfile
}

Is there some way to overlay each frame onto a common structure?

Thanks,

Ken