ergo
fun-gga.c File Reference

Implementation of a functional being a linear combination of other functionals. More...

#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include "functionals.h"

Classes

struct  FuncList_
 

Macros

#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 FuncListadd_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)
 
FuncListgga_fun_list = NULL
 

Detailed Description

Implementation of a functional being a linear combination of other functionals.

(c) Pawel Salek, pawsa.nosp@m.@the.nosp@m.ochem.nosp@m..kth.nosp@m..se, sep 2001

Macro Definition Documentation

◆ __CVERSION__

#define __CVERSION__

◆ GGA_FUNCTIONAL

#define GGA_FUNCTIONAL (   name,
  read 
)
Value:
{ (name), \
gga_third, gga_fourth }
static void gga_first(FunFirstFuncDrv *ds, real fac, const FunDensProp *dp)
Definition: fun-gga.c:495
static void gga_report(void)
Definition: fun-gga.c:470
static void gga_fourth(FunFourthFuncDrv *ds, real fac, const FunDensProp *dp)
Definition: fun-gga.c:524
static void gga_second(FunSecondFuncDrv *ds, real fac, const FunDensProp *dp)
Definition: fun-gga.c:507
static int gga_isgga(void)
Definition: fun-gga.c:127
static real gga_energy(const FunDensProp *dp)
Definition: fun-gga.c:481

◆ LDA_FUNCTIONAL

#define LDA_FUNCTIONAL (   name,
  read 
)
Value:
{ (name), \
lda_third, lda_fourth }
static void lda_second(FunSecondFuncDrv *ds, real fac, const FunDensProp *dp)
Definition: fun-gga.c:193
static void lda_fourth(FunFourthFuncDrv *ds, real fac, const FunDensProp *dp)
Definition: fun-gga.c:207
static void lda_first(FunFirstFuncDrv *ds, real fac, const FunDensProp *dp)
Definition: fun-gga.c:186
int fun_false(void)
Definition: functionals.c:154
static real lda_energy(const FunDensProp *dp)
Definition: fun-gga.c:180

Typedef Documentation

◆ FuncList

typedef struct FuncList_ FuncList

Function Documentation

◆ add_functional()

◆ b3lyp_read()

static int b3lyp_read ( const char *  conf_line)
static

◆ b3lypgauss_read()

static int b3lypgauss_read ( const char *  conf_line)
static

◆ b3p86_read()

static int b3p86_read ( const char *  conf_line)
static

◆ b3p86g_read()

static int b3p86g_read ( const char *  conf_line)
static

◆ b3pw91_read()

static int b3pw91_read ( const char *  conf_line)
static

◆ bhandh_read()

static int bhandh_read ( const char *  conf_line)
static

◆ bhandhlyp_read()

static int bhandhlyp_read ( const char *  conf_line)
static

◆ blyp_read()

static int blyp_read ( const char *  conf_line)
static

◆ bp86_read()

static int bp86_read ( const char *  conf_line)
static

◆ bpw91_read()

static int bpw91_read ( const char *  conf_line)
static

◆ combine_read()

static int combine_read ( const char *  conf_line)
static

◆ free_functionals()

◆ gga_energy()

static real gga_energy ( const FunDensProp dp)
static

◆ gga_first()

static void gga_first ( FunFirstFuncDrv ds,
real  fac,
const FunDensProp dp 
)
static

◆ gga_fourth()

static void gga_fourth ( FunFourthFuncDrv ds,
real  fac,
const FunDensProp dp 
)
static

◆ gga_isgga()

static int gga_isgga ( void  )
static

◆ gga_report()

static void gga_report ( void  )
static

◆ gga_second()

static void gga_second ( FunSecondFuncDrv ds,
real  fac,
const FunDensProp dp 
)
static

◆ gga_third()

static void gga_third ( FunThirdFuncDrv ds,
real  fac,
const FunDensProp dp 
)
static

◆ kt1_read()

static int kt1_read ( const char *  conf_line)
static

◆ kt2_read()

static int kt2_read ( const char *  conf_line)
static

◆ kt3_read()

static int kt3_read ( const char *  conf_line)
static

◆ lda_energy()

static real lda_energy ( const FunDensProp dp)
static

◆ lda_first()

static void lda_first ( FunFirstFuncDrv ds,
real  fac,
const FunDensProp dp 
)
static

◆ lda_fourth()

static void lda_fourth ( FunFourthFuncDrv ds,
real  fac,
const FunDensProp dp 
)
static

◆ lda_read()

static int lda_read ( const char *  conf_line)
static

References fun_set_hf_weight.

◆ lda_second()

static void lda_second ( FunSecondFuncDrv ds,
real  fac,
const FunDensProp dp 
)
static

◆ lda_third()

static void lda_third ( FunThirdFuncDrv ds,
real  fac,
const FunDensProp dp 
)
static

◆ ldagauss_read()

static int ldagauss_read ( const char *  conf_line)
static

◆ olyp_read()

static int olyp_read ( const char *  conf_line)
static

◆ pbe0_read()

static int pbe0_read ( const char *  conf_line)
static

◆ pbe_read()

static int pbe_read ( const char *  conf_line)
static

◆ xalpha_read()

static int xalpha_read ( const char *  conf_line)
static

Variable Documentation

◆ B3LYPFunctional

Functional B3LYPFunctional = GGA_FUNCTIONAL("B3LYP", b3lyp_read)

◆ B3LYPGaussFunctional

Functional B3LYPGaussFunctional = GGA_FUNCTIONAL("B3LYP-G", b3lypgauss_read)

◆ B3P86Functional

Functional B3P86Functional = GGA_FUNCTIONAL("B3P86", b3p86_read)

◆ B3P86GFunctional

Functional B3P86GFunctional = GGA_FUNCTIONAL("B3P86-G", b3p86g_read)

◆ B3PW91Functional

Functional B3PW91Functional = GGA_FUNCTIONAL("B3PW91", b3pw91_read)

◆ BHandHFunctional

Functional BHandHFunctional = GGA_FUNCTIONAL("BHandH", bhandh_read)

◆ BHandHLYPFunctional

Functional BHandHLYPFunctional = GGA_FUNCTIONAL("BHandHLYP", bhandhlyp_read)

◆ BLYPFunctional

Functional BLYPFunctional = GGA_FUNCTIONAL("BLYP", blyp_read)

◆ BP86Functional

Functional BP86Functional = GGA_FUNCTIONAL("BP86", bp86_read)

◆ BPW91Functional

Functional BPW91Functional = GGA_FUNCTIONAL("BPW91", bpw91_read)

◆ CombineFunctional

Functional CombineFunctional =GGA_FUNCTIONAL("Combine", combine_read)

◆ gga_fun_list

◆ GGAKeyFunctional

Functional GGAKeyFunctional = GGA_FUNCTIONAL("GGAKey", combine_read)

◆ KT1Functional

Functional KT1Functional = GGA_FUNCTIONAL("KT1", kt1_read)

◆ KT2Functional

Functional KT2Functional = GGA_FUNCTIONAL("KT2", kt2_read)

◆ KT3Functional

Functional KT3Functional = GGA_FUNCTIONAL("KT3", kt3_read)

◆ LDAFunctional

Functional LDAFunctional = LDA_FUNCTIONAL("LDA", lda_read)

◆ OLYPFunctional

Functional OLYPFunctional = GGA_FUNCTIONAL("OLYP" , olyp_read)

◆ PBE0Functional

Functional PBE0Functional = GGA_FUNCTIONAL("PBE0", pbe0_read)

◆ PBEFunctional

Functional PBEFunctional = GGA_FUNCTIONAL("PBE", pbe_read)

◆ SVWN3Functional

Functional SVWN3Functional = GGA_FUNCTIONAL("SVWN3", ldagauss_read)

◆ SVWN5Functional

Functional SVWN5Functional = LDA_FUNCTIONAL("SVWN5", lda_read)

◆ XAlphaFunctional

Functional XAlphaFunctional = GGA_FUNCTIONAL("XAlpha", xalpha_read)