mirror of
https://github.com/LCPQ/quantum_package
synced 2024-10-02 14:30:59 +02:00
Refinement of psi_generators
This commit is contained in:
parent
0e0e8fb7b6
commit
fa7144ece6
@ -308,7 +308,7 @@ subroutine select_singles_and_doubles(i_generator,hole_mask,particle_mask,fock_d
|
||||
call bitstring_to_list_ab(hole , hole_list , N_holes , N_int)
|
||||
call bitstring_to_list_ab(particle, particle_list, N_particles, N_int)
|
||||
|
||||
integer :: l_a, nmax
|
||||
integer :: l_a, nmax, idx
|
||||
integer, allocatable :: indices(:), exc_degree(:), iorder(:)
|
||||
allocate (indices(N_det), &
|
||||
exc_degree(max(N_det_alpha_unique,N_det_beta_unique)))
|
||||
@ -331,7 +331,9 @@ subroutine select_singles_and_doubles(i_generator,hole_mask,particle_mask,fock_d
|
||||
do l_a=psi_bilinear_matrix_columns_loc(j), psi_bilinear_matrix_columns_loc(j+1)-1
|
||||
i = psi_bilinear_matrix_rows(l_a)
|
||||
if (nt + exc_degree(i) <= 4) then
|
||||
indices(k) = psi_det_sorted_order(psi_bilinear_matrix_order(l_a))
|
||||
idx = psi_det_sorted_order(psi_bilinear_matrix_order(l_a))
|
||||
if (psi_average_norm_contrib_sorted(idx) < 1.d-12) cycle
|
||||
indices(k) = idx
|
||||
k=k+1
|
||||
endif
|
||||
enddo
|
||||
@ -350,9 +352,11 @@ subroutine select_singles_and_doubles(i_generator,hole_mask,particle_mask,fock_d
|
||||
i = psi_bilinear_matrix_transp_columns(l_a)
|
||||
if (exc_degree(i) < 3) cycle
|
||||
if (nt + exc_degree(i) <= 4) then
|
||||
indices(k) = psi_det_sorted_order( &
|
||||
idx = psi_det_sorted_order( &
|
||||
psi_bilinear_matrix_order( &
|
||||
psi_bilinear_matrix_transp_order(l_a)))
|
||||
if (psi_average_norm_contrib_sorted(idx) < 1.d-12) cycle
|
||||
indices(k) = idx
|
||||
k=k+1
|
||||
endif
|
||||
enddo
|
||||
|
@ -9,11 +9,12 @@ BEGIN_PROVIDER [ integer, N_det_generators ]
|
||||
integer :: i
|
||||
double precision :: norm
|
||||
call write_time(6)
|
||||
norm = 0.d0
|
||||
norm = 1.d0
|
||||
N_det_generators = N_det
|
||||
do i=1,N_det
|
||||
norm = norm + psi_average_norm_contrib_sorted(i)
|
||||
if (norm > threshold_generators+1d-10) then
|
||||
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
|
||||
N_det_generators = i
|
||||
exit
|
||||
endif
|
||||
|
@ -10,17 +10,16 @@ BEGIN_PROVIDER [ integer, N_det_selectors]
|
||||
double precision :: norm, norm_max
|
||||
call write_time(6)
|
||||
N_det_selectors = N_det
|
||||
if (threshold_generators < 1.d0) then
|
||||
norm = 0.d0
|
||||
norm = 1.d0
|
||||
do i=1,N_det
|
||||
norm = norm + psi_average_norm_contrib_sorted(i)
|
||||
if (norm > threshold_selectors) then
|
||||
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
|
||||
N_det_selectors = i
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
N_det_selectors = max(N_det_selectors,N_det_generators)
|
||||
endif
|
||||
call write_int(6,N_det_selectors,'Number of selectors')
|
||||
END_PROVIDER
|
||||
|
||||
|
@ -2,7 +2,12 @@ program print_energy
|
||||
implicit none
|
||||
read_wf = .true.
|
||||
touch read_wf
|
||||
provide mo_bielec_integrals_in_map
|
||||
double precision :: time1, time0
|
||||
call wall_time(time0)
|
||||
call routine
|
||||
call wall_time(time1)
|
||||
print *, 'Wall time :' , time1 - time0
|
||||
end
|
||||
|
||||
subroutine routine
|
||||
|
Loading…
Reference in New Issue
Block a user