Skip to content

Commit

Permalink
more BGJ fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffhammond committed Apr 6, 2022
1 parent dfff944 commit c68a30a
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 8 deletions.
8 changes: 7 additions & 1 deletion src/nwdft/scf_dft_cg/dft_roks_hessv.F
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ subroutine dft_roks_hessv( acc, g_x, g_ax )
c
c $Id$
c
integer rtdb
integer g_x, g_ax
double precision acc
c
integer gtype,grow,gcol,growp,gcolp
c
integer scf_get_rtdb
external scf_get_rtdb
c
rtdb = scf_get_rtdb()
c
c Check
c
Expand All @@ -30,7 +36,7 @@ subroutine dft_roks_hessv( acc, g_x, g_ax )
c
c Call internal routine
c
call dft_roks_hessv_xx( basis, geom, nbf, nmo,
call dft_roks_hessv_xx( rtdb, basis, geom, nbf, nmo,
$ nclosed, nopen,
$ pflg, g_movecs, oskel,
$ crohf_g_fcv, crohf_g_fpv, crohf_g_fcp,
Expand Down
6 changes: 3 additions & 3 deletions src/nwdft/scf_dft_cg/dft_roks_hessv_2e.F
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
subroutine dft_roks_hessv_2e( basis, geom, nbf, nmo, nclosed,
subroutine dft_roks_hessv_2e(rtdb, basis, geom, nbf, nmo, nclosed,
$ nopen, g_movec, oskel, g_x, acc, g_ax )
C $Id$
implicit none
Expand All @@ -12,7 +12,7 @@ subroutine dft_roks_hessv_2e( basis, geom, nbf, nmo, nclosed,
c
c Return the ROKS orbital 2e-Hessian vector product, g_ax = A * g_x
c
integer basis, geom ! basis & geom handle
integer rtdb, basis, geom ! basis & geom handle
integer nbf, nclosed, nopen ! Basis size and occupation
integer nmo ! No. of linearly dependent MOs
integer g_movec ! MO coefficients
Expand Down Expand Up @@ -41,7 +41,7 @@ subroutine dft_roks_hessv_2e( basis, geom, nbf, nmo, nclosed,
integer dims(3), chnk(3)
integer alo(3), ahi(3), blo(3), bhi(3), clo(3), chi(3)
integer g_dd, g_ff
integer rtdb, calc_type
integer calc_type
c
integer ga_create_atom_blocked
external ga_create_atom_blocked
Expand Down
9 changes: 5 additions & 4 deletions src/nwdft/scf_dft_cg/dft_roks_hessv_xx.F
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
subroutine dft_roks_hessv_xx( basis, geom, nbf,
subroutine dft_roks_hessv_xx( rtdb, basis, geom, nbf,
$ nmo, nclosed, nopen,
$ pflg,
$ g_movecs, oskel, g_fcv, g_fpv, g_fcp,
Expand All @@ -9,9 +9,9 @@ subroutine dft_roks_hessv_xx( basis, geom, nbf,
#include "global.fh"
#include "mafdecls.fh"
#include "rtdb.fh"
#include "bgj.fh"
!#include "bgj.fh"
c
integer basis, geom
integer rtdb, basis, geom
integer nbf, nmo, nclosed, nopen
integer pflg
integer g_movecs
Expand All @@ -33,7 +33,8 @@ subroutine dft_roks_hessv_xx( basis, geom, nbf,
$ g_x, g_ax )
endif
if (pflg .gt. 1) then
call dft_roks_hessv_2e( basis, geom, nbf, nmo, nclosed, nopen,
call dft_roks_hessv_2e( rtdb, basis, geom,
$ nbf, nmo, nclosed, nopen,
$ g_movecs, oskel, g_x, acc, ! was min(1d-6,acc)
$ g_ax )
endif
Expand Down
5 changes: 5 additions & 0 deletions src/nwdft/scf_dft_cg/dft_roks_search_precond.F
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ subroutine dft_roks_search_precond(rtdb, g_grad, g_work)
endif
c
call ga_zero(g_work) ! ESSENTIAL
!
! this is required to make rtdb available to dft_roks_hessv
! without changing the function signature
!
call scf_set_rtdb(rtdb)
c
c Attempt to solve the damned equations
c
Expand Down
6 changes: 6 additions & 0 deletions src/nwdft/scf_dft_cg/dft_uks_hessv.F
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ subroutine dft_uks_hessv(acc, g_x, g_ax)
#include "global.fh"

c
integer rtdb
double precision acc ! [input] required accuracy of products
integer g_x ! [input] handle to input vectors
integer g_ax ! [input] handle to output products
c
integer gtype, vlen, nvec, nvecp, g_tmp
c
integer scf_get_rtdb
external scf_get_rtdb
c
rtdb = scf_get_rtdb()
c
c Multiply a set of vectors by the level-shifted UHF hessian.
c
Expand Down
5 changes: 5 additions & 0 deletions src/nwdft/scf_dft_cg/dft_uks_search_precond.F
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ subroutine dft_uks_search_precond(rtdb, g_grad, g_work)
* call uhf_precond(g_work, 0.0d0)
c
call ga_zero(g_work) ! ESSENTIAL
!
! this is required to make rtdb available to dft_roks_hessv
! without changing the function signature
!
call scf_set_rtdb(rtdb)
c
c Attempt to solve the damned equations
c
Expand Down

0 comments on commit c68a30a

Please sign in to comment.