From: Norman Geist (
Date: Fri Mar 28 2014 - 03:00:02 CDT

You might be interested in global variables or environment variables. Try
something like:


set env(SEL1) [atomselect top “all”]


and to use it:


$env(SEL1) get index


Should work, but untested. Additionally, you shouldn’t call a atomselect
object a “list” which is something very different, especially for TCL, just
for better understanding.


Norman Geist.


Von: [] Im Auftrag von
Tristan Croll
Gesendet: Freitag, 28. März 2014 01:04
An: vmd-l list
Betreff: vmd-l: TCL scripting question: how to make a list of atomselections


I have a proc which on the fly creates two sets of atomselections, each of
which I have stored in list variables (call them $list1 and $list2). A
second proc then uses data from the atomselections in $list1 to write
coordinates to $list2. This works fine as long as the second proc is called
from within the first – but I want to be able to re-call the second proc
(from a head proc running a GUI) to update coordinates as the reference
structure changes. This is where problems arise: $list1 and $list2 are
actually just lists of text pointers to atomselections, but the actual
atomselect variables were “helpfully” dropped the moment the first proc
completed. I’m just wondering if someone could advise me on the most
elegant way to hand such procedurally-generated variables back up the chain
to that head proc?






Tristan Croll


Faculty of Health

Institute of Health and Biomedical Engineering

Queensland University of Technology

60 Musk Ave

Kelvin Grove QLD 4059 Australia

+61 7 3138 6443


This email and its attachments (if any) contain confidential information
intended for use by the addressee and may be privileged. We do not waive
any confidentiality, privilege or copyright associated with the email or the
attachments. If you are not the intended addressee, you must not use,
transmit, disclose or copy the email or any attachments. If you receive
this email by mistake, please notify the sender immediately and delete the
original email.



Diese E-Mail ist frei von Viren und Malware, denn der avast! Antivirus Schutz ist aktiv.