19.01.2015 Views

MOLPRO

MOLPRO

MOLPRO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8 VARIABLES 57<br />

Note: Setting the variables NELEC, SPIN, or SYMMETRY, has the same effect giving these on<br />

a gobal WF directive. If the global WF directive is given after the variable definition, the values<br />

of the variables are replaced by the values given on the WF directive. Vice versa, if a variable<br />

definition follows a gobal WF directive, the new value of the variable is used in the following.<br />

Note that WF input cards in command blocks have preference over global WF directives or input<br />

variables.<br />

8.9 Displaying variables<br />

Variables or the results of expressions can be displayed in the output using SHOW and TABLE.<br />

8.9.1 The SHOW command<br />

The general form of the SHOW command is as follows:<br />

SHOW[ncol,format],expression<br />

where expression can be an expression or variable, ncol is the number of values printed per line<br />

(default 6), and format is a format (default 6F15.8). This can be used to print vectors in matrix<br />

form. The specification of ncol and format is optional. Assume that E is a vector:<br />

SHOW,E<br />

SHOW[n],E<br />

prints E using defaults.<br />

prints E with n elements per line; (if n>6, more than one line is needed, but<br />

in any case a new line is started after n elements).<br />

SHOW[n,10f10.4],E prints E in the format given, with newline forced after n elements.<br />

Note that the total length of the format should not exceed 100 characters (a left margin of 30<br />

characters is always needed).<br />

A wild card format can be used to show several variables more easily:<br />

SHOW,qm*,dm*<br />

shows all variables whose names begin with QM and DM. Note that no letters must appear after<br />

the *, i.e., the wild card format is less general than in UNIX commands.<br />

See the TABLE command for another possibility to tabulate results.<br />

8.10 Clearing variables<br />

Variables can be deleted using<br />

CLEAR,name1, name2, . . .<br />

Wild cards can be used as in SHOW, e.g.,<br />

CLEAR,ENERG*<br />

clears all variables whose names begin with ENERG. All variables can be cleared using<br />

CLEARALL<br />

The length of vectors can be truncated simply by redefining the length specifier: #R=2 truncates<br />

the array R to length 2. Higher elements are no longer available (but could be redefined). Setting<br />

#R=0 is equivalent to the command CLEAR,R.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!