MolSSI Integral Reference Project
Test and Reference File Formats

Test Inputs and Outputs

In both test input and test data files, lines beginning with # are treated as comments. Generally, input files should have a header with a brief description and/or the generator command used to create them. The reference data files should repeat this information and add the command used to generate the data.

Note
In test files, floating point values in the input files are treated as if they are exact to an infinite number of decimal places. Integers always have infinite precision.

The computed values for the various integrals are printed (via the functionality in arb) as a value with associated error radius. This is meant to be interpreted again by the arb_set_str function, although it can certainly be parsed other ways.

Boys Function Test Files

In a test file for the Boys function, the first (non-comment) line contains three integers

  1. The number of tests in the file
  2. The number of significant figures printed for the value of F(m,t)
  3. The working precision used to calculate the value.

After this metadata, each line contains m, t, and the value of F(m,t) for a single integral.

An annotated example of a Boys input file is shown below

# Values for m and t generated with:
# ../../tests/generator/generate_boys_random.py --filename boys_fordoc.inp --max-m 20 --power 32 --seed 395577343 --ndigits 16 --ntests 5
#
# number of tests = 5
5
# m, t for the 5 tests
16 5.872336371807288e-1
18 3.030396749923203e-13
11 1.708340675605109e+17
20 1.538416198979173e-30
17 1.875362589092793e-19

And here is the corresponding test data file

# Values for m and t generated with:
# ../../tests/generator/generate_boys_random.py --filename boys_fordoc.inp --max-m 20 --power 32 --seed 395577343 --ndigits 16 --ntests 5
#
# Reference values for the boys integral generated with:
# ../../build/mirp_bin/mirp_create_test --infile boys_fordoc.inp --outfile boys_fordoc.dat --integral boys --prec 256 --ndigits 24
#
# 5 tests, 24 printed digits (for the value), working precision of 256 bits
5 24 256
# m, t, and F(m,t) values for the five tests
16 5.872336371807288e-1 [0.0174280594790437325586672 +/- 3.30e-26]
18 3.030396749923203e-13 [0.0270270270270192567789503 +/- 1.99e-27]
11 1.708340675605109e+17 [3.98005773913532233803562e-192 +/- 2.68e-216]
20 1.538416198979173e-30 [0.0243902439024390243902439 +/- 2.44e-27]
17 1.875362589092793e-19 [0.0285714285714285714235029 +/- 1.90e-26]

General Integral Test Files

The format for an input for general types of integrals (ie, eri) are as follows. The first line contains the number of tests in the file. Then, there are blocks of inputs containing the shell information for a specified number of centers (ie, eri = 4 center, overlap = 2 center).

Each shell contains the following information (in order)

  1. The angular momentum (integer)
  2. The number of primitives in the shell
  3. The number of general contractions
  4. The coordinates (in bohr)
  5. For each primitive, the exponent and the contraction coefficients for each general contraction

For the test data file, the first line contains the number of tests, number of significant figures, and the working precision used to compute the integrals. After specifying the shells, the integrals are printed (with the error radius). The integral is prefixed with an index of that integral in the shell quartet.

Below is an example of an input file for a 4-center integral

# THIS FILE IS GENERATED VIA A SCRIPT. DO NOT EDIT
#
# Input parameters for ERI generated with:
# ../../tests/generator/generate_integral_frombasis.py --filename 4center_fordoc.inp --basis ../../tests/generator/basis/ano-rcc.bas --geometry ../../tests/generator/geometry/water.xyz --ncenter 4 --ndigits 16 --ntests 2 --seed 13973322
#
2
# FIRST TEST
# Center 1 : F shell, 3 primitives, 3 general contractions
# centered at 0.0 0.0 0.240 bohr
3 3 3 0.0 0.0 0.24018419054568995699
# Each line is exponent, followed by contraction coefficients (for each general contraction)
2.35 0.33460642 -0.83677707 1.04919327
0.94 0.56136672 0.1072197 -1.65994322
0.376 0.29572786 0.72955061 1.137218
# Center 2: D shell, 3, primitives, 3 general contractions
# Centered at 0.0 -1.432 -0.961 bohr
2 3 3 0.0 -1.4324124030970337325 -0.96092573479530561076
1.819 0.27051341 -0.7938035 1.308277
0.7276 0.5510125 -0.0914252 -2.021059
0.29104 0.33108664 0.86200334 1.2498888
# Center 3: F shell, 1, primitives, 1 general contraction
# Centered at 0.0 -1.432 -0.961 bohr
3 1 1 0.0 -1.4324124030970337325 -0.96092573479530561076
0.970109 1.0
# Center 4: P shell, 4, primitives, 4 general contractions
# Centered at 0.0 1.432 -0.961 bohr
1 4 4 0.0 1.4324124030970337325 -0.96092573479530561076
2.305 0.11279019 -0.2108688 0.75995011 -1.442742
0.80675 0.41850753 -0.5943796 0.1646159 2.3489914
0.282362 0.47000773 0.08968888 -1.371014 -1.991152
0.098827 0.18262603 0.8611634 1.0593155 0.90505601
# SECOND TEST, all data run together (typical)
# Center 1: P, 4 prim, 4 gen
# Center 2: G, 2 prim, 2 gen
# Center 3: P, 4 prim, 4 gen
# Center 4: F, 3 prim, 3 gen
1 4 4 0.0 1.4324124030970337325 -0.96092573479530561076
2.305 0.11279019 -0.2108688 0.75995011 -1.442742
0.80675 0.41850753 -0.5943796 0.1646159 2.3489914
0.282362 0.47000773 0.08968888 -1.371014 -1.991152
0.098827 0.18262603 0.8611634 1.0593155 0.90505601
4 2 2 0.0 0.0 0.24018419054568995699
1.175 0.89524901 -0.82800067
0.47 0.16664235 1.2080092
1 4 4 0.0 1.4324124030970337325 -0.96092573479530561076
2.305 0.11279019 -0.2108688 0.75995011 -1.442742
0.80675 0.41850753 -0.5943796 0.1646159 2.3489914
0.282362 0.47000773 0.08968888 -1.371014 -1.991152
0.098827 0.18262603 0.8611634 1.0593155 0.90505601
3 3 3 0.0 0.0 0.24018419054568995699
2.35 0.33460642 -0.83677707 1.04919327
0.94 0.56136672 0.1072197 -1.65994322
0.376 0.29572786 0.72955061 1.137218

And blow is an example of the corresponding test data file (when the above input is used in an ERI calculation)

# Input parameters for ERI generated with:
# ../../tests/generator/generate_integral_frombasis.py --filename 4center_fordoc.inp --basis ../../tests/generator/basis/ano-rcc.bas --geometry ../../tests/generator/geometry/water.xyz --ncenter 4 --ndigits 16 --ntests 2 --seed 13973322
#
# Reference values for the eri integral generated with:
# ../../build/mirp_bin/mirp_create_test --infile 4center_fordoc.inp --outfile eri_fordoc.dat --integral eri --prec 256 --ndigits 16
#
# 2 tests, 16 digits (max) printed, 256-bits working prec
2 16 256
# FIRST TEST
# Data the same as in the input file
3 3 3 0.0 0.0 0.24018419054568995699
2.35 0.33460642 -0.83677707 1.04919327
0.94 0.56136672 0.1072197 -1.65994322
0.376 0.29572786 0.72955061 1.137218
2 3 3 0.0 -1.4324124030970337325 -0.96092573479530561076
1.819 0.27051341 -0.7938035 1.308277
0.7276 0.5510125 -0.0914252 -2.021059
0.29104 0.33108664 0.86200334 1.2498888
3 1 1 0.0 -1.4324124030970337325 -0.96092573479530561076
0.970109 1.0
1 4 4 0.0 1.4324124030970337325 -0.96092573479530561076
2.305 0.11279019 -0.2108688 0.75995011 -1.442742
0.80675 0.41850753 -0.5943796 0.1646159 2.3489914
0.282362 0.47000773 0.08968888 -1.371014 -1.991152
0.098827 0.18262603 0.8611634 1.0593155 0.90505601
# Values of the integrals
0 0
1 [-0.01225908310017248 +/- 2.90e-18]
2 [0.0009364765647456128 +/- 2.47e-20]
3 [0.003695099147556580 +/- 2.11e-19]
# .... Removed for brevity ...
64798 [-0.001710697215080138 +/- 1.29e-19]
64799 [-0.001528811811890661 +/- 2.06e-19]
# SECOND TEST
1 4 4 0.0 1.4324124030970337325 -0.96092573479530561076
2.305 0.11279019 -0.2108688 0.75995011 -1.442742
0.80675 0.41850753 -0.5943796 0.1646159 2.3489914
0.282362 0.47000773 0.08968888 -1.371014 -1.991152
0.098827 0.18262603 0.8611634 1.0593155 0.90505601
4 2 2 0.0 0.0 0.24018419054568995699
1.175 0.89524901 -0.82800067
0.47 0.16664235 1.2080092
1 4 4 0.0 1.4324124030970337325 -0.96092573479530561076
2.305 0.11279019 -0.2108688 0.75995011 -1.442742
0.80675 0.41850753 -0.5943796 0.1646159 2.3489914
0.282362 0.47000773 0.08968888 -1.371014 -1.991152
0.098827 0.18262603 0.8611634 1.0593155 0.90505601
3 3 3 0.0 0.0 0.24018419054568995699
2.35 0.33460642 -0.83677707 1.04919327
0.94 0.56136672 0.1072197 -1.65994322
0.376 0.29572786 0.72955061 1.137218
0 0
1 [0.009107895965813453 +/- 5.89e-20]
2 [-0.007637175034130647 +/- 3.48e-19]
3 0
# .... Removed for brevity ...
129599 [-0.0007951184314525984 +/- 4.06e-20]

Single Integral Test Files

The formats for single integral test files are simpler than the general integral counterpart.

For an input, the first line is again the number of tests. Then, there are blocks of inputs containing information for a single cartesian integral, for the specified number of centers.

  1. Values of i,j,k (exponents of x,y,z which control the cartesian component)
  2. Coordinates (in borh)
  3. Exponent of the primitive The ijk specify which cartesian component that center is (for example, ijk=(1,2,0) is is a fxyy orbital).

Similar to the general integrals, the test data file is similar to the input file, except that the first line contains the number of tests, number of significant figures, and the working precision. The value of the computed integral is given after the specification for the centers, and does not have an index number.

Below is an example of an input for a 4-center single integral

# Input parameters for ERI generated with:
# ../../tests/generator/generate_integral_single_frombasis.py --filename 4center_single_example.inp --basis ../../tests/generator/basis/ano-rcc.bas --geometry ../../tests/generator/geometry/water.xyz --ncenter 4 --ndigits 16 --ntests 2 --seed 1786233
#
# 2 tests in this file
2
#############
# First test
#############
# First center
# 0 0 1 = pz
# Then three coordinates (in bohr)
# 0.850223 = exponent
0 0 1 0.0 0.0 0.24018419054568995699 0.850223
# Second center
# 1 0 3 = gxz3
# Then three coordinates (in bohr)
# 0.47 = exponent
1 0 3 0.0 0.0 0.24018419054568995699 0.47
# Last two centers
0 1 0 0.0 0.0 0.24018419054568995699 14.621809
0 3 0 0.0 -1.4324124030970337325 -0.96092573479530561076 0.970109
##############
# Second test
##############
# (pz pz | dyy pz) integral
0 0 1 0.0 0.0 0.24018419054568995699 46.533367
0 0 1 0.0 0.0 0.24018419054568995699 46.533367
0 2 0 0.0 -1.4324124030970337325 -0.96092573479530561076 0.29104
0 0 1 0.0 1.4324124030970337325 -0.96092573479530561076 0.80675

And below is the corresponding data file (when the above input is used in an ERI calculation)

# Input parameters for ERI generated with:
# ../../tests/generator/generate_integral_single_frombasis.py --filename 4center_single_example.inp --basis ../../tests/generator/basis/ano-rcc.bas --geometry ../../tests/generator/geometry/water.xyz --ncenter 4 --ndigits 16 --ntests 2 --seed 1786233
#
# Reference values for the eri_single integral generated with:
# ../../../mirp_build/mirp_bin/mirp_create_test --integral eri_single --prec 256 --ndigits 16 --infile 4center_single_example.inp --outfile 4center_single_example.dat
#
# Two tests in the file, 16 digits (max) printed, 256-bits working prec
2 16 256
# First test
# Info for 4 centers (same as input file)
0 0 1 0.0 0.0 0.24018419054568995699 0.850223
1 0 3 0.0 0.0 0.24018419054568995699 0.47
0 1 0 0.0 0.0 0.24018419054568995699 14.621809
0 3 0 0.0 -1.4324124030970337325 -0.96092573479530561076 0.970109
# Value of the integral (exactly zero by symmetry)
0
# Second test
0 0 1 0.0 0.0 0.24018419054568995699 46.533367
0 0 1 0.0 0.0 0.24018419054568995699 46.533367
0 2 0 0.0 -1.4324124030970337325 -0.96092573479530561076 0.29104
0 0 1 0.0 1.4324124030970337325 -0.96092573479530561076 0.80675
# Value of the integral (with error bounds)
[1.541710478144206e-5 +/- 2.83e-22]

Reference File Format

Reference files are printed using hex-float for floating point precision, so they do not suffer from rounding issues.

The first section of the file describes the basis set. First, the number of shells is printed. Then, the data for each shell is provided.

  1. The angular momentum (integer)
  2. The number of primitives in the shell
  3. The number of general contractions
  4. The coordinates (in bohr)

The next line contains all the primitives. Then, for each general contraction, the coefficients for all the primitives are printed (each general contraction on a separate line).

Note
This is different than the test file specification - the contraction coefficients are printed as the transpose in the reference files.

After this basis section, the computed integrals for each (contracted) are printed, with the indices of each of the shells printed before the integrals. These (zero-based) indices correspond to the shells in the basis section.

A code sample for reading reference files in C++ can be found in the examples subdirectory.

Below is an annotated example of a reference file

# Reference values for the eri integral generated with:
# mirp/build/mirp_bin/mirp_create_reference --integral eri --basis mirp/tests/generator/basis/aug-cc-pvtz.bas --geometry mirp/tests/generator/geometry/water.xyz --outfile /data/bpp4/mirp_ref/eri_water_aug-cc-pvtz.ref
#
# 31 shells in this reference
31
# First shell
# 0 8 2 = s shell, 8 primitives, 2 general contractions
# Then, the three coordinates (in bohr)
0 8 2 0x0p+0 0x0p+0 0x1.ebe5b05b479ebp-3
# Exponents
0x1.df1p+13 0x1.1f6p+11 0x1.0533333333333p+9 0x1.269999999999ap+7 0x1.7c66666666666p+5 0x1.0c28f5c28f5c3p+4 0x1.8d3f7ced91687p+2 0x1.605bc01a36e2fp-1
# Coefficients for first general contraction
0x1.0a569b17481b2p-11 0x1.017dae81882aep-8 0x1.4ba94bbe4473dp-6 0x1.44534bd76ee74p-4 0x1.d8726d04e618dp-3 0x1.bb8348f53c57ap-2 0x1.66aa8eb463498p-2 -0x1.0b30b5aa71583p-7
# Coefficients for second general contraction
-0x1.e2584f4c6e6dap-14 -0x1.d53cddd6e04cp-11 -0x1.2fd32c625e99fp-8 -0x1.32c625e99e94bp-6 -0x1.deedcc20d562ap-5 -0x1.1779e9d0e992p-3 -0x1.67ea5f84cad58p-3 0x1.34f3343fa2ad4p-1
# Second shell
# 0 1 1 = S shell, 1 primitive, 1 general contraction
# Then, the three coordinates (in bohr)
0 1 1 0x0p+0 0x0p+0 0x1.ebe5b05b479ebp-3
0x1.c083126e978d5p+0
0x1p+0
# Etc...
0 1 1 0x0p+0 0x0p+0 0x1.ebe5b05b479ebp-3
0x1.e83e425aee632p-3
0x1p+0
0 1 1 0x0p+0 0x0p+0 0x1.ebe5b05b479ebp-3
0x1.2e1ef73c0c1fdp-4
0x1p+0
1 3 1 0x0p+0 0x0p+0 0x1.ebe5b05b479ebp-3
0x1.13ae147ae147bp+5 0x1.efef9db22d0e5p+2 0x1.23d70a3d70a3dp+1
0x1.04f6dfc5cdd51p-6 0x1.9888f861a60d4p-4 0x1.3df19d66adb4p-2
# <truncated for brevity>
# Now, integral values
# The first four integers are the (0-based) indices of the shells
# in the basis section. The rest of the line are the values of the integrals for
# that shell quartet
0 0 0 0 0x1.376d998f679fap+2 -0x1.bf29c0dd81b2ep+0 -0x1.bf29c0dd81b2ep+0 0x1.a5211d57cd866p+0 -0x1.bf29c0dd81b2ep+0 0x1.49074c8468ed2p-1 0x1.49074c8468ed2p-1 -0x1.1199f5c588572p-1 -0x1.bf29c0dd81b2ep+0 0x1.49074c8468ed2p-1 0x1.49074c8468ed2p-1 -0x1.1199f5c588572p-1 0x1.a5211d57cd866p+0 -0x1.1199f5c588572p-1 -0x1.1199f5c588572p-1 0x1.fa12fbac0d7dfp-1
1 0 0 0 0x1.df7b0a135b97dp+0 -0x1.467aad4e62176p-1 -0x1.467aad4e62176p-1 0x1.7d4d3a73aa16p-1 0x1.3369fed05c0c2p-2 -0x1.b9da4bca0a52cp-5 -0x1.b9da4bca0a52cp-5 0x1.c7ee094580222p-2
1 1 0 0 0x1.008266c62c46cp+1 -0x1.3e6cf28efe1bdp-1 -0x1.3e6cf28efe1bdp-1 0x1.236edc6e8fb7cp+0
1 1 1 0 0x1.f51b9374a41b5p-1 0x1.13fd33a89914p-1
1 1 1 1 0x1.7e59d233d1c7cp+0
2 0 0 0 0x1.ebd79cc707b0cp-2 -0x1.4b8d2f850fb94p-3 -0x1.4b8d2f850fb94p-3 0x1.94baf50dd4372p-3 0x1.2d509bcfee381p-1 -0x1.4dc2c57582cb1p-3 -0x1.4dc2c57582cb1p-3 0x1.247661fe781c9p-1