From 82a99852b2fb37933d4f7450a7f3ef0597f6b79f Mon Sep 17 00:00:00 2001 From: edoapra Date: Tue, 6 Oct 2020 10:50:39 -0700 Subject: [PATCH] allow zora scf when called from cphf for hnd_hyperfine_zora https://github.com/nwchemgit/nwchem/issues/244 --- src/ddscf/rohf_fock.F | 9 +++++++-- src/ddscf/uhf.F | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/ddscf/rohf_fock.F b/src/ddscf/rohf_fock.F index e69e0be522..ad612ce60c 100644 --- a/src/ddscf/rohf_fock.F +++ b/src/ddscf/rohf_fock.F @@ -67,7 +67,7 @@ subroutine rohf_fock(rtdb, geom, basis, nclosed, nopen, nmo, c JEM DIM/QM integer g_vdim logical ldimqm - + logical noskew_uhf c c Initialise c @@ -149,7 +149,12 @@ subroutine rohf_fock(rtdb, geom, basis, nclosed, nopen, nmo, call ga_zero(g_hcore) call int_1e_ga(basis, basis, g_hcore, 'kinetic', oskel) ! kinetic if (do_zora .and. .not. (do_NonRel)) then - call errquit(' ZORA not available yet for SCF ',0,CAPMIS_ERR) +c is rohf() called from cphf_solve2 (say from hnd_hyperfine_zora)? +c hack: use 'cphf:skew' to check this condition + if (.not. rtdb_get(rtdb, 'cphf:skew', mt_log, 1, + $ noskew_uhf)) then + call errquit('ZORA not available yet for SCF ',0,CAPMIS_ERR) + endif call ga_dadd(1.d0,g_hcore,1.d0,g_zora_Kinetic(1),g_hcore) ! zora kinetic endif call int_1e_ga(basis, basis, g_hcore, 'potential', oskel) ! potential diff --git a/src/ddscf/uhf.F b/src/ddscf/uhf.F index 30fb808742..61e91eb77c 100644 --- a/src/ddscf/uhf.F +++ b/src/ddscf/uhf.F @@ -925,7 +925,12 @@ subroutine uhf_energy(rtdb, g_vecs, eone, etwo, enrep, ecosmo, c call int_1e_ga(basis, basis, g_a_hcore, 'kinetic', oskel) ! kinetic if (do_zora .and. .not.(do_NonRel)) then - call errquit(' ZORA not available yet for SCF ',0,CAPMIS_ERR) +c is uhf() called from cphf_solve2 (say from hnd_hyperfine_zora)? +c hack: use 'cphf:skew' to check this condition + if (.not. rtdb_get(rtdb, 'cphf:skew', mt_log, 1, + $ noskew_uhf)) then + call errquit('ZORA not available yet for SCF ',0,CAPMIS_ERR) + endif call ga_dadd(1.d0,g_a_hcore,1.d0,g_zora_Kinetic(1),g_a_hcore) ! zora kinetic endif