|
ergo
|
The XC matrix evaluator. More...
#include <assert.h>#include <cmath>#include <stdio.h>#include <stdlib.h>#include <time.h>#include <sys/times.h>#include <unistd.h>#include <pthread.h>#include "aos.h"#include "integrator.h"#include "functionals.h"#include "dft_common.h"#include "gblas.h"#include "output.h"#include "utilities.h"#include "matrix_utilities.h"#include "grid_matrix.h"#include "xc_evaluators.hpp"Classes | |
| struct | XCDistributorLdaBlas |
| struct | XCDistributorGgaBlas |
| struct | xc_data |
| struct | uks_data |
| struct | uxc_data |
Defines | |
| #define | _XOPEN_SOURCE 500 |
| #define | _XOPEN_SOURCE_EXTENDED 1 |
| #define | WITH_PTHREAD 1 |
| #define | __CVERSION__ |
| #define | restrict |
| #define | dft_kohn_sham_sync_slaves(dmat) |
| #define | dft_kohn_sham_collect_info(myksm, ksm, energy) |
Functions | |
| void | lrao2mo_ (const real *cmo, const int *ksymop, const real *res, real *fmat, real *work, int *lw) |
| EXTERN_C real | dft_get_xc (int nElectrons, const real *dmat, const BasisInfoStruct &bis, const Molecule &mol, const Dft::GridParams &gss, real *ksm, real *edfty, int nThreads) |
| computes Fock matrix ksm corresponding to given density matrix dmat. | |
| static void * | dft_get_xc_worker (void *data) |
| EXTERN_C real | dft_get_xc_mt (int nElectrons, const real *dmat, const BasisInfoStruct &bis, const Molecule &mol, const Dft::GridParams &gss, real *xc, real *edfty) |
| Computes the XC interaction matrix for given density matrix. | |
| EXTERN_C real | dft_get_uxc (int nElectrons, const real *dmata, const real *dmatb, const BasisInfoStruct &bis, const Molecule &mol, const Dft::GridParams &gss, real *xca, real *xcb, real *edfty, int nThreads) |
| static void * | dft_get_uxc_worker (void *data) |
| EXTERN_C real | dft_get_uxc_mt (int nElectrons, const real *dmata, const real *dmatb, const BasisInfoStruct &bis, const Molecule &mol, const Dft::GridParams &gss, real *xca, real *xcb, real *edfty) |
Variables | |
| static pthread_mutex_t | dft_prop_mutex = PTHREAD_MUTEX_INITIALIZER |
| static const int | KOHNSH_DEBUG = 0 |
| static const int | DFTLR_DEBUG = 0 |
| static const int | DFTMAG_DEBUG = 0 |
The XC matrix evaluator.
(c) Pawel Salek, pawsa@theochem.kth.se. 2002.04.05
This module evaluates DFT contribution KS matrix.
| #define __CVERSION__ |
| #define _XOPEN_SOURCE 500 |
| #define _XOPEN_SOURCE_EXTENDED 1 |
| #define dft_kohn_sham_collect_info | ( | myksm, | |
| ksm, | |||
| energy | |||
| ) |
| #define dft_kohn_sham_sync_slaves | ( | dmat | ) |
| #define restrict |
Referenced by XCDistributorLdaBlas::distribute(), XCDistributorGgaBlas::distribute(), dft_get_xc(), and dft_get_uxc().
| #define WITH_PTHREAD 1 |
| EXTERN_C real dft_get_uxc | ( | int | nElectrons, |
| const real * | dmata, | ||
| const real * | dmatb, | ||
| const BasisInfoStruct & | bis, | ||
| const Molecule & | mol, | ||
| const Dft::GridParams & | gss, | ||
| real * | xca, | ||
| real * | xcb, | ||
| real * | edfty, | ||
| int | nThreads | ||
| ) |
| EXTERN_C real dft_get_uxc_mt | ( | int | nElectrons, |
| const real * | dmata, | ||
| const real * | dmatb, | ||
| const BasisInfoStruct & | bis, | ||
| const Molecule & | mol, | ||
| const Dft::GridParams & | gss, | ||
| real * | xca, | ||
| real * | xcb, | ||
| real * | edfty | ||
| ) |
References dft_get_num_threads(), dft_get_uxc(), uxc_data::nElectrons, uxc_data::dmata, uxc_data::dmatb, uxc_data::xca, uxc_data::xcb, uxc_data::bis, uxc_data::mol, uxc_data::gss, dft_get_uxc_worker(), do_output(), LOG_CAT_ERROR, LOG_AREA_DFT, Molecule::getNumberOfElectrons(), and LOG_CAT_INFO.
Referenced by get_2e_matrices_and_energy_simple_sparse_unrestricted(), get_2e_matrices_and_energy_sparse_unrestricted(), get_2e_matrices_and_energy_restricted_open(), and test_small().
| static void* dft_get_uxc_worker | ( | void * | data | ) | [static] |
References uxc_data::el, dft_get_uxc(), uxc_data::nElectrons, uxc_data::dmata, uxc_data::dmatb, uxc_data::bis, uxc_data::mol, uxc_data::gss, uxc_data::xca, uxc_data::xcb, uxc_data::edfty, and uxc_data::nThreads.
Referenced by dft_get_uxc_mt().
| EXTERN_C real dft_get_xc | ( | int | nElectrons, |
| const real * | dmat, | ||
| const BasisInfoStruct & | bis, | ||
| const Molecule & | mol, | ||
| const Dft::GridParams & | gss, | ||
| real * | ksm, | ||
| real * | edfty, | ||
| int | nThreads | ||
| ) |
computes Fock matrix ksm corresponding to given density matrix dmat.
fast version - uses memory bandwidth-efficient algorithm.
References BasisInfoStruct::noOfBasisFuncs, selected_func, Functional_::is_gga, DFT_MAX_BLLEN, restrict, Dft::integrate(), Dft::FullMatrix::mat, dft_prop_mutex, mat::axpy(), ONER, ONEI, KOHNSH_DEBUG, output_matrix(), Molecule::getNumberOfElectrons(), do_output(), LOG_CAT_INFO, and LOG_AREA_DFT.
| EXTERN_C real dft_get_xc_mt | ( | int | nElectrons, |
| const real * | dmat, | ||
| const BasisInfoStruct & | bis, | ||
| const Molecule & | mol, | ||
| const Dft::GridParams & | gss, | ||
| real * | xc, | ||
| real * | edfty | ||
| ) |
Computes the XC interaction matrix for given density matrix.
| dmat | . |
| nElectrons | number of electrons. |
| bis | a structure describing the used basis set. |
| mol | a structure describing the molecule. |
| gss | a structure describing the grid settings. |
| xc | resulting XC matrix. |
| edfty | resulting XC energy. |
References dft_get_num_threads(), dft_get_xc(), xc_data::nElectrons, xc_data::dmat, xc_data::xc, xc_data::bis, xc_data::mol, xc_data::gss, dft_get_xc_worker(), do_output(), LOG_CAT_ERROR, LOG_AREA_DFT, Molecule::getNumberOfElectrons(), and LOG_CAT_INFO.
Referenced by get_2e_matrix_and_energy_simple_sparse(), get_2e_matrix_and_energy_sparse(), test_small(), and test_mol().
| static void* dft_get_xc_worker | ( | void * | data | ) | [static] |
References xc_data::el, dft_get_xc(), xc_data::nElectrons, xc_data::dmat, xc_data::bis, xc_data::mol, xc_data::gss, xc_data::xc, xc_data::edfty, xc_data::nThreads, do_output(), LOG_CAT_ERROR, and LOG_AREA_DFT.
Referenced by dft_get_xc_mt().
| void lrao2mo_ | ( | const real * | cmo, |
| const int * | ksymop, | ||
| const real * | res, | ||
| real * | fmat, | ||
| real * | work, | ||
| int * | lw | ||
| ) |
pthread_mutex_t dft_prop_mutex = PTHREAD_MUTEX_INITIALIZER [static] |
Referenced by dft_get_xc(), and dft_get_uxc().
const int DFTLR_DEBUG = 0 [static] |
const int DFTMAG_DEBUG = 0 [static] |
const int KOHNSH_DEBUG = 0 [static] |
Referenced by dft_get_xc(), and dft_get_uxc().