From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri May 02 2008 - 10:39:04 CDT

Tom,
  Change these two lines:
set atom1coor [lindex [$atom1 get {x y z } ] 0]
set atom2coor [lindex [$atom2 get {x y z } ] 0]

Cheers,
  John Stone

On Fri, May 02, 2008 at 10:28:30AM -0500, Thomas C. Bishop wrote:
> Dear VMD,
> I've run into this before and have now forgotten how to solve it
> "properly".
>
> The following snippet does not work b/c the atomcoor lists as written
> are not what vecsub expects....
>
> what's most elegant way to solve this?
> thanks
> Tom
>
>
> ************ snippet ********************
> set atom1 [atomselect top { index 10 } ]
> set atom2 [atomselect top { index 15 } ]
>
> set atom1coor [$atom1 get {x y z } ]
> set atom2coor [$atom2 get {x y z } ]
> set diff [vecsub $atom1coor $atom2coor ]
>
>
>
> --
> ***********************
> * Thomas C. Bishop *
> *Office: 504-862-3370 *
> *CCS: 504-862-8391 *
> *Fax: 504-862-8392 *
> ***********************

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078