10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-24 13:23:41 +01:00

Fixed multi-state efficiency

This commit is contained in:
Anthony Scemama 2018-09-17 15:15:25 +02:00
parent fa7144ece6
commit df7d5cd117
3 changed files with 4 additions and 6 deletions

View File

@ -49,7 +49,7 @@ logical function testTeethBuilding(minF, N)
allocate(tilde_w(N_det_generators), tilde_cW(0:N_det_generators))
do i=1,N_det_generators
tilde_w(i) = psi_coef_sorted_gen(i,pt2_stoch_istate)**2 + 1.d-20
tilde_w(i) = psi_coef_sorted_gen(i,pt2_stoch_istate)**2 !+ 1.d-20
enddo
double precision :: norm
@ -479,7 +479,7 @@ END_PROVIDER
tilde_cW(0) = 0d0
do i=1,N_det_generators
tilde_w(i) = psi_coef_sorted_gen(i,pt2_stoch_istate)**2 + 1.d-20
tilde_w(i) = psi_coef_sorted_gen(i,pt2_stoch_istate)**2 !+ 1.d-20
enddo
double precision :: norm

View File

@ -13,8 +13,7 @@ BEGIN_PROVIDER [ integer, N_det_generators ]
N_det_generators = N_det
do i=1,N_det
norm = norm - psi_average_norm_contrib_sorted(i)
if (psi_average_norm_contrib_sorted(i) == 0.d0) exit
if (norm < 1.d0 - threshold_generators) then
if (norm - 1.d-12 < 1.d0 - threshold_generators) then
N_det_generators = i
exit
endif

View File

@ -13,8 +13,7 @@ BEGIN_PROVIDER [ integer, N_det_selectors]
norm = 1.d0
do i=1,N_det
norm = norm - psi_average_norm_contrib_sorted(i)
if (psi_average_norm_contrib_sorted(i) == 0.d0) exit
if (norm < 1.d0 - threshold_selectors) then
if (norm - 1.d-12 < 1.d0 - threshold_selectors) then
N_det_selectors = i
exit
endif