From: Andres Morales N (
Date: Thu Sep 03 2009 - 07:45:06 CDT

Dear VMD users:
I was using script below to calculte a matrix that contains rmsd between structures from a dcd file:

set outfile [open rmsd_min.txt w];

set sel1 [atomselect top "protein and backbone and noh"]

set nf1 [molinfo top get numframes]

set sel2 [atomselect top "protein and backbone and noh"]


for {set i 0 } {$i < $nf1 } { incr i } {

for {set j $i } {$j < $nf1 } { incr j } {

$sel1 frame $i

$sel2 frame $j

$sel2 move [measure fit $sel2 $sel1]

set rmsd_matrix($i,$j) [measure rmsd $sel2 $sel1]

$sel2 move [measure fit $sel2 $sel1]

set rmsd_matrix($j,$i) [measure rmsd $sel2 $sel1]



for { set i 0 } { $i < $nf1 } { incr i} {

for { set j 0 } { $j < $nf1 } { incr j } {

puts -nonewline $outfile "$rmsd_matrix($j,$i) "


puts $outfile ""


close $outfile


It was working well. I created a mutated structure and now I need to calculate RMSD matrix between structures from both dcd files (one of native structure and another from mutated structure), and I do not know how I should change the script above to do it. I wait somebody can help me.


Thanks for your suggestions


King regards







Explore the seven wonders of the world