mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 03:23:29 +01:00
Improved truncate_wf
This commit is contained in:
parent
a0949cba45
commit
f1a9a22399
@ -54,11 +54,23 @@ subroutine routine_s2
|
|||||||
double precision, allocatable :: psi_coef_tmp(:,:)
|
double precision, allocatable :: psi_coef_tmp(:,:)
|
||||||
integer :: i,j,k
|
integer :: i,j,k
|
||||||
double precision :: accu(N_states)
|
double precision :: accu(N_states)
|
||||||
|
integer :: weights(0:16), ix
|
||||||
|
double precision :: x
|
||||||
|
|
||||||
print *, 'Weights of the CFG'
|
weights(:) = 0
|
||||||
do i=1,N_det
|
do i=1,N_det
|
||||||
print *, i, real(weight_configuration(det_to_configuration(i),:)), real(sum(weight_configuration(det_to_configuration(i),:)))
|
x = -dlog(1.d-32+sum(weight_configuration(det_to_configuration(i),:)))/dlog(10.d0)
|
||||||
|
ix = min(int(x), 16)
|
||||||
|
weights(ix) += 1
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
print *, 'Histogram of the weights of the CFG'
|
||||||
|
do i=0,15
|
||||||
|
print *, ' 10^{-', i, '} ', weights(i)
|
||||||
|
end do
|
||||||
|
print *, '< 10^{-', 15, '} ', weights(16)
|
||||||
|
|
||||||
|
|
||||||
print*, 'Min weight of the configuration?'
|
print*, 'Min weight of the configuration?'
|
||||||
read(5,*) wmin
|
read(5,*) wmin
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user