From: Leonardo Trabuco (ltrabuco_at_ks.uiuc.edu)
Date: Sat Jun 30 2007 - 20:14:56 CDT

Hi Parminder,

On Sat, Jun 30, 2007 at 08:09:18PM -0400, Parminder Mankoo wrote:
> I am trying to write "RMSF" from 1500ps trajectory for 900 residues.
> I use following 4 line script to do it. However, the output is not
> what I expected. I want to get RMSF of each residue to print on a
> separate line so I could plot it easily. Does anyone has a working
> script of rmsf for to try or suggest any changes to following script?
>
> thanks, parminder
>
> set outfile [open rmsf.dat w]
> set sel [atomselect top "name CA"]
> puts $outfile "[measure rmsf $sel first 1 last 1500 step 1]"
> close $outfile

This should do the trick:

for {set i 0} {$i < [$sel num]} {incr i} {
  puts $outfile "[expr {$i+1}] [lindex $rmsf $i]"
}

Cheers,
Leo

-- 
Leonardo Trabuco, Ph.D. student
Theoretical and Computational Biophysics Group
University of Illinois at Urbana-Champaign