mirror of
https://github.com/QuantumPackage/qp2.git
synced 2025-01-03 17:15:40 +01:00
dressing excited states: ok
This commit is contained in:
parent
40cb9e6f35
commit
e1739ecd35
@ -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]
|
[csf_based]
|
||||||
type: logical
|
type: logical
|
||||||
doc: If |true|, use the CSF-based algorithm
|
doc: If |true|, use the CSF-based algorithm
|
||||||
default: False
|
default: False
|
||||||
interface: ezfio,provider,ocaml
|
interface: ezfio,provider,ocaml
|
||||||
|
|
||||||
[distributed_davidson]
|
|
||||||
type: logical
|
|
||||||
doc: If |true|, use the distributed algorithm
|
|
||||||
default: True
|
|
||||||
interface: ezfio,provider,ocaml
|
|
||||||
|
|
||||||
[only_expected_s2]
|
[only_expected_s2]
|
||||||
type: logical
|
type: logical
|
||||||
doc: If |true|, use filter out all vectors with bad |S^2| values
|
doc: If |true|, use filter out all vectors with bad |S^2| values
|
||||||
default: True
|
default: True
|
||||||
interface: ezfio,provider,ocaml
|
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]
|
[without_diagonal]
|
||||||
type: logical
|
type: logical
|
||||||
doc: If |true|, don't use denominator
|
doc: If |true|, don't use denominator
|
||||||
|
@ -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
|
if (dressing_state > 0) then
|
||||||
do k = 1, N_st
|
do k = 1, N_st
|
||||||
|
|
||||||
! do i = 1, sze
|
do i = 1, sze
|
||||||
! H_jj(i) += u_in(i,k) * dressing_column_h(i,k)
|
H_jj(i) += u_in(i,k) * dressing_column_h(i,k)
|
||||||
! enddo
|
enddo
|
||||||
|
|
||||||
l = dressed_column_idx(k)
|
!l = dressed_column_idx(k)
|
||||||
H_jj(l) += u_in(l,k) * dressing_column_h(l,k)
|
!H_jj(l) += u_in(l,k) * dressing_column_h(l,k)
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
endif
|
endif
|
||||||
|
@ -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 k = 1, N_st
|
||||||
do l = 1, N_st
|
do l = 1, N_st
|
||||||
f = overlap_states_inv(k,l)
|
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
|
enddo
|
||||||
enddo
|
enddo
|
||||||
endif
|
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)
|
!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(i,k)
|
||||||
do k = 1, N_st_diag
|
do k = 1, N_st_diag
|
||||||
do i = 1, sze
|
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
|
enddo
|
||||||
|
|
||||||
if(k <= N_st) then
|
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
|
enddo
|
||||||
!$OMP END PARALLEL DO
|
!$OMP END PARALLEL DO
|
||||||
|
|
||||||
if ((itertot>1).and.(iter == 1)) then
|
if((itertot>1).and.(iter == 1)) then
|
||||||
!don't print
|
!don't print
|
||||||
continue
|
continue
|
||||||
else
|
else
|
||||||
|
@ -60,6 +60,8 @@ END_PROVIDER
|
|||||||
|
|
||||||
if(diag_algorithm == "Davidson") then
|
if(diag_algorithm == "Davidson") then
|
||||||
|
|
||||||
|
ASSERT(n_states_diag .lt. n_states)
|
||||||
|
|
||||||
do j = 1, min(N_states, N_det)
|
do j = 1, min(N_states, N_det)
|
||||||
do i = 1, N_det
|
do i = 1, N_det
|
||||||
CI_eigenvectors_nonsym_dressed(i,j) = psi_coef(i,j)
|
CI_eigenvectors_nonsym_dressed(i,j) = psi_coef(i,j)
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
BEGIN_PROVIDER [ double precision, dressing_column_h, (N_det,N_states) ]
|
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_column_s, (N_det,N_states) ]
|
||||||
|
&BEGIN_PROVIDER [ double precision, dressing_delta , (N_det,N_states) ]
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Null dressing vectors
|
! Null dressing vectors
|
||||||
END_DOC
|
END_DOC
|
||||||
dressing_column_h(:,:) = 0.d0
|
dressing_column_h(:,:) = 0.d0
|
||||||
dressing_column_s(:,:) = 0.d0
|
dressing_column_s(:,:) = 0.d0
|
||||||
|
dressing_delta (:,:) = 0.d0
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user