From: Axel Kohlmeyer (
Date: Fri Apr 15 2005 - 16:19:25 CDT

On Sat, 16 Apr 2005 02:31:45 +0800 "M SH" wrote:

please take some time to browse to
and try to create mails, that can be read by
people who are not able to read html in the raw.

> <html><div style='background-color:'><DIV class=RTE></DIV>
> <P>Hi,</P>
> <P>I can get the coordinates of one atom like following:</P>

> <P>set selp [atomselect top "name POT"]<BR>set pxyz [$selp get {x y z}]<BR>fo
reach {xp yp zp} $pxyz { break }<BR><BR>But I don't know how to load into a vec
tor. I want to use vector operator to speed up my computation.</P>

this is a fequently asked question. using the get suboption to a
selection will always return a list, even if there is only one item
in the selection. so your code could be

set selp [atomselect top "name POT"]
set pxyz [$selp get {x y z}]
foreach vec $pxyz {
  puts [vecscale 2.0 $vec] ; # and here $vec will already by a vector (i.e. a list of numbers)

> <P>Also how can I store my sampling&nbsp;data&nbsp;from simulation steps? Can
 I just use global or do I have the write it into&nbsp;a file onto harddisk.</P
i don't understand quite what you mean by this, but assuming,
that you new want to move through your trajectory, you can
simply load all parts of your trajectory with 'mol addfile'
and then update the selection to any frame you want, e.g. by

$selp frame 10

you got to the eleventh frame.

> <P>Thanks a lot!<BR><BR>Life is beautiful. </P>
> <DIV></DIV></div></html>

Axel Kohlmeyer      e-mail:
Lehrstuhl fuer Theoretische Chemie          Phone: ++49 (0)234/32-26673
Ruhr-Universitaet Bochum - NC 03/53         Fax:   ++49 (0)234/32-14045
D-44780 Bochum         
If you make something idiot-proof, the universe creates a better idiot.