diff --git a/types/types_xcpot_libxc.F90 b/types/types_xcpot_libxc.F90 index 9d4ccc9f3e74875e4d81cd1dfcc94d1ae8073f0b..2a93d22536f2ae0702010eeec017acb8b3039939 100644 --- a/types/types_xcpot_libxc.F90 +++ b/types/types_xcpot_libxc.F90 @@ -44,7 +44,15 @@ CONTAINS xcpot%jspins=jspins xcpot%func_id_x=id_x xcpot%func_id_c=id_c - + + if(xcpot%func_id_x == 0 .or. xcpot%func_id_c == 0) then + CALL judft_error("LibXC exchange- and correlation-function indicies need to be set"& + ,hint='Try this: ' // ACHAR(10) //& + '' // ACHAR(10) //& + ' &' // ACHAR(10) //& + ' ') + endif + IF (jspins==1) THEN CALL xc_f03_func_init(xcpot%xc_func_x, xcpot%func_id_x, XC_UNPOLARIZED) IF (xcpot%func_id_c>0) CALL xc_f03_func_init(xcpot%xc_func_c, xcpot%func_id_c, XC_UNPOLARIZED)