mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-28 14:15:30 -04:00
fixes for libxc 3 and 4
This commit is contained in:
parent
ab18feab3f
commit
4b7d994169
4 changed files with 28 additions and 5 deletions
|
|
@ -1,3 +1,6 @@
|
|||
#if XC_MAJOR_VERSION < 4
|
||||
#error "need libxc version > 4 "
|
||||
#endif
|
||||
integer, parameter :: maxfunc = 100
|
||||
|
||||
integer :: libxc_nfuncs
|
||||
|
|
|
|||
|
|
@ -63,7 +63,11 @@
|
|||
logical gga,mgga,dolap
|
||||
logical,external :: nwchem_libxc_family
|
||||
|
||||
#if XC_MAJOR_VERSION > 5
|
||||
integer(c_size_t) :: nqs
|
||||
#else
|
||||
integer*4 :: nqs
|
||||
#endif
|
||||
#ifdef USE_LIBXC
|
||||
type(xc_f03_func_t) :: xcfunc
|
||||
|
||||
|
|
@ -158,8 +162,11 @@
|
|||
call xc_f03_func_set_zeta_threshold(xcfunc, 1d-10)
|
||||
|
||||
select case(libxc_family(ifunc))
|
||||
#if XC_MAJOR_VERSION > 5
|
||||
case (XC_FAMILY_LDA, XC_FAMILY_HYB_LDA)
|
||||
|
||||
#else
|
||||
case (XC_FAMILY_LDA)
|
||||
#endif
|
||||
if ((.not.do_2nd) .and. (.not.do_3rd)) then
|
||||
call xc_f03_lda_exc_vxc(xcfunc,nqs,
|
||||
$ dbl_mb(krho),dbl_mb(kexc),dbl_mb(kvrho))
|
||||
|
|
@ -224,6 +231,7 @@
|
|||
mgga = .true.
|
||||
dolap = iand(libxc_flags(ifunc),xc_flags_needs_laplacian).eq.
|
||||
$ xc_flags_needs_laplacian
|
||||
#endif
|
||||
|
||||
if (iand(libxc_flags(ifunc),xc_flags_have_exc).eq.
|
||||
$ xc_flags_have_exc) then
|
||||
|
|
|
|||
|
|
@ -41,7 +41,11 @@
|
|||
xcfamily = xc_f03_func_info_get_family(xcinfo)
|
||||
|
||||
select case(xcfamily)
|
||||
#if XC_MAJOR_VERSION > 5
|
||||
case (XC_FAMILY_LDA, XC_FAMILY_HYB_LDA)
|
||||
#else
|
||||
case (XC_FAMILY_LDA)
|
||||
#endif
|
||||
case (XC_FAMILY_GGA, XC_FAMILY_HYB_GGA)
|
||||
case (XC_FAMILY_MGGA, XC_FAMILY_HYB_MGGA)
|
||||
case default
|
||||
|
|
@ -50,7 +54,11 @@
|
|||
endselect
|
||||
|
||||
select case(xcfamily)
|
||||
#if XC_MAJOR_VERSION > 5
|
||||
case (XC_FAMILY_HYB_LDA, XC_FAMILY_HYB_GGA, XC_FAMILY_HYB_MGGA)
|
||||
#else
|
||||
case (XC_FAMILY_HYB_GGA, XC_FAMILY_HYB_MGGA)
|
||||
#endif
|
||||
if (iand(xcflags,xc_flags_hyb_cam).eq.xc_flags_hyb_cam) then
|
||||
call xc_f03_hyb_cam_coef(xcfunc,cam_omega,cam_alpha,cam_beta)
|
||||
|
||||
|
|
|
|||
|
|
@ -74,8 +74,10 @@
|
|||
use,intrinsic :: iso_c_binding
|
||||
#ifdef USE_LIBXC
|
||||
use xc_f03_lib_m, only: xc_f03_version_string,
|
||||
$ xc_f03_reference,
|
||||
$ xc_f03_functional_get_name
|
||||
#if XC_MAJOR_VERSION > 5
|
||||
$ xc_f03_reference,
|
||||
#endif
|
||||
$ xc_f03_functional_get_name
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
|
|
@ -110,8 +112,10 @@
|
|||
use,intrinsic :: iso_c_binding
|
||||
#ifdef USE_LIBXC
|
||||
use xc_f03_lib_m, only: xc_f03_version_string,
|
||||
$ xc_f03_reference,
|
||||
$ xc_f03_functional_get_name
|
||||
#if XC_MAJOR_VERSION > 5
|
||||
$ xc_f03_reference,
|
||||
#endif
|
||||
$ xc_f03_functional_get_name
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue