# Validating MPQC

After you compile MPQC, you should run the validation suite.

You should also run the validation suite if you upgrade your operating system software, since this could change shared libraries that are linking with MPQC and could affect the results. Note that the reference validation suite has not been verified relative to an independent code, except for a few spot checks. If you find that MPQC doesn't produce the same answer as another quantum chemistry program that you trust, then please promptly notify us and send all the details.

The top-level Makefile has several targets that can be used to check an MPQC build. MPQC must be built before one of these targets is used:

`check`
  The same as `check0` below. This is only available from the top-level directory and `src/bin/mpqc/validate`.
`check0`
  Run the smallest MPQC verification suite. It tests basic functionality. This is only available from the top-level directory and `src/bin/mpqc/validate`.
`check1`
  Run the intermediate MPQC verification suite. It runs most of the tests, only leaving out very expensive runs. This is only available from the top-level directory and `src/bin/mpqc/validate`.
`check2`
  Run the complete MPQC verification suite. Depending on the compilation and runtime environment, tests that are not expected to work will be omitted. This is only available from the top-level directory and `src/bin/mpqc/validate`.
`check_clean`
  Remove MPQC verification suite output files. This is only available from the top-level directory and `src/bin/mpqc/validate`.
`testbuild`
  Verify that a variety of small test programs compile. If static libraries are used, this will require a substantial amount of disk space.
`testrun`
  Run a variety of small test programs. This will build them if necessary.

The check targets will run mpqc with the mpqcrun (see mpqcrun) command. You can give arguments to mpqcrun by setting the `MPQCRUN_ARGS` variable on the make command line.

The verification suite is in `src/bin/mpqc/validate`. After running it, the output files can be found in `src/bin/mpqc/validate/run`. The check targets will compare outputs that your build produced to the reference files in `src/bin/mpqc/validate/ref`. The input files can be found with the reference files. For each comparison, first the status (`ok`, `missing`, or `failed`) for each file is printed. If both statuses are `ok` then an `E:` is printed followed by the number of digits to which the energies agree. If they agree to all digits `99` is printed. If a gradient was computed, then `Grad:` is printed followed by the number of digits to which the gradients in least agreement agree. Other properties checked in this way include frequencies, diagnostics, and populations.

If two numbers do not agree to the expected accuracy, then an asterisk, `*`, is printed after the number of digits in agreement.

Finally, you can do a detailed comparison of the contents of the `ref` and `run` subdirectories by typing `make diff`.

The input files in the verification suite are divided into several categories:

`h2o`
  These are simple tests that exercise many of MPQC's features.

`h2omp2`
  Tests that further exercise MP2.

`h2ofrq`
  Tests of H2O frequencies with a variety of methods.

`mbpt`
  These tests exercise MP2 as well as the open-shell perturbation theory methods. The various available algorithms are tested as well.

`ckpt`
  Tests the checkpoint and restart capabilities.

`symm1`
  Tests of point group symmetry.

`symm2`
  More point group symmetry tests. These use basis sets with higher angular momentum than symm1#.

`symm3`
  Tests automatic point group determination.

`basis1`
  A variety of basis sets are tested for first row atoms along with hydrogen and helium.

`basis2`
  Basis sets test for second row atoms.

`methods`
  Basic tests of several of MPQC's methods.

`clscf`
  More tests of methods based on CLSCF.

`hsosscf`
  More tests of methods based on HSOSSCF.

`uscf`
  More tests of methods based on UnrestrictedSCF.

`dft`
  More tests of the CLKS method.

`mp2r12`
  More tests of MP2-R12.

`ccaintv3`
  Tests of embedded CCA integrals components using `intv3`.

`ccacints`
  Tests of embedded CCA integrals components using `cints`.