Global Variables and Environment Variables


BTCL maintains some global variables that are used mainly as defaults for BTCL commands. The two most important are:

When the Discover program starts, the value of randomSeed is set randomly (according to the time of day), and its value is printed. This is so that the same random seed can be used again in later Discover runs, if desired. Setting the randomSeed variable is equivalent to using the control command of version 3.1 of DSL, a command that is no longer supported.

For commands that return the result of a numerical evaluation, the precision is controlled by the tcl_precision variable. The maximum value is 17. This value also has the special characteristic that any value converted from an IEEE floating-point value to a string and back is guaranteed to have the same binary representation before and after the conversion.

The Discover program makes use of several environment variables. These are easily accessed by BTCL by using the $env() array. For example, the $FORCEFIELD environment variable can be accessed by:

BTCL >   echo $env(FORCEFIELD) 
 cvff

Main access page Advanced-Use access.

BTCL Language access Command Parameter Types Format for Documenting Syntax

Copyright Biosym/MSI