ergo
|
#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 "mat_gblas.h"
#include "output.h"
#include "utilities.h"
#include "matrix_utilities.h"
#include "grid_matrix.h"
#include "xc_evaluators.h"
Classes | |
struct | XCDistributorLdaBlas |
struct | XCDistributorGgaBlas |
struct | xc_data |
struct | uks_data |
struct | uxc_data |
Macros | |
#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. More... | |
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. More... | |
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 |
The XC matrix evaluator. (c) Pawel Salek, pawsa. 2002.04.05 @the ochem .kth .se
This module evaluates DFT contribution KS matrix.
#define __CVERSION__ |
#define dft_kohn_sham_collect_info | ( | myksm, | |
ksm, | |||
energy | |||
) |
#define dft_kohn_sham_sync_slaves | ( | dmat | ) |
#define restrict |
#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 | ||
) |
References mat::axpy(), DFT_MAX_BLLEN, dft_prop_mutex, do_output(), UksData< Matrix >::energy, Dft::integrate(), Functional_::is_gga, KOHNSH_DEBUG, LOG_AREA_DFT, LOG_CAT_INFO, Dft::FullMatrix::mat, BasisInfoStruct::noOfBasisFuncs, ONEI, ONER, output_matrix(), Util::TimeMeter::print(), restrict, selected_func, USE_BLAS_IN_XC, and xcCallbackGgaU().
Referenced by dft_get_uxc_mt(), and dft_get_uxc_worker().
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 uxc_data::bis, dft_get_num_threads(), dft_get_uxc(), dft_get_uxc_worker(), uxc_data::dmata, uxc_data::dmatb, do_output(), uxc_data::edfty, Molecule::getNumberOfElectrons(), uxc_data::gss, LOG_AREA_DFT, LOG_CAT_ERROR, LOG_CAT_INFO, uxc_data::mol, uxc_data::nElectrons, Util::TimeMeter::print(), uxc_data::xca, and uxc_data::xcb.
Referenced by get_2e_matrices_and_energy_restricted_open(), get_2e_matrices_and_energy_simple_sparse_unrestricted(), get_2e_matrices_and_energy_sparse_unrestricted(), and test_small().
|
static |
References uxc_data::bis, dft_get_uxc(), uxc_data::dmata, uxc_data::dmatb, uxc_data::edfty, uxc_data::el, uxc_data::gss, uxc_data::mol, uxc_data::nElectrons, uxc_data::nThreads, uxc_data::xca, and uxc_data::xcb.
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 mat::axpy(), DFT_MAX_BLLEN, dft_prop_mutex, do_output(), KsData< Matrix >::energy, Molecule::getNumberOfElectrons(), Dft::integrate(), Functional_::is_gga, KOHNSH_DEBUG, LOG_AREA_DFT, LOG_CAT_INFO, Dft::FullMatrix::mat, BasisInfoStruct::noOfBasisFuncs, ONEI, ONER, output_matrix(), Util::TimeMeter::print(), restrict, selected_func, xcCallbackGgaR(), and xcCallbackLdaR().
Referenced by dft_get_xc_mt(), and dft_get_xc_worker().
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 xc_data::bis, dft_get_num_threads(), dft_get_xc(), dft_get_xc_worker(), xc_data::dmat, do_output(), xc_data::edfty, Molecule::getNumberOfElectrons(), xc_data::gss, LOG_AREA_DFT, LOG_CAT_ERROR, LOG_CAT_INFO, xc_data::mol, xc_data::nElectrons, Util::TimeMeter::print(), and xc_data::xc.
Referenced by get_2e_matrix_and_energy_simple_sparse(), get_2e_matrix_and_energy_sparse(), test_mol(), and test_small().
|
static |
References xc_data::bis, dft_get_xc(), xc_data::dmat, do_output(), xc_data::edfty, xc_data::el, xc_data::gss, LOG_AREA_DFT, LOG_CAT_ERROR, xc_data::mol, xc_data::nElectrons, xc_data::nThreads, and xc_data::xc.
Referenced by dft_get_xc_mt().
void lrao2mo_ | ( | const real * | cmo, |
const int * | ksymop, | ||
const real * | res, | ||
real * | fmat, | ||
real * | work, | ||
int * | lw | ||
) |
|
static |
Referenced by dft_get_uxc(), and dft_get_xc().
|
static |
Referenced by dft_get_uxc(), and dft_get_xc().