ergo
|
Tests the DFT XC matrix construction. More...
#include <stdio.h>
#include <unistd.h>
#include <memory>
#include <limits>
#include "integrals_1el_potential.h"
#include "integrals_2el.h"
#include "memorymanag.h"
#include "grid_reader.h"
#include "dft_common.h"
#include "xc_matrix.h"
Functions | |
static bool | compare_matrices (char mat_name, const real *computed, const long double *ref, int sz, ergo_real eps) |
static int | test_small (const IntegralInfo &ii, const char *functional, const Dft::GridParams::RadialScheme &gridScheme, const char *gridSchemeName, const int *charges, const real(*coords)[3], const long double(*XCRef)[2]) |
static int | test_small_both () |
static int | test_mol (const char *mol_fname, const char *basisSet, const char *xcFunc) |
int | main (int argc, char *argv[]) |
Tests the DFT XC matrix construction.
This test computes the XC energy many times and checks that the resulting energy is the same every time. If this fails, it is probably because of some bug related to synchronization of threads.
static bool compare_matrices | ( | char | mat_name, |
const real * | computed, | ||
const long double * | ref, | ||
int | sz, | ||
ergo_real | eps | ||
) | [static] |
int main | ( | int | argc, |
char * | argv[] | ||
) |
References test_small_both(), test_mol(), and ERGO_SPREFIX.
static int test_mol | ( | const char * | mol_fname, |
const char * | basisSet, | ||
const char * | xcFunc | ||
) | [static] |
References dft_init(), Molecule::setFromMoleculeFile(), BasisInfoStruct::addBasisfuncsForMolecule(), BasisInfoStruct::noOfBasisFuncs, ergo_new, Molecule::getNumberOfElectrons(), dft_setfunc(), grid_set_tmpdir(), dft_get_xc_mt(), ergo_free(), grid_free_files(), selected_func, and Functional_::is_gga.
Referenced by main().
static int test_small | ( | const IntegralInfo & | ii, |
const char * | functional, | ||
const Dft::GridParams::RadialScheme & | gridScheme, | ||
const char * | gridSchemeName, | ||
const int * | charges, | ||
const real(*) | coords[3], | ||
const long double(*) | XCRef[2] | ||
) | [static] |
References Molecule::addAtom(), BasisInfoStruct::addBasisfuncsForMolecule(), ERGO_SPREFIX, BasisInfoStruct::noOfBasisFuncs, ergo_new, dft_init(), dft_setfunc(), grid_set_tmpdir(), Dft::GridParams::radialGridScheme, dft_get_xc_mt(), compare_matrices(), selected_func, Functional_::is_gga, dft_get_uxc_mt(), ergo_free(), and grid_free_files().
Referenced by test_small_both().
static int test_small_both | ( | ) | [static] |
References test_small(), Dft::GridParams::GC2, Dft::GridParams::TURBO, and Dft::GridParams::LMG.
Referenced by main().