How can I calculate the distance between two atoms frame by frame?

From: wayj86 wayj86 (wayj86_at_gmail.com)
Date: Sat Oct 18 2008 - 21:15:25 CDT

Dear NAMD users,

I was trying to calculate the distance between two atoms frame by frame with
the VMD's function bond and the scripts below was something wrong:

set outfile [open distance.dat
w];
set nf [molinfo top get numframes]
set sel [atomselect top "protein"]
# rmsd calculation loop
for {set i 1 } {$i < $nf } { incr i } {
    $sel frame $i
    puts $outfile "[measure bond {6086 2421} $i]"
}
close $outfile

With this script I can only get the distance of the present frame.So could
you please tell me how should I modify my script?Thank you so much for any
help.

Best wishes,
Stanley

-- 
The future is now!

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:49:59 CST