From fc9fdc0438ee323c943c5c1916cb1e3b1112d7e9 Mon Sep 17 00:00:00 2001 From: Edoardo Apra Date: Wed, 9 Sep 2015 18:03:21 +0000 Subject: [PATCH] several nwxc_ functions can be called now as subroutines. This simplifies module dependencies --- src/gradients/grad_force.F | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/gradients/grad_force.F b/src/gradients/grad_force.F index b8337091b2..5227683984 100644 --- a/src/gradients/grad_force.F +++ b/src/gradients/grad_force.F @@ -64,7 +64,6 @@ C------------------------------------------------------------------------------ #include "inp.fh" #include "xc.fh" #include "case.fh" -#include "nwxc.fh" c logical use_nwxc c @@ -175,6 +174,7 @@ c c logical lcdft ! Qin integer ipop + logical out1 c nproc = ga_nnodes() c @@ -258,11 +258,13 @@ C get SCF MO vectors for density if (ocdfit) jfac = 0.0d0 use_nwxc = util_module_avail("nwxc") if (use_nwxc) then - if (nwxc_is_on()) then - if (nwxc_has_hfx()) then - xfac(1) = nwxc_wght_hfx() - endif - endif + call nwxc_getvals("nwxc_is_on",out1) + if (out1) then + call nwxc_getvals("nwxc_has_hfx",out1) + if (out1) then + call nwxc_getwght("nwxc_wght_hfx",xfac(1)) + endif + endif endif kfac = xfac(1) else