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 46<br />

Numbers:<br />

Logicals:<br />

Strings:<br />

The value is a number or an expression. The general form of value is<br />

expression [,] [unit]<br />

unit is an optional string which can be used to associate a unit to the value.<br />

ANG[STROM], DEGREE, HARTREE are examples. Undefined variables in<br />

expressions are assumed to be zero (and defined to be zero at the same time).<br />

The value can be .TRUE. or .FALSE. (.T. and .F. also work), or a logical<br />

expression. Internally, .TRUE. is stored as 1 and .FALSE. as zero.<br />

The value can either be a string enclosed in quotes or a string variable. See<br />

section 8.3 for more details.<br />

8.2 Indexed variables<br />

Variables can be indexed, but only one-dimensional indexing is available. Indexed variables can<br />

be defined either individually, e.g.<br />

R(1)=1.0 ANG<br />

R(2)=1.2 ANG<br />

R(3)=1.3 ANG<br />

or as a vector of values enclosed by square brackets:<br />

R=[1.0,1.1,1.2] ANG<br />

Subranges can also be defined, e.g.<br />

R(1)=1.0 ANG<br />

R(2:3)=[1.1,1.2] ANG<br />

leads to the same result as the above two forms.<br />

The type of each element depends on the type of the assigned value, and it is possible to mix<br />

types in one variable. Example:<br />

geometry={he}<br />

hf<br />

result=[program,energy,status.gt.0]<br />

yields:<br />

RESULT(1) = HF-SCF<br />

RESULT(2) = -2.85516048 AU<br />

RESULT(3) = TRUE<br />

In this example the variables PROGRAM, ENERGY, and STATUS are system variables, which<br />

are set by the program (see section 8.4).

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

Saved successfully!

Ooh no, something went wrong!