MolSSI Integral Reference Project
Testing, Test Files, and Reference Files

General Information

MIRP can create two different types of files - reference files and test files. While they can both be created and used by MIRP, they serve two different purposes.

Note
For details on the formats of these files, see Test and Reference File Formats

Reference Files

Reference files are meant to be used by integral packages to validate their own implementation. These files contain integrals derived from a molecule and basis set, and computed to 'exact' double precision (see mirp_name_single_exact). Reference files have a .ref extension, and are created with the mirp_create_reference executable. They can also be tested/verified with the mirp_verify_reference executable.

Examples of how to read a reference file can be found in the examples subdirectory of the MIRP source.

Test Files

Test files are meant to verify the internal implementation of MIRP itself. The inputs and computed integrals are stored in interval arithmetic (via the Arb library) with the calculated error bars. Inputs for test file creation have a .inp extension, and the actual outputs have a .dat extension. The test output files are created via mirp_create_test and then later tested with mirp_verify_test.

To create a new test file, a test input file must first be created. This can be created by any means, although it must conform to the input test file format (see Test Inputs and Outputs). Scripts that generate test inputs should be placed in the generator subdirectory of the tests directory.

Once an input is created, the reference data file can be created via the mirp_create_test command. Once a test has been created and verified, its sha256sum should be added to the sha256sums file in the tests directory. This will help protect against inadvertent changes.

Functionality in MIRP can then be tested using the mirp_verify_test command. These types of tests are typically added to a CMake script in the tests directory of the MIRP repo so that they can be run via ctest.

Test Verification

When possible, the reference test data must be verified by another means. Scripts, Mathematica notebooks, etc, that do this should be placed in the verify subdirectory of the tests directory.