|
From: | Paul Peterson |
Subject: | Re: [ESPResSo-users] Getting particle position |
Date: | Tue, 7 Apr 2015 16:38:25 +0200 |
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.Cheers,Florian--On Tue, Apr 7, 2015 at 4:18 PM, Paul Peterson <address@hidden> wrote:https://lists.gnu.org/archive/html/espressomd-users/2010-06/msg00023.htmlHi,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,PaulFlorian Weik, Dipl.-Phys.,
Institut für Computerphysik, Allmandring 3, D-70569 Stuttgart
Phone: +49-711-685-67703Public Key 0x0562F11D Fingerprint 3294 6360 EC93 37A3 BD40 F597 0BAD 3AF8 0562 F11D
[Prev in Thread] | Current Thread | [Next in Thread] |