Skip to content

Commit

Permalink
allow zora scf when called from cphf for hnd_hyperfine_zora #244
Browse files Browse the repository at this point in the history
  • Loading branch information
edoapra committed Oct 6, 2020
1 parent 90ab479 commit 82a9985
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/ddscf/rohf_fock.F
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion src/ddscf/uhf.F
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 82a9985

Please sign in to comment.