From: Ricard Argelaguet (
Date: Thu May 29 2014 - 11:22:18 CDT

I need to calculate the RMSF for all CA atoms for 500 trajectories, so I
need to automatize the computation.
I have the following script:

proc rmsf_all_ca {} {
  set file_name "Calfa-rmsf.dat"
  set outfile [open $file_name w];
  set sel [atomselect top "resid 1 to 198 and name CA"]
  set mol [$sel molindex]
  for {set i 0} {$i < [$sel num]} {incr i} {
     set rmsf [measure rmsf $sel]
     puts $outfile "[expr {$i+1}] [lindex $rmsf $i]"
  close $outfile

However, I am encountering the following problem: In order to calculate
RMSF, I need to align first, and I usually do it manually with the VMDTT.
But now I have to automatize that step. I know about the use of measure fit
to align and calculate RMSD. However, for RMSF is more complicated as I do
not have a single reference frame.

Any idea??