VMD-L Mailing List
From: Jérôme Hénin (jerome.henin_at_uhp-nancy.fr)
Date: Wed Mar 22 2006 - 01:31:13 CST
- Next message: q=CF=20=B3=C2?=: "Something about loading LAMMPS trace file"
- Previous message: pinisetty dinesh: "euler angles"
- In reply to: Sergio Anis: "Re: what is wrong with this script?"
- Next in thread: Lin: "Problem with differentiating atoms from different frames for dcd file"
- Reply: Lin: "Problem with differentiating atoms from different frames for dcd file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
I suppose "vctdist" was a typo in the parent message.
Anyway, the problem is the following: the atomselect get command returns a Tcl
list with as many elements as there are atoms in the selection. In the case
of a single atom, the list has only one element, which is in this case a
three-element list.
Three-element lists of coordinates may be recovered using the join command:
set d [vecdist [join $coor1] [join $coor2]]
Jerome
> i think it is:
> set d [vecdist $coor1 $coor2]
>
> Sergio
>
> lily jin wrote:
> > set sel1 [atomselect top {index 29953}]
> > set sel2 [atomselect top {index 29957}]
> > set coor1 [$sel1 get {x y z}]
> > set coor2 [$sel2 get {x y z}]
> > set d [vctdist $coor1 $coor2]
> > puts $d
> >
> > When I run it, it says:
> > "vecsub: non-numeric in first argument"
> >
> > aren't $coor1 and $coor2 vectors here? What should I do? Thanks
> >
> >
> > *Lily*
- Next message: q=CF=20=B3=C2?=: "Something about loading LAMMPS trace file"
- Previous message: pinisetty dinesh: "euler angles"
- In reply to: Sergio Anis: "Re: what is wrong with this script?"
- Next in thread: Lin: "Problem with differentiating atoms from different frames for dcd file"
- Reply: Lin: "Problem with differentiating atoms from different frames for dcd file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]