Commit d6103067 authored by Matthias Redies's avatar Matthias Redies

check if potential xc-functional is MetaGGA

parent 522a929c
......@@ -88,6 +88,15 @@ CONTAINS
IF (xcpot%func_exc_id_c>0) CALL xc_f03_func_init(xcpot%exc_func_c, xcpot%func_exc_id_c, XC_POLARIZED)
END IF
!check if any potental is a MetaGGA
IF(ANY([XC_FAMILY_MGGA, XC_FAMILY_HYB_MGGA] == xc_get_family(xcpot%func_vxc_x))) THEN
call juDFT_error("vxc_x: MetaGGA is not implemented for potentials")
ELSEIF(xcpot%func_vxc_id>0) THEN
IF(ANY([XC_FAMILY_MGGA, XC_FAMILY_HYB_MGGA] == xc_get_family(xcpot%func_vxc_c))) THEN
call juDFT_error("vxc_x: MetaGGA is not implemented for potentials")
ENDIF
ENDIF
CALL write_xc_info(xcpot%vxc_func_x)
IF (xcpot%func_vxc_id_c>0) THEN
......@@ -347,6 +356,14 @@ CONTAINS
WRITE(*, '(a,i1,2a)') '[', i+1, '] ', TRIM(xc_f03_func_reference_get_ref(xc_f03_func_info_get_references(xc_info, i)))
END DO
END SUBROUTINE write_xc_info
FUNCTION xc_get_family(xc_func) result(family)
IMPLICIT NONE
TYPE(xc_f03_func_t) :: xc_func
integer :: family
family = xc_f03_func_info_get_family(xc_f03_func_get_info(xc_func))
END FUNCTION xc_get_family
#endif
END MODULE m_types_xcpot_libxc
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