Re: on-the-fly parameter introspection

From: Jim Phillips (jim_at_ks.uiuc.edu)
Date: Mon Feb 09 2015 - 13:18:02 CST

Yes, to query the parameter values you would use "[outputEnergies]" and
"[stepspercycle]". Think of parameter names as commands, not variables.
If you supply an argument you set the parameter value, and without an
argument you get the parameter value. This avoids potential variable name
conflicts with user code and avoids "set ..." verbosity.

Jim

On Thu, 5 Feb 2015, Brian Radak wrote:

> I'm a little confused by the manual regarding parameter introspection via Tcl
> scripting.
> From p 17:
>
> Configuration file parameter introspection is supported by invoking
> a (case-insensitive) pa-
> rameter keyword with no argument (e.g., “numsteps”) and by the
> helper commands “isset”
> and “istrue”. Note that keywords are not parsed until the first
> “run” command, and before
> this values are treated as unformatted strings, so for example
> “eFieldOn” and “eField” may
> return “yes” and “1 2 3” before the first “run” command, but
> “1” and
> “1.0 2.0 3.0” after
> parsing (“istrue eFieldOn” would return “1” in both cases).
> Similarly, “isset badparam” will
> return “0” before parsing but raise an “unknown parameter” error
> after.
>
>
> Can I use this to query the setting of a parameter? As part of a script I'd
> like to check the value of outputEnergies and stepspercycle. Obviously these
> do not behave like normal Tcl variables, but I'd like them to.
>
> Brian
>
>
> --
> Brian Radak
> Postdoctoral Scholar
> Gordon Center for Integrative Science, W323A
> Department of Biochemistry & Molecular Biology
> University of Chicago
> 929 E. 57th St.
> Chicago, IL 60637-1454
> Tel: 773/834-2812
> email: radak_at_uchicago.edu
>

This archive was generated by hypermail 2.1.6 : Tue Dec 27 2016 - 23:20:54 CST