65 MATRIX OPERATIONS

`MATROP` performs simple matrix manipulations for matrices whose dimensions
are those of the one particle basis set. To do so, first required matrices are loaded into
memory using the `LOAD` command. To each matrix an internal *name*
(an arbitrary user defined string) is assigned, by which it is referenced in further commands.
After performing operations, the resulting matrices can be saved to a dump
record using the `SAVE` directive. Numbers, e.g. traces or individual
matrix elements, can be saved in variables.

*code* may be one of the following:

`LOAD`- Loads a matrix from a file
`SAVE`- Saves a matrix to a file
`ADD`- Adds matrices
`TRACE`- Forms the trace of a matrix or of the product of two matrices
`MULT`- Multiplies two matrices
`TRAN`- Transforms a matrix
`DMO`- Transforms density into MO basis
`NATORB`- Computes natural orbitals
`DIAG`- Diagonalizes a matrix
`OPRD`- Forms an outer product of two vectors
`DENS`- Forms a closed-shell density matrix
`FOCK`- Computes a closed-shell fock matrix
`COUL`- Computes a coulomb operator
`EXCH`- Computes an exchange operator
`PRINT`- Prints a matrix
`PRID`- Prints diagonal elements of a matrix
`PRIO`- Prints orbitals
`PRIC`- Prints the transpose of a matrix in scientific notation
`ELEM`- Assigns a matrix element to a variable
`READ`- Reads a square matrix from input
`WRITE`- Writes a square matrix to a file
`SET`- Assigns a value to a variable
`ADDVEC`- Adds a multiple of a column of one matrix to a column of a second matrix

Note that the file name appearing in above commands is converted to lower case on unix machines.

See the following subsections for explanations.

- 65.1 Calling the matrix facility (
`MATROP`) - 65.2 Loading matrices (
`LOAD`) - 65.3 Saving matrices (
`SAVE`) - 65.4 Adding matrices (
`ADD`) - 65.5 Trace of a matrix or the product of two matrices (
`TRACE`) - 65.6 Setting variables (
`SET`) - 65.7 Multiplying matrices (
`MULT`) - 65.8 Transforming operators (
`TRAN`) - 65.9 Transforming density matrices into the MO basis (
`DMO`) - 65.10 Diagonalizing a matrix
`DIAG` - 65.11 Generating natural orbitals (
`NATORB`) - 65.12 Forming an outer product of two vectors (
`OPRD`) - 65.13 Combining matrix columns (
`ADDVEC`) - 65.14 Forming a closed-shell density matrix (
`DENS`) - 65.15 Computing a fock matrix (
`FOCK`) - 65.16 Computing a coulomb operator (
`COUL`) - 65.17 Computing an exchange operator (
`EXCH`) - 65.18 Printing matrices (
`PRINT`) - 65.19 Printing diagonal elements of a matrix (
`PRID`) - 65.20 Printing orbitals (
`PRIO`) - 65.21 Printing a matrix transpose in scientific notation(
`PRIC`) - 65.22 Assigning matrix elements to a variable (
`ELEM`) - 65.23 Setting a matrix element to a variable (
`POKE`) - 65.24 Reading a matrix from the input file (
`READ`) - 65.25 Writing a matrix to an ASCII file (
`WRITE`) - 65.26 Examples
- 65.27 Exercise: SCF program

manual quickstart instguide update basis

molpro@molpro.net 2017-12-15