From: Joao Ribeiro (
Date: Thu Dec 12 2019 - 16:18:58 CST

Hi Catherine,


The error message appears because the list rmsf was not defined before the for loop. Also, the sel variable inside the function rmsf_sel was never defined.






From: <> on behalf of "crockett c.h. (chc2g16)" <>
Date: Thursday, December 12, 2019 at 12:44 PM
To: "<>" <>
Subject: vmd-l: Running RMSF script on compute canada




I’m trying to use a script (like the one below) to measure the RMSF (for all residues) of my dcd trajectory file. I know that there are lots of errors in this but the most concerning is the ‘can’t read “rmsf”: no such variable’ and then subsequently ‘measure rmsf: invalid syntax, no such keyword: atomselect0’ When this ‘measure rmsf’ command is done in the tcl window of VMD is there a source script which I would need to manually source in this case?


Many thanks, and any input appreciated as always,



proc rmsf_resid { frame } {

    global outfile sel frame0 nf sel

    $sel mve [measure fit $sel $frame0]

    puts "$frame: [measure rmsf $sel first 1 last 210021 step]"

puts $outfile "$frame [measure rmsf $sel first 1 last 210021 step]"


source bigdcd.tcl

set outfile [open rmsf.dat w]

set mol [mol new 2gbu_wbn.psf type psf waitfor all]

mol addfile 2gbu_6.dcd type dcd waitfor all

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"]

$frame0 global

$sel global

$outfile global

for {set i 0} {$i < [$sel num]} {incr i} {

   puts $outfile "[expr {$i+1}] [lindex $rmsf $i]"


bigdcd rmsf_resid 2gbu_6.dcd


puts $outfile "[measure rmsf $sel first 1 last 210021 step]"

close $outfile



Sent from Mail for Windows 10