VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Fri Dec 12 2014 - 05:20:29 CST
On Thu, Dec 11, 2014 at 5:43 PM, Eric Smoll <ericsmoll_at_gmail.com> wrote:
> Hello vmd users,
> When a file is loaded with "mol new $filename" in a tcl script, is this
> molecule visible to atomselect expressions in a procedure? If not, what is
> the recommended way to "pass" or "make visible" the molecule in the local
> scope of a function?
molecules are a global property and thus always visible.
when you create a new molecule, the return value of the mol command is
the molecule id of the new molecule, so you can do something like
set mol [mol new $filename]
set sel [atomselect $mol all]
-- Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0 College of Science & Technology, Temple University, Philadelphia PA, USA International Centre for Theoretical Physics, Trieste. Italy.