mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 18:16:12 +01:00
FCI stops exactly at the required number of determinants
This commit is contained in:
parent
f326801e56
commit
c2a7d25615
@ -5,6 +5,7 @@ program fci_zmq
|
||||
|
||||
double precision, allocatable :: pt2(:)
|
||||
integer :: degree
|
||||
integer :: n_det_before, to_select
|
||||
|
||||
allocate (pt2(N_states))
|
||||
|
||||
@ -33,13 +34,15 @@ program fci_zmq
|
||||
double precision :: E_CI_before(N_states)
|
||||
|
||||
|
||||
integer :: n_det_before
|
||||
print*,'Beginning the selection ...'
|
||||
E_CI_before(1:N_states) = CI_energy(1:N_states)
|
||||
n_det_before = 0
|
||||
|
||||
do while ( (N_det < N_det_max) .and. (maxval(abs(pt2(1:N_states))) > pt2_max) )
|
||||
n_det_before = N_det
|
||||
call ZMQ_selection(max(1024-N_det, N_det), pt2)
|
||||
to_select = max(1024-N_det, N_det)
|
||||
to_select = min(to_select, N_det_max-n_det_before)
|
||||
call ZMQ_selection(to_select, pt2)
|
||||
|
||||
PROVIDE psi_coef
|
||||
PROVIDE psi_det
|
||||
|
@ -622,7 +622,7 @@ subroutine search_key_big_interval(key,X,sze,idx,ibegin_in,iend_in)
|
||||
|
||||
istep = ishft(iend-ibegin,-1)
|
||||
idx = ibegin + istep
|
||||
do while (istep > 16)
|
||||
do while (istep > 64)
|
||||
idx = ibegin + istep
|
||||
! TODO : Cache misses
|
||||
if (cache_key < X(idx)) then
|
||||
@ -660,8 +660,8 @@ subroutine search_key_big_interval(key,X,sze,idx,ibegin_in,iend_in)
|
||||
endif
|
||||
enddo
|
||||
idx = ibegin
|
||||
if (min(iend_in,sze) > ibegin+16) then
|
||||
iend = ibegin+16
|
||||
if (min(iend_in,sze) > ibegin+64) then
|
||||
iend = ibegin+64
|
||||
do while (cache_key > X(idx))
|
||||
idx = idx+1
|
||||
end do
|
||||
@ -730,7 +730,7 @@ subroutine search_key_value_big_interval(key,value,X,Y,sze,idx,ibegin_in,iend_in
|
||||
|
||||
istep = ishft(iend-ibegin,-1)
|
||||
idx = ibegin + istep
|
||||
do while (istep > 16)
|
||||
do while (istep > 64)
|
||||
idx = ibegin + istep
|
||||
if (cache_key < X(idx)) then
|
||||
iend = idx
|
||||
@ -771,8 +771,8 @@ subroutine search_key_value_big_interval(key,value,X,Y,sze,idx,ibegin_in,iend_in
|
||||
enddo
|
||||
idx = ibegin
|
||||
value = Y(idx)
|
||||
if (min(iend_in,sze) > ibegin+16) then
|
||||
iend = ibegin+16
|
||||
if (min(iend_in,sze) > ibegin+64) then
|
||||
iend = ibegin+64
|
||||
do while (cache_key > X(idx))
|
||||
idx = idx+1
|
||||
value = Y(idx)
|
||||
|
Loading…
Reference in New Issue
Block a user