From 4bbf3c12a678e11dd5bd0ffb2ad3e7747bd911f4 Mon Sep 17 00:00:00 2001 From: Niri Govind Date: Fri, 27 Jan 2012 06:34:40 +0000 Subject: [PATCH] approximate away the hessian for rodft calculations and functionals that do not have second derivatives --- src/nwdft/scf_dft_cg/dft_roks_hessv_2e.F | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/nwdft/scf_dft_cg/dft_roks_hessv_2e.F b/src/nwdft/scf_dft_cg/dft_roks_hessv_2e.F index 2e5fb2cd45..8f34b6749d 100644 --- a/src/nwdft/scf_dft_cg/dft_roks_hessv_2e.F +++ b/src/nwdft/scf_dft_cg/dft_roks_hessv_2e.F @@ -52,7 +52,7 @@ c c double precision Exc(2) integer nExc - logical xc_gotxc,xc_got2nd + logical xc_gotxc,xc_got2nd,rodft double precision xc_hfexch external xc_gotxc,xc_hfexch,xc_got2nd c @@ -276,7 +276,12 @@ c endif c c include hessian contribution only if second derivatives are available - if(xc_got2nd()) then +c and if the calculation is not a rodft calculation +c + if (.not. rtdb_get(rtdb, 'dft:rodft', mt_log, 1, rodft)) + & rodft = .false. ! query the rtdb for the type of calculation + + if(xc_got2nd().and. (.not. rodft)) then call fock_xc(geom, nbf, basis, jfock, g_dd, g_ff, + Exc, nExc, .true.) end if