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.

3 DEFINITION OF <strong>MOLPRO</strong> INPUT LANGUAGE 12<br />

COS(expr)<br />

TAN(expr)<br />

ASIN(expr)<br />

ACOS(expr)<br />

ATAN(expr)<br />

COSH(expr)<br />

SINH(expr)<br />

TANH(expr)<br />

MOD(expr1 , expr2 )<br />

Cosine<br />

Tangent<br />

Arcsine<br />

Arccosine<br />

Arctangent<br />

Hyperbolic cosine<br />

Hyperbolic sine<br />

Hyperbolic tangent<br />

Remainder: expr1-INT(expr1/expr2)*expr2<br />

Note: all trigonometric functions use or produce angles in degrees.<br />

3.9 Variables<br />

3.9.1 Setting variables<br />

Data and results can be stored in <strong>MOLPRO</strong> variables. Variables can be of type string, floating,<br />

or logical and may be used anywhere in the input.<br />

The syntax for setting variables is<br />

VARNAME1=expression [unit],VARNAME2=expression [unit]<br />

where unit is optional. If a variable is undefined, zero is assumed.<br />

Variables are useful for running the same input with different actual parameters (e.g. geometries<br />

or basis function exponents), and to store and manipulate the results. Arrays are variables with<br />

an index in parenthesis, e.g., var(1). The number of elements in an array var is #var.<br />

The array length can be reset to zero by the CLEAR directive or simply by modifying #var.<br />

Variables and variable arrays may be displayed at any place in the output by the SHOW command,<br />

and whole tables of variables can be generated using the TABLE command. For more details<br />

about variables see section 8.<br />

3.9.2 String variables<br />

Special care is necessary when using strings. In order to avoid unexpected results, either a $ has<br />

to be prefixed whenever a string variable is set, or the string has to be given in quotes. Possible<br />

forms are<br />

$name=string<br />

name=’string’<br />

name=string variable<br />

$name=string variable<br />

Examples:<br />

string1=’This is a string’<br />

string2=string1<br />

!define a string variable. Text in quotes is not<br />

! converted to upper case.<br />

!assign string variable string1 to a new variable

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

Saved successfully!

Ooh no, something went wrong!