Commit 58008f04 authored by Matthias Redies's avatar Matthias Redies

add metagga check for vx

parent 1bdbe1b6
......@@ -21,21 +21,22 @@ MODULE m_types_xcpot
REAL :: gmaxxc
TYPE(t_potden) :: core_den, val_den
CONTAINS
PROCEDURE :: vxc_is_LDA => xcpot_vxc_is_LDA
PROCEDURE :: vxc_is_GGA => xcpot_vxc_is_GGA
PROCEDURE :: vxc_is_LDA => xcpot_vxc_is_LDA
PROCEDURE :: vxc_is_GGA => xcpot_vxc_is_GGA
PROCEDURE :: vx_is_LDA => xcpot_vx_is_LDA
PROCEDURE :: vx_is_GGA => xcpot_vx_is_GGA
PROCEDURE :: vx_is_MetaGGA => xcpot_vx_is_MetaGGA
PROCEDURE :: vc_is_LDA => xcpot_vc_is_LDA
PROCEDURE :: vc_is_GGA => xcpot_vc_is_GGA
PROCEDURE :: vc_is_LDA => xcpot_vc_is_LDA
PROCEDURE :: vc_is_GGA => xcpot_vc_is_GGA
PROCEDURE :: exc_is_LDA => xcpot_exc_is_LDA
PROCEDURE :: exc_is_GGA => xcpot_exc_is_GGA
PROCEDURE :: exc_is_MetaGGA => xcpot_exc_is_MetaGGA
PROCEDURE :: needs_grad => xcpot_needs_grad
PROCEDURE :: is_hybrid => xcpot_is_hybrid
PROCEDURE :: needs_grad => xcpot_needs_grad
PROCEDURE :: is_hybrid => xcpot_is_hybrid
PROCEDURE :: get_exchange_weight => xcpot_get_exchange_weight
PROCEDURE :: get_vxc => xcpot_get_vxc
......@@ -111,6 +112,12 @@ CONTAINS
xcpot_exc_is_gga=.false.
END FUNCTION xcpot_exc_is_gga
LOGICAL FUNCTION xcpot_vx_is_MetaGGA(xcpot)
IMPLICIT NONE
CLASS(t_xcpot),INTENT(IN):: xcpot
xcpot_vx_is_MetaGGA=.false.
END FUNCTION xcpot_vx_is_MetaGGA
LOGICAL FUNCTION xcpot_exc_is_MetaGGA(xcpot)
IMPLICIT NONE
CLASS(t_xcpot),INTENT(IN):: xcpot
......@@ -121,7 +128,7 @@ CONTAINS
IMPLICIT NONE
CLASS(t_xcpot),INTENT(IN):: xcpot
xcpot_needs_grad= xcpot%vxc_is_gga()
xcpot_needs_grad= xcpot%vc_is_gga()
END FUNCTION xcpot_needs_grad
LOGICAL FUNCTION xcpot_is_hybrid(xcpot)
......
......@@ -33,8 +33,9 @@ MODULE m_types_xcpot_libxc
!PROCEDURE :: vxc_is_LDA => xcpot_vxc_is_LDA
!PROCEDURE :: vxc_is_gga => xcpot_vxc_is_gga
PROCEDURE :: vx_is_LDA => xcpot_vx_is_LDA
PROCEDURE :: vx_is_GGA => xcpot_vx_is_GGA
PROCEDURE :: vx_is_LDA => xcpot_vx_is_LDA
PROCEDURE :: vx_is_GGA => xcpot_vx_is_GGA
PROCEDURE :: vx_is_MetaGGA => xcpot_vx_is_MetaGGA
PROCEDURE :: vc_is_LDA => xcpot_vc_is_LDA
PROCEDURE :: vc_is_GGA => xcpot_vc_is_GGA
......@@ -202,6 +203,19 @@ CONTAINS
#endif
END FUNCTION xcpot_vx_is_gga
LOGICAL FUNCTION xcpot_vx_is_MetaGGA(xcpot)
IMPLICIT NONE
CLASS(t_xcpot_libxc),INTENT(IN):: xcpot
#ifdef CPP_LIBXC
TYPE(xc_f03_func_info_t) :: xc_info
xc_info = xc_f03_func_get_info(xcpot%vxc_func_c)
xcpot_vx_is_MetaGGA = ANY([XC_FAMILY_MGGA, XC_FAMILY_HYB_MGGA]==xc_f03_func_info_get_family(xc_info))
#else
xcpot_vx_is_MetaGGA=.false.
#endif
END FUNCTION xcpot_vx_is_MetaGGA
LOGICAL FUNCTION xcpot_exc_is_gga(xcpot)
IMPLICIT NONE
CLASS(t_xcpot_libxc),INTENT(IN):: xcpot
......@@ -357,8 +371,6 @@ CONTAINS
exc(:cut_idx))
IF (xcpot%func_exc_id_c>0) THEN
!CALL xc_f03_mgga_exc(xcpot%exc_func_c, SIZE(rh,1), TRANSPOSE(rh), grad%sigma, &
!transpose(grad%laplace), kinEnergyDen_libXC, excc)
call xc_f03_mgga_exc(xcpot%exc_func_c, SIZE(rh(cut_idx+1:,:),1), &
TRANSPOSE(rh(cut_idx+1:,:)), &
grad%sigma(:,cut_idx+1:), &
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment