19.01.2015 Views

MOLPRO

MOLPRO

MOLPRO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

56 MATRIX OPERATIONS 387<br />

56.22 Reading a matrix from the input file (READ)<br />

READ,name,[[TYPE=]type],[[SUBTYPE=]subtype],[[SYM=]symmetry], [FILE=file]<br />

{ values }<br />

Reads a square matrix (symmetry 1) from input or an ASCII file. The values can be in free<br />

format, but their total number must be correct. Comment lines starting with ’#’, ’*’, or ’!’ are<br />

skipped. If the data are given in input, the data block must be enclosed either by curley brackets<br />

or the first linbe must be BEGIN DATA and the last line END DATA. If a filename is specified as<br />

option, the data are read from this file. In this case, the BEGIN DATA, END DATA lines in the<br />

file are optional, and no data block must follow.<br />

For compatibility with older versions, the data can also be included in the input using the<br />

INCLUDE command (see section 3.1). In this case, the include file must contain the BEGIN DATA<br />

and END DATA lines (this is autopmatically the case if the file has been written using the<br />

MATROP,WRITE directive).<br />

type is a string which can be used to assign a matrix type. If appropriate, this should be any of<br />

the ones used in the LOAD command. In addition, SUBTYPE can be specified if necessary. This<br />

describes, e.g., the type of orbitals or density matrices (e.g., for natural orbitals TYPE=ORB and<br />

SUBTYPE=NATURAL). The matrix symmetry needs to be given only if it is not equal to 1.<br />

56.23 Writing a matrix to an ASCII file (WRITE)<br />

WRITE,name,[filename [status]]<br />

Writes a matrix to an ASCII file. If filename is not given the matrix is written to the output file,<br />

otherwise to the specified file (filename is converted to lower case). If filename=PUNCH it is<br />

written to the current punch file.<br />

If status=NEW, ERASE or em REWIND, a new file is written, otherwise as existing file is appended.<br />

56.24 Examples<br />

The following example shows various uses of the MATROP commands.

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

Saved successfully!

Ooh no, something went wrong!