dft.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00035 #ifndef _GENERAL_H_
00036 #define _GENERAL_H_
00037
00038 #include <stdlib.h>
00039
00040 #ifdef __cplusplus
00041 #define EXTERN_C extern "C"
00042 #else
00043 #define EXTERN_C
00044 #endif
00045
00046 #if defined(__cplusplus)
00047 #define RESTRICT
00048 #else
00049
00050 #define RESTRICT restrict
00051 #endif
00052
00053 #if !defined(__CVERSION)
00054 #define __CVERSION__
00055 #endif
00056
00057 #include "functionals.h"
00058
00059 #include "basisinfo.h"
00060 #include "molecule.h"
00061 #include "grid_reader.h"
00062
00063
00064
00065
00066
00067
00068 #ifdef NO_UNDERSCORE
00069 #define FSYM(a) a
00070 #define FSYM2(a) a
00071 #else
00072 #define FSYM(a) a ## _
00073 #if defined(VAR_G77) || defined(HAVE_GCPP)
00074 #define FSYM2(a) a ## __
00075 #else
00076 #define FSYM2(a) a ## _
00077 #endif
00078 #endif
00079
00080 #if defined(VAR_PGF77)
00081 #define __FUNCTION__ "PGI_does_not_define__FUNCTION__"
00082 #endif
00083 #if defined(SYS_SUN)
00084 #define __FUNCTION__ "SUNs CC compiler_does_not_define__FUNCTION__"
00085 #endif
00086 #if defined(SYS_IRIX)
00087 #define __FUNCTION__ "SGIs CC compiler_does_not_define__FUNCTION__"
00088 #endif
00089 #if defined(SYS_DEC)
00090 #define __FUNCTION__ "DEC CC compiler does not define __FUNCTION__"
00091 #endif
00092
00093 #define ELEMENTS(arr) (sizeof(arr)/sizeof(arr[0]))
00094
00095
00096 EXTERN_C void dftpot0_(FirstDrv *ds, const real* weight, const FunDensProp* dp);
00097 EXTERN_C void dftpot1_(SecondDrv *ds, const real* w, const FunDensProp* dp,
00098 const int* triplet);
00099
00100 EXTERN_C int dft_setfunc(const char *line);
00101 EXTERN_C void grid_set_tmpdir(const char *tmpdir);
00102
00103
00104 EXTERN_C real dft_get_xc(int nElectrons, const real* dmat,
00105 const BasisInfoStruct *bis, const Molecule *mol,
00106 const Dft::GridParams& gss,
00107 real* ksm, real* edfty,
00108 int nThreads);
00109 EXTERN_C real dft_get_uxc(int nElectrons,
00110 const real* dmata, const real *dmatb,
00111 const BasisInfoStruct *bis, const Molecule *mol,
00112 const Dft::GridParams& gss,
00113 real* xca, real *xcb, real* edfty,
00114 int nThreads);
00115
00116
00117 typedef void (*DFTPropEvalMaster)(void);
00118 typedef void (*DFTPropEvalSlave)(real* work, int* lwork, const int* iprint);
00119
00120 extern int (*fort_print)(const char* format, ...);
00121
00122
00123 #if !defined __inline__
00124
00125 #define __inline__
00126 #endif
00127
00128 #endif