10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-09 07:33:49 +01:00
QuantumPackage/src/determinants/prune_wf.irp.f

36 lines
706 B
Fortran
Raw Normal View History

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
integer :: i,j,k,ndet_new,ncfg_max
2019-10-24 13:55:38 +02:00
double precision :: thr
2021-02-17 00:46:58 +01:00
! if (s2_eig) then
!
! ncfg_max = max(1,int ( dble(N_configuration) * (1.d0 - pruning) + 0.5d0 ))
!
! do i=1,N_det
! k = det_to_configuration(i)
! pruned(i) = psi_configuration_sorted_order_reverse(k) > ncfg_max
! enddo
!
! else
2019-10-24 13:55:38 +02:00
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
2021-02-17 00:46:58 +01:00
! endif
2019-10-24 13:55:38 +02:00
END_PROVIDER