10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-25 22:52:15 +02:00

CAS_SD_ZMQ works with is_in_wavefunction

This commit is contained in:
Anthony Scemama 2016-11-14 17:41:30 +01:00
parent 7f89938ff2
commit 5e1b077576
3 changed files with 15 additions and 2 deletions

View File

@ -164,6 +164,7 @@ subroutine ZMQ_selection(N_in, pt2)
if (N_in > 0) then
call fill_H_apply_buffer_no_selection(b%cur,b%det,N_int,0) !!! PAS DE ROBIN
call copy_H_apply_buffer_to_wf()
call remove_duplicates_in_psi_det
if (s2_eig) then
call make_s2_eigenfunction
endif

View File

@ -202,6 +202,10 @@ subroutine fill_buffer_single(i_generator, sp, h1, bannedOrb, fock_diag_tmp, E0,
if(vect(1, p1) == 0d0) cycle
call apply_particle(mask, sp, p1, det, ok, N_int)
logical, external :: is_in_wavefunction
if (is_in_wavefunction(det,N_int)) then
cycle
endif
Hii = diag_H_mat_elem_fock(psi_det_generators(1,1,i_generator),det,fock_diag_tmp,N_int)
max_e_pert = 0d0
@ -218,7 +222,9 @@ subroutine fill_buffer_single(i_generator, sp, h1, bannedOrb, fock_diag_tmp, E0,
if(dabs(e_pert) > dabs(max_e_pert)) max_e_pert = e_pert
end do
if(dabs(max_e_pert) > buf%mini) call add_to_selection_buffer(buf, det, max_e_pert)
if(dabs(max_e_pert) > buf%mini) then
call add_to_selection_buffer(buf, det, max_e_pert)
endif
end do
end subroutine
@ -669,6 +675,10 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
if(banned(p1,p2)) cycle
if(mat(1, p1, p2) == 0d0) cycle
call apply_particles(mask, s1, p1, s2, p2, det, ok, N_int)
logical, external :: is_in_wavefunction
if (is_in_wavefunction(det,N_int)) then
cycle
endif
Hii = diag_H_mat_elem_fock(psi_det_generators(1,1,i_generator),det,fock_diag_tmp,N_int)

View File

@ -258,12 +258,14 @@ subroutine remove_duplicates_in_psi_det(found_duplicates)
k += 1
psi_det(:,:,k) = psi_det_sorted_bit (:,:,i)
psi_coef(k,:) = psi_coef_sorted_bit(i,:)
else
call debug_det(psi_det_sorted_bit(1,1,i),N_int)
stop 'duplicates in psi_det'
endif
enddo
N_det = k
call write_bool(output_determinants,found_duplicates,'Found duplicate determinants')
SOFT_TOUCH N_det psi_det psi_coef
stop 'duplicates in psi_det'
endif
deallocate (duplicate,bit_tmp)
end