10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-03 20:54:00 +01:00

Simplification

This commit is contained in:
Anthony Scemama 2017-01-25 18:52:44 +01:00
parent 9e73ed6b1c
commit b08ced8741

View File

@ -309,22 +309,10 @@ subroutine select_doubles(i_generator,hole_mask,particle_mask,fock_diag_tmp,E0,p
! If the subset doesn't exist, return ! If the subset doesn't exist, return
logical :: will_compute logical :: will_compute
will_compute = subset == 0 will_compute = subset == 0
maskInd = -1
if (.not.will_compute) then if (.not.will_compute) then
outerloop: do s1=1,2 maskInd = N_holes(1)*N_holes(2) + N_holes(2)*((N_holes(2)-1)/2) + N_holes(1)*((N_holes(1)-1)/2)
do i1=N_holes(s1),1,-1 ! Generate low excitations first will_compute = (maskInd >= subset)
do s2=s1,2
do i2=N_holes(s2),ib,-1 ! Generate low excitations first
maskInd += 1
if(mod(maskInd, fragment_count) == (subset-1)) then
will_compute = .True.
exit outerloop
end if
enddo
enddo
enddo
enddo outerloop
if (.not.will_compute) then if (.not.will_compute) then
return return
endif endif
@ -365,8 +353,23 @@ subroutine select_doubles(i_generator,hole_mask,particle_mask,fock_diag_tmp,E0,p
maskInd = -1 maskInd = -1
integer :: nb_count
do s1=1,2 do s1=1,2
do i1=N_holes(s1),1,-1 ! Generate low excitations first do i1=N_holes(s1),1,-1 ! Generate low excitations first
! will_compute = (subset == 0)
! nb_count = 0
! if (s1==1) then
! nb_count = N_holes(1)-i1 + N_holes(2)
! else
! nb_count = N_holes(2)-i1
! endif
! maskInd = 12345
! fragment_count = 400
! subset = 3
! nb_count = 100
! if( nb_count >= (fragment_count - mod(maskInd+1, fragment_count) + subset-1) ) then
! will_compute = .true.
! end if
h1 = hole_list(i1,s1) h1 = hole_list(i1,s1)
call apply_hole(psi_det_generators(1,1,i_generator), s1,h1, pmask, ok, N_int) call apply_hole(psi_det_generators(1,1,i_generator), s1,h1, pmask, ok, N_int)