[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-users] Getting particle position

From: Paul Peterson
Subject: Re: [ESPResSo-users] Getting particle position
Date: Tue, 7 Apr 2015 16:38:25 +0200

Thanks a lot,


2015-04-07 16:21 GMT+02:00 Florian Weik <address@hidden>:
Hello Paul,
the return value of part $id pr pos ($ppos in your case) can be used as a tcl list, so you can get the entries with [lindex $ppos 0], [lindex $ppos 1] and so one. This is standard tcl.


On Tue, Apr 7, 2015 at 4:18 PM, Paul Peterson <address@hidden> wrote:

referring to this (quite old) thread:

I try to get a particle position writing:
set ppos [part $pid print pos]
but I don't know how to address the coordinate values in the ppos variable.
When I print it out it looks correct (3 coordinate values are displayed) but when I try to address, for example, the x coordinate with ppos(1), Tcl complains that ppos is not an array. What should I do then?
Would be grateful for any suggestion,

Florian Weik, Dipl.-Phys.,
Institut für Computerphysik, Allmandring 3, D-70569 Stuttgart
Phone: +49-711-685-67703
Public Key 0x0562F11D Fingerprint 3294 6360 EC93 37A3 BD40  F597 0BAD 3AF8 0562 F11D

reply via email to

[Prev in Thread] Current Thread [Next in Thread]