From: divya nayar (divya.alchemist_at_gmail.com)
Date: Mon Nov 08 2010 - 03:01:14 CST

Hi,
I am using fit.tcl to fit the frames of my MD trajectory with the reference
frame 0. I am studying a system of solvated peptide. Can anyone tell me how
the command 'fit' works? VMD tutorial says something regarding 4X$ matrix
transformation. Can anyone tell me a frerence to this or explain what
exactly happens when we fit a frame to a reference frame. The tcl script is
as follows:

## This takes a selection and fits that selection for every frame in the
## molecule (all atoms are moved, but the fit is based on the selection).
##
## For example: fitframes top "protein"
##
## -Jim
proc fitframes { molid seltext } {
          set ref [atomselect $molid $seltext frame 0]
    set sel [atomselect $molid $seltext]
  set all [atomselect $molid all]
  set n [molinfo $molid get numframes]

  for { set i 1 } { $i < $n } { incr i } {
              $sel frame $i
                  $all frame $i
                      $all move [measure fit $sel $ref]
                }
                  return
          }

Thanks,
Divya