ergo
|
Implementation of a functional being a linear combination of other functionals. More...
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "functionals.h"
Classes | |
struct | FuncList_ |
Defines | |
#define | _XOPEN_SOURCE 500 |
#define | _XOPEN_SOURCE_EXTENDED 1 |
#define | _BSD_SOURCE 1 |
#define | __CVERSION__ |
#define | LDA_FUNCTIONAL(name, read) |
#define | GGA_FUNCTIONAL(name, read) |
Typedefs | |
typedef struct FuncList_ | FuncList |
Functions | |
static int | lda_read (const char *conf_line) |
static real | lda_energy (const FunDensProp *dp) |
static void | lda_first (FunFirstFuncDrv *ds, real fac, const FunDensProp *dp) |
static void | lda_second (FunSecondFuncDrv *ds, real fac, const FunDensProp *dp) |
static void | lda_third (FunThirdFuncDrv *ds, real fac, const FunDensProp *dp) |
static void | lda_fourth (FunFourthFuncDrv *ds, real fac, const FunDensProp *dp) |
static int | ldagauss_read (const char *conf_line) |
static int | blyp_read (const char *conf_line) |
static int | b3lyp_read (const char *conf_line) |
static int | b3lypgauss_read (const char *conf_line) |
static int | b3pw91_read (const char *conf_line) |
static int | bhandh_read (const char *conf_line) |
static int | bhandhlyp_read (const char *conf_line) |
static int | bp86_read (const char *conf_line) |
static int | bpw91_read (const char *conf_line) |
static int | b3p86_read (const char *conf_line) |
static int | b3p86g_read (const char *conf_line) |
static int | kt1_read (const char *conf_line) |
static int | kt2_read (const char *conf_line) |
static int | kt3_read (const char *conf_line) |
static int | olyp_read (const char *conf_line) |
static int | pbe_read (const char *conf_line) |
static int | pbe0_read (const char *conf_line) |
static int | gga_isgga (void) |
static int | xalpha_read (const char *conf_line) |
static int | combine_read (const char *conf_line) |
static void | gga_report (void) |
static real | gga_energy (const FunDensProp *dp) |
static void | gga_first (FunFirstFuncDrv *ds, real fac, const FunDensProp *dp) |
static void | gga_second (FunSecondFuncDrv *ds, real fac, const FunDensProp *dp) |
static void | gga_third (FunThirdFuncDrv *ds, real fac, const FunDensProp *dp) |
static void | gga_fourth (FunFourthFuncDrv *ds, real fac, const FunDensProp *dp) |
static FuncList * | add_functional (FuncList *lst, Functional *f, float weight) |
static void | free_functionals (FuncList **lst) |
Variables | |
Functional | XAlphaFunctional = GGA_FUNCTIONAL("XAlpha", xalpha_read) |
Functional | LDAFunctional = LDA_FUNCTIONAL("LDA", lda_read) |
Functional | SVWN5Functional = LDA_FUNCTIONAL("SVWN5", lda_read) |
Functional | SVWN3Functional = GGA_FUNCTIONAL("SVWN3", ldagauss_read) |
Functional | B3LYPFunctional = GGA_FUNCTIONAL("B3LYP", b3lyp_read) |
Functional | B3LYPGaussFunctional = GGA_FUNCTIONAL("B3LYP-G", b3lypgauss_read) |
Functional | B3P86Functional = GGA_FUNCTIONAL("B3P86", b3p86_read) |
Functional | B3P86GFunctional = GGA_FUNCTIONAL("B3P86-G", b3p86g_read) |
Functional | B3PW91Functional = GGA_FUNCTIONAL("B3PW91", b3pw91_read) |
Functional | BHandHFunctional = GGA_FUNCTIONAL("BHandH", bhandh_read) |
Functional | BHandHLYPFunctional = GGA_FUNCTIONAL("BHandHLYP", bhandhlyp_read) |
Functional | BLYPFunctional = GGA_FUNCTIONAL("BLYP", blyp_read) |
Functional | BP86Functional = GGA_FUNCTIONAL("BP86", bp86_read) |
Functional | BPW91Functional = GGA_FUNCTIONAL("BPW91", bpw91_read) |
Functional | CombineFunctional = GGA_FUNCTIONAL("Combine", combine_read) |
Functional | GGAKeyFunctional = GGA_FUNCTIONAL("GGAKey", combine_read) |
Functional | KT1Functional = GGA_FUNCTIONAL("KT1", kt1_read) |
Functional | KT2Functional = GGA_FUNCTIONAL("KT2", kt2_read) |
Functional | KT3Functional = GGA_FUNCTIONAL("KT3", kt3_read) |
Functional | OLYPFunctional = GGA_FUNCTIONAL("OLYP" , olyp_read) |
Functional | PBE0Functional = GGA_FUNCTIONAL("PBE0", pbe0_read) |
Functional | PBEFunctional = GGA_FUNCTIONAL("PBE", pbe_read) |
FuncList * | gga_fun_list = NULL |
Implementation of a functional being a linear combination of other functionals.
(c) Pawel Salek, pawsa@theochem.kth.se, sep 2001
#define __CVERSION__ |
#define _BSD_SOURCE 1 |
#define _XOPEN_SOURCE 500 |
#define _XOPEN_SOURCE_EXTENDED 1 |
#define GGA_FUNCTIONAL | ( | name, | |
read | |||
) |
{ (name), \ gga_isgga, (read), gga_report, gga_energy, gga_first, gga_second, \ gga_third, gga_fourth }
#define LDA_FUNCTIONAL | ( | name, | |
read | |||
) |
{ (name), \ fun_false, (read), NULL, lda_energy, lda_first, lda_second, \ lda_third, lda_fourth }
static FuncList* add_functional | ( | FuncList * | lst, |
Functional * | f, | ||
float | weight | ||
) | [static] |
References FuncList_::func, FuncList_::weight, and FuncList_::next.
Referenced by xalpha_read(), ldagauss_read(), blyp_read(), b3lyp_read(), b3lypgauss_read(), b3pw91_read(), bhandh_read(), bhandhlyp_read(), bp86_read(), b3p86_read(), b3p86g_read(), bpw91_read(), kt1_read(), kt2_read(), kt3_read(), olyp_read(), pbe_read(), pbe0_read(), and combine_read().
static int b3lyp_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, BeckeFunctional, LYPFunctional, VWNFunctional, and fun_set_hf_weight.
static int b3lypgauss_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, BeckeFunctional, LYPFunctional, VWN3IFunctional, and fun_set_hf_weight.
static int b3p86_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, BeckeFunctional, P86cFunctional, VWNFunctional, and fun_set_hf_weight.
static int b3p86g_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, BeckeFunctional, P86cFunctional, VWN3Functional, and fun_set_hf_weight.
static int b3pw91_read | ( | const char * | conf_line | ) | [static] |
static int bhandh_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, LYPFunctional, and fun_set_hf_weight.
static int bhandhlyp_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, BeckeFunctional, LYPFunctional, and fun_set_hf_weight.
static int blyp_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, BeckeFunctional, LYPFunctional, and fun_set_hf_weight.
static int bp86_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, BeckeFunctional, P86cFunctional, PZ81Functional, and fun_set_hf_weight.
static int bpw91_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, BeckeFunctional, Pw91cFunctional, and fun_set_hf_weight.
static int combine_read | ( | const char * | conf_line | ) | [static] |
References fun_set_hf_weight, free_functionals(), fun_printf, available_functionals, and add_functional().
Referenced by b3pw91_read().
static void free_functionals | ( | FuncList ** | lst | ) | [static] |
References FuncList_::next.
Referenced by xalpha_read(), ldagauss_read(), blyp_read(), b3lyp_read(), b3lypgauss_read(), b3pw91_read(), bhandh_read(), bhandhlyp_read(), bp86_read(), b3p86_read(), b3p86g_read(), bpw91_read(), kt1_read(), kt2_read(), kt3_read(), olyp_read(), pbe_read(), pbe0_read(), and combine_read().
static real gga_energy | ( | const FunDensProp * | dp | ) | [static] |
References FuncList_::next, FuncList_::weight, FuncList_::func, and Functional_::func.
static void gga_first | ( | FunFirstFuncDrv * | ds, |
real | fac, | ||
const FunDensProp * | dp | ||
) | [static] |
References FuncList_::next, FuncList_::func, Functional_::first, and FuncList_::weight.
static void gga_fourth | ( | FunFourthFuncDrv * | ds, |
real | fac, | ||
const FunDensProp * | dp | ||
) | [static] |
References FuncList_::next, FuncList_::func, Functional_::fourth, and FuncList_::weight.
static int gga_isgga | ( | void | ) | [static] |
References FuncList_::next, FuncList_::func, and Functional_::is_gga.
static void gga_report | ( | void | ) | [static] |
References fun_printf, fun_get_hf_weight, FuncList_::next, FuncList_::func, Functional_::name, and FuncList_::weight.
static void gga_second | ( | FunSecondFuncDrv * | ds, |
real | fac, | ||
const FunDensProp * | dp | ||
) | [static] |
References FuncList_::next, FuncList_::func, Functional_::second, and FuncList_::weight.
static void gga_third | ( | FunThirdFuncDrv * | ds, |
real | fac, | ||
const FunDensProp * | dp | ||
) | [static] |
References FuncList_::next, FuncList_::func, Functional_::third, and FuncList_::weight.
static int kt1_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, KTFunctional, VWNFunctional, and fun_set_hf_weight.
static int kt2_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, KTFunctional, VWNFunctional, and fun_set_hf_weight.
static int kt3_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, KTFunctional, LYPFunctional, OPTXFunctional, and fun_set_hf_weight.
static real lda_energy | ( | const FunDensProp * | dp | ) | [static] |
References SlaterFunctional, Functional_::func, and VWNFunctional.
static void lda_first | ( | FunFirstFuncDrv * | ds, |
real | fac, | ||
const FunDensProp * | dp | ||
) | [static] |
References SlaterFunctional, Functional_::first, and VWNFunctional.
static void lda_fourth | ( | FunFourthFuncDrv * | ds, |
real | fac, | ||
const FunDensProp * | dp | ||
) | [static] |
References SlaterFunctional, Functional_::fourth, and VWN5Functional.
static int lda_read | ( | const char * | conf_line | ) | [static] |
References fun_set_hf_weight.
static void lda_second | ( | FunSecondFuncDrv * | ds, |
real | fac, | ||
const FunDensProp * | dp | ||
) | [static] |
References SlaterFunctional, Functional_::second, and VWN5Functional.
static void lda_third | ( | FunThirdFuncDrv * | ds, |
real | fac, | ||
const FunDensProp * | dp | ||
) | [static] |
References SlaterFunctional, Functional_::third, and VWN5Functional.
static int ldagauss_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, VWN3Functional, and fun_set_hf_weight.
static int olyp_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, OPTXFunctional, LYPFunctional, and fun_set_hf_weight.
static int pbe0_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), PbecFunctional, PbexFunctional, and fun_set_hf_weight.
static int pbe_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), PbecFunctional, PbexFunctional, and fun_set_hf_weight.
static int xalpha_read | ( | const char * | conf_line | ) | [static] |
References free_functionals(), add_functional(), SlaterFunctional, and fun_set_hf_weight.
Functional B3LYPFunctional = GGA_FUNCTIONAL("B3LYP", b3lyp_read) |
Functional B3LYPGaussFunctional = GGA_FUNCTIONAL("B3LYP-G", b3lypgauss_read) |
Functional B3P86Functional = GGA_FUNCTIONAL("B3P86", b3p86_read) |
Functional B3P86GFunctional = GGA_FUNCTIONAL("B3P86-G", b3p86g_read) |
Functional B3PW91Functional = GGA_FUNCTIONAL("B3PW91", b3pw91_read) |
Functional BHandHFunctional = GGA_FUNCTIONAL("BHandH", bhandh_read) |
Functional BHandHLYPFunctional = GGA_FUNCTIONAL("BHandHLYP", bhandhlyp_read) |
Functional BLYPFunctional = GGA_FUNCTIONAL("BLYP", blyp_read) |
Functional BP86Functional = GGA_FUNCTIONAL("BP86", bp86_read) |
Functional BPW91Functional = GGA_FUNCTIONAL("BPW91", bpw91_read) |
Functional CombineFunctional = GGA_FUNCTIONAL("Combine", combine_read) |
FuncList* gga_fun_list = NULL |
Functional GGAKeyFunctional = GGA_FUNCTIONAL("GGAKey", combine_read) |
Functional KT1Functional = GGA_FUNCTIONAL("KT1", kt1_read) |
Functional KT2Functional = GGA_FUNCTIONAL("KT2", kt2_read) |
Functional KT3Functional = GGA_FUNCTIONAL("KT3", kt3_read) |
Functional LDAFunctional = LDA_FUNCTIONAL("LDA", lda_read) |
Functional OLYPFunctional = GGA_FUNCTIONAL("OLYP" , olyp_read) |
Functional PBE0Functional = GGA_FUNCTIONAL("PBE0", pbe0_read) |
Functional PBEFunctional = GGA_FUNCTIONAL("PBE", pbe_read) |
Functional SVWN3Functional = GGA_FUNCTIONAL("SVWN3", ldagauss_read) |
Functional SVWN5Functional = LDA_FUNCTIONAL("SVWN5", lda_read) |
Functional XAlphaFunctional = GGA_FUNCTIONAL("XAlpha", xalpha_read) |