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

From: Jerome Henin (jhenin_at_cmm.chem.upenn.edu)
Date: Sun Oct 19 2008 - 09:51:51 CDT

Hi Stanley,

It would probably be faster to use the "label" command.

Best,
Jerome

On Sat, Oct 18, 2008 at 10:15 PM, wayj86 wayj86 <wayj86_at_gmail.com> wrote:
> 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