mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-09 12:44:07 +01:00
Improved state following
This commit is contained in:
parent
9a06b970de
commit
fe11f2bace
@ -89,7 +89,7 @@ END_PROVIDER
|
|||||||
!$OMP shared(is_active_exc, active_hh_idx, active_pp_idx, n_exc_active)&
|
!$OMP shared(is_active_exc, active_hh_idx, active_pp_idx, n_exc_active)&
|
||||||
!$OMP private(lref, pp, II, ok, myMask, myDet, ind, phase, wk, ppp, hh, s)
|
!$OMP private(lref, pp, II, ok, myMask, myDet, ind, phase, wk, ppp, hh, s)
|
||||||
allocate(lref(N_det_non_ref))
|
allocate(lref(N_det_non_ref))
|
||||||
!$OMP DO schedule(static,10)
|
!$OMP DO dynamic
|
||||||
do ppp=1,n_exc_active
|
do ppp=1,n_exc_active
|
||||||
active_excitation_to_determinants_val(:,:,ppp) = 0d0
|
active_excitation_to_determinants_val(:,:,ppp) = 0d0
|
||||||
active_excitation_to_determinants_idx(:,ppp) = 0
|
active_excitation_to_determinants_idx(:,ppp) = 0
|
||||||
|
@ -852,7 +852,8 @@ subroutine davidson_diag_hjj_sjj_mrcc(dets_in,u_in,H_jj,S2_jj,energies,dim_in,sz
|
|||||||
! Compute overlap with U_in
|
! Compute overlap with U_in
|
||||||
! -------------------------
|
! -------------------------
|
||||||
|
|
||||||
integer :: coord(2), order(N_st_diag)
|
integer :: order(N_st_diag)
|
||||||
|
double precision :: cmax
|
||||||
overlap = -1.d0
|
overlap = -1.d0
|
||||||
do k=1,shift2
|
do k=1,shift2
|
||||||
do i=1,shift2
|
do i=1,shift2
|
||||||
@ -860,10 +861,15 @@ subroutine davidson_diag_hjj_sjj_mrcc(dets_in,u_in,H_jj,S2_jj,energies,dim_in,sz
|
|||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
do k=1,N_st
|
do k=1,N_st
|
||||||
coord = maxloc(overlap)
|
cmax = -1.d0
|
||||||
order( coord(2) ) = coord(1)
|
|
||||||
do i=1,shift2
|
do i=1,shift2
|
||||||
overlap(coord(1),i) = -1.d0
|
if (overlap(i,k) > cmax) then
|
||||||
|
cmax = overlap(i,k)
|
||||||
|
order(k) = i
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
do i=1,shift2
|
||||||
|
overlap(order(k),i) = -1.d0
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
overlap = y
|
overlap = y
|
||||||
|
@ -749,7 +749,11 @@ subroutine davidson_diag_hjj_sjj_mmap(dets_in,u_in,H_jj,S2_jj,energies,dim_in,sz
|
|||||||
|
|
||||||
if (state_following) then
|
if (state_following) then
|
||||||
|
|
||||||
integer :: coord(2), order(N_st_diag)
|
! Compute overlap with U_in
|
||||||
|
! -------------------------
|
||||||
|
|
||||||
|
integer :: order(N_st_diag)
|
||||||
|
double precision :: cmax
|
||||||
overlap = -1.d0
|
overlap = -1.d0
|
||||||
do k=1,shift2
|
do k=1,shift2
|
||||||
do i=1,shift2
|
do i=1,shift2
|
||||||
@ -757,10 +761,15 @@ subroutine davidson_diag_hjj_sjj_mmap(dets_in,u_in,H_jj,S2_jj,energies,dim_in,sz
|
|||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
do k=1,N_st
|
do k=1,N_st
|
||||||
coord = maxloc(overlap)
|
cmax = -1.d0
|
||||||
order( coord(2) ) = coord(1)
|
|
||||||
do i=1,shift2
|
do i=1,shift2
|
||||||
overlap(coord(1),i) = -1.d0
|
if (overlap(i,k) > cmax) then
|
||||||
|
cmax = overlap(i,k)
|
||||||
|
order(k) = i
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
do i=1,shift2
|
||||||
|
overlap(order(k),i) = -1.d0
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
overlap = y
|
overlap = y
|
||||||
|
Loading…
Reference in New Issue
Block a user