VMD-L Mailing List
From: Pavan Ghatty (pavan.vmd_at_gmail.com)
Date: Fri Jun 08 2007 - 11:04:10 CDT
- Next message: Harry Bullen: "Re: Python Module"
- Previous message: John Stone: "Re: Python Module"
- Next in thread: Peter Freddolino: "Re: Simple TCL/Tk question"
- Reply: Peter Freddolino: "Re: Simple TCL/Tk question"
- Reply: Robert Brunner: "Re: Simple TCL/Tk question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hello all,
I loaded a pdb file on vmd and typed the following commands on the Tcl/Tk
console:
set h12 [atomselect top "serial 6"]
set vector [$h12 get {x y z}]
veclength $vector
That is what I want to do but Tcl keeps complaining that $vector is
non-numeric. How else should I load the coordinates of h12 in to a vector
without using foreach.
This worked
foreach coord [$h12 get {x y z}] {
puts [veclength $coord]
}
Thanks.
Pavan
- Next message: Harry Bullen: "Re: Python Module"
- Previous message: John Stone: "Re: Python Module"
- Next in thread: Peter Freddolino: "Re: Simple TCL/Tk question"
- Reply: Peter Freddolino: "Re: Simple TCL/Tk question"
- Reply: Robert Brunner: "Re: Simple TCL/Tk question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]