Documents/NamdSample/namdsample/1-2-sphere/rmsd.tcl (11 lines of code) (raw):

set outfile [open rmsd.dat w]; set nf [molinfo top get numframes] set frame0 [atomselect top "protein and backbone and noh" frame 0] set sel [atomselect top "protein and backbone and noh"] # rmsd calculation loop for {set i 1 } {$i < $nf } { incr i } { $sel frame $i $sel move [measure fit $sel $frame0] puts $outfile "[measure rmsd $sel $frame0]" } close $outfile