RE: conditional statements in conf files

From: Glenn Johnson (gjohnson_at_srrc.ars.usda.gov)
Date: Mon Feb 14 2005 - 15:49:46 CST

On Mon, 2005-02-14 at 16:40 -0500, Blake Charlebois wrote:

> Hi,
>
> I am not sure I understand your question.
>
> 1 is true and 0 is false, so "if {1}" is equivalent to not having an if
> statement at all, while "if {0}" is equivalent to commenting out the lines
> between the subsequent "{" and "}". (Actually, I suspect anything other than
> 0 is true.)

That answers my question. I guess I was trying to complicate it.

Thanks.

> I've found this page useful:
> http://www.tcl.tk/man/tcl8.3/TclCmd/contents.htm
>
> Hope that helps,
> Blake
>
> -----Original Message-----
> From: owner-namd-l_at_ks.uiuc.edu [mailto:owner-namd-l_at_ks.uiuc.edu] On Behalf
> Of Glenn Johnson
> Sent: February 14, 2005 3:59 PM
> To: NAMD List
> Subject: namd-l: conditional statements in conf files
>
>
> For the 2-3-energies tutorial, the conf file has conditional statements:
>
> if {1} {
> set inputname ../1-2-sphere/ubq_ws_eq
> .
> .
> .
> }
> .
> .
> .
> if {0} {
> minimize 100
> reinitvels $temperature
>
> }
>
>
> I can see that this is testing for true/false but I can not see exactly
> what is tested. Well, I can see that it is testing if the run is a
> restart run but how is that done?
>
> Thanks.
>

-- 
Glenn Johnson <gjohnson_at_srrc.ars.usda.gov>
U. S. Department of Agriculture

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:39:10 CST