2019-10-24 13:55:38 +02:00
|
|
|
BEGIN_PROVIDER [ logical, pruned, (N_det) ]
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! True if determinant is removed by pruning
|
|
|
|
END_DOC
|
|
|
|
|
|
|
|
pruned(:) = .False.
|
|
|
|
|
2020-04-21 23:30:37 +02:00
|
|
|
if (pruning <= 0.d0) then
|
2019-10-24 13:55:38 +02:00
|
|
|
return
|
|
|
|
endif
|
|
|
|
|
2020-12-08 18:44:53 +01:00
|
|
|
integer :: i,j,k,ndet_new,ncfg_max
|
2019-10-24 13:55:38 +02:00
|
|
|
double precision :: thr
|
|
|
|
|
|
|
|
if (s2_eig) then
|
|
|
|
|
2020-12-08 18:44:53 +01:00
|
|
|
ncfg_max = max(1,int ( dble(N_configuration) * (1.d0 - pruning) + 0.5d0 ))
|
2019-10-24 13:55:38 +02:00
|
|
|
|
|
|
|
do i=1,N_det
|
2020-12-08 18:44:53 +01:00
|
|
|
k = det_to_configuration(i)
|
|
|
|
pruned(i) = psi_configuration_sorted_order_reverse(k) > ncfg_max
|
2019-10-24 13:55:38 +02:00
|
|
|
enddo
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
ndet_new = max(1,int( dble(N_det) * (1.d0 - pruning) + 0.5d0 ))
|
|
|
|
thr = psi_average_norm_contrib_sorted(ndet_new)
|
|
|
|
do i=1, N_det
|
|
|
|
pruned(i) = psi_average_norm_contrib(i) < thr
|
|
|
|
enddo
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
END_PROVIDER
|