From: Geist, Norman (
Date: Fri Jun 10 2022 - 02:05:21 CDT

Hey ;Michael,

you can simply catch the output of a command by placing it into square

set a  [atomselect top all]
set radii [$a get radius]

$a set radius $radii

or without storing inbetween:

$a set beta [$a get charge]

or multiple properties at once:

$a set {beta occupancy} [$a get {charge mass}]

Norman Geist

Am Freitag, den 10-06-2022 um 07:02 schrieb

Dear all,


Can anyone instruct me how to pass a list from a result?


For example,

set sel [atomselect top all]

$sel get radius


will return a list of all atoms’ radius, let’s call it list_A.


Now if I want to pass this list back (just for practice purpose):

$sel set radius list_A


How to pass result of “$sel get radius” to a variable list_A and
use it in “set radius” command?


Thank you very much.


Michael M.