From: Patrick Wintrode (patrick.wintrode_at_case.edu)
Date: Wed Mar 14 2007 - 16:06:30 CDT

Dear all,

I've been having difficulty measuring the distance between two
selections during a trajectory. The script I tried was

-------------------------------------------------------------------------------------
set n [molinfo top get numframes]
  for {set i 0} {$i < $n} {incr i} {
set sel1 [atomselect top "index 401"]

set crds1 [$sel1 get {x y z}]

set sel2 [atomselect top "index 3361"]

set crds2 [$sel2 get {x y z}]

set dists {}
foreach a $crds1 b $crds2 {
  set diff [veclength [vecsub $a $b]]
  lappend dists $diff
}
puts "dists: $dists"

}
-------------------------------------------------------------------------------

The result is that it prints out the same value for all frames, even
though I've confirmed that it changes.

Any suggestions?

Thanks.

Patrick L. Wintrode, Assistant Professor
Department of Physiology & Biophysics
School of Medicine, Case Western Reserve University
10900 Euclid Avenue
Cleveland, OH 44106-4970
Phone: 216-368-3178
Fax: 216-368-3952
E-mail: patrick.wintrode_at_case.edu