10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-26 15:12:19 +02:00

dressing excited states: ok

This commit is contained in:
AbdAmmar 2022-09-09 10:22:59 +02:00
parent 40cb9e6f35
commit e1739ecd35
5 changed files with 17 additions and 28 deletions

View File

@ -1,34 +1,15 @@
[threshold_davidson_from_pt2]
type: logical
doc: Thresholds of Davidson's algorithm is set to E(rPT2)*threshold_davidson_from_pt2
interface: ezfio,provider,ocaml
default: false
[csf_based]
type: logical
doc: If |true|, use the CSF-based algorithm
default: False
interface: ezfio,provider,ocaml
[distributed_davidson]
type: logical
doc: If |true|, use the distributed algorithm
default: True
interface: ezfio,provider,ocaml
[only_expected_s2]
type: logical
doc: If |true|, use filter out all vectors with bad |S^2| values
default: True
interface: ezfio,provider,ocaml
[n_det_max_full]
type: Det_number_max
doc: Maximum number of determinants where |H| is fully diagonalized
interface: ezfio,provider,ocaml
default: 1000
[without_diagonal]
type: logical
doc: If |true|, don't use denominator

View File

@ -88,12 +88,12 @@ subroutine davidson_diag_hs2(dets_in,u_in,s2_out,dim_in,energies,sze,N_st,N_st_d
if (dressing_state > 0) then
do k = 1, N_st
! do i = 1, sze
! H_jj(i) += u_in(i,k) * dressing_column_h(i,k)
! enddo
do i = 1, sze
H_jj(i) += u_in(i,k) * dressing_column_h(i,k)
enddo
l = dressed_column_idx(k)
H_jj(l) += u_in(l,k) * dressing_column_h(l,k)
!l = dressed_column_idx(k)
!H_jj(l) += u_in(l,k) * dressing_column_h(l,k)
enddo
endif

View File

@ -61,9 +61,13 @@ subroutine davidson_diag_nonsym_h(dets_in, u_in, dim_in, energies, sze, N_st, N_
do k = 1, N_st
do l = 1, N_st
f = overlap_states_inv(k,l)
do i = 1, N_det
H_jj(i) += f * dressing_delta(i,k) * psi_coef(i,l)
!do i = 1, N_det
! H_jj(i) += f * dressing_delta(i,k) * psi_coef(i,l)
do i = 1, dim_in
H_jj(i) += f * dressing_delta(i,k) * u_in(i,l)
enddo
enddo
enddo
endif
@ -417,7 +421,7 @@ subroutine davidson_diag_nonsym_hjj(dets_in, u_in, H_jj, energies, dim_in, sze,
!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(i,k)
do k = 1, N_st_diag
do i = 1, sze
U(i,shift2+k) = (lambda(k) * U(i,shift2+k) - W(i,shift2+k) ) / max(H_jj(i)-lambda(k), 1.d-2)
U(i,shift2+k) = (lambda(k) * U(i,shift2+k) - W(i,shift2+k)) / max(H_jj(i)-lambda(k), 1.d-2)
enddo
if(k <= N_st) then
@ -428,7 +432,7 @@ subroutine davidson_diag_nonsym_hjj(dets_in, u_in, H_jj, energies, dim_in, sze,
enddo
!$OMP END PARALLEL DO
if ((itertot>1).and.(iter == 1)) then
if((itertot>1).and.(iter == 1)) then
!don't print
continue
else

View File

@ -60,6 +60,8 @@ END_PROVIDER
if(diag_algorithm == "Davidson") then
ASSERT(n_states_diag .lt. n_states)
do j = 1, min(N_states, N_det)
do i = 1, N_det
CI_eigenvectors_nonsym_dressed(i,j) = psi_coef(i,j)

View File

@ -1,10 +1,12 @@
BEGIN_PROVIDER [ double precision, dressing_column_h, (N_det,N_states) ]
&BEGIN_PROVIDER [ double precision, dressing_column_s, (N_det,N_states) ]
&BEGIN_PROVIDER [ double precision, dressing_delta , (N_det,N_states) ]
implicit none
BEGIN_DOC
! Null dressing vectors
END_DOC
dressing_column_h(:,:) = 0.d0
dressing_column_s(:,:) = 0.d0
dressing_delta (:,:) = 0.d0
END_PROVIDER