From: Josh Vermaas (
Date: Thu May 29 2014 - 13:22:25 CDT

Hi Ricard,

Why is it more complicated? What I do is align each frame with a single
chosen reference (usually the original pdb structure), and then
calculate the RMSF once everything is aligned. RMSF measures
fluctuations from the average position, so it shouldn't matter what you
align your structures to, the internal degrees of freedom are unaffected.

One oddity in your script: why is the measure rmsf command inside the
loop? The answer won't change, but now you are computing the RMSF of
your entire selection ~200 times instead of once.
-Josh Vermaas

On 5/29/14, 12:22 PM, Ricard Argelaguet wrote:
> 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??
> Thanks!