5.1 Specifying Parameters
FRED is a command line driven program. Parameters are entered in key-value
pairs after the executable name on the command line (parameters can also be
enter using a parameter file, described later in this section, using the
-param flag).
For example:
fred <parameter1 key> <parameter1 value> <parameter2 key> <parameter2 value>
The order in which the parameter key-value pairs appear on the command line
is unimportant, except when the same key is specified twice in which case
the second value specified is used.
For example:
fred <parameter2 key> <parameter2 value> <parameter1 key> <parameter1 value>
is the same as the preceding example.
Keys are always preceeded by a "-" character, e.g., -dbase.
There are several
general types of parameters that restrict the allowable values that can be
given to them.
Boolean Parameters
- Allowed values are on/true/t/yes/y and
off/false/f/no/n indicating true or false respectively (case insensitive). As
a special case boolean parameters can optionally not be followed by a value,
in which case the parameter is set to true.
For example:
FRED -x is the same as
FRED -x true,
provided -x is a boolean parameter.
Integer Parameters
- Value is any integer.
Float Parameters
- Value is any real number, must be in decimal
format (e.g., 1 or 5.23 is allowed, but 1e3 is not).
String Parameters
- Value is a single text word.
File Parameters
- Value is the name of a file.
Molecule Parameters
- Value is the name of a file containing one
molecule record. Many standard file formats are supported (e.g.,
MOL2, SDF, PDB) and format is determined by reading the file extension.
"Parameters File" Parameter
- This is a specialized kind of file
parameter, its value is the name of a parameter file.
A parameter file is a text file containing one or more parameter key-value
combinations that FRED will use in addition to the parameters specified on
the command line. The following rules apply to parameter files:
- One key-value pair per line.
- Blank lines and lines begining with a # character are ignored.
- A parameter file parameter cannot appear in a parameter file
(i.e., do not specify -param in your parameter file).
- If a parameter is specified both on the command line and in the
parameter file, the value specified on the command line is used.
- Boolean parameters must be specified with a key-value pair, the shortcut
that interprets a boolean key without a corresponding value as true on the
command line will not be considered valid in a parameter file. Accordingly
"-x" may not be used as a shortcut for "-x true" for boolean parameters in the
parameter file.
Some parameters are restricted to specific ranges or values as listed in the
individual parameter's documention (see chapter 7).