From 241ea5c3dc11bc8ac97ee604e69f5cf73af52a7c Mon Sep 17 00:00:00 2001 From: Matthias Redies Date: Thu, 5 Jul 2018 13:28:20 +0200 Subject: [PATCH] better error message for libxc inputs --- types/types_xcpot_libxc.F90 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/types/types_xcpot_libxc.F90 b/types/types_xcpot_libxc.F90 index 9d4ccc9f..2a93d225 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) -- GitLab