mirror of
https://github.com/LCPQ/quantum_package
synced 2024-06-29 16:34:50 +02:00
CAS_SD_ZMQ works with is_in_wavefunction
This commit is contained in:
parent
7f89938ff2
commit
5e1b077576
|
@ -164,6 +164,7 @@ subroutine ZMQ_selection(N_in, pt2)
|
||||||
if (N_in > 0) then
|
if (N_in > 0) then
|
||||||
call fill_H_apply_buffer_no_selection(b%cur,b%det,N_int,0) !!! PAS DE ROBIN
|
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 copy_H_apply_buffer_to_wf()
|
||||||
|
call remove_duplicates_in_psi_det
|
||||||
if (s2_eig) then
|
if (s2_eig) then
|
||||||
call make_s2_eigenfunction
|
call make_s2_eigenfunction
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -202,6 +202,10 @@ subroutine fill_buffer_single(i_generator, sp, h1, bannedOrb, fock_diag_tmp, E0,
|
||||||
if(vect(1, p1) == 0d0) cycle
|
if(vect(1, p1) == 0d0) cycle
|
||||||
call apply_particle(mask, sp, p1, det, ok, N_int)
|
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)
|
Hii = diag_H_mat_elem_fock(psi_det_generators(1,1,i_generator),det,fock_diag_tmp,N_int)
|
||||||
max_e_pert = 0d0
|
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
|
if(dabs(e_pert) > dabs(max_e_pert)) max_e_pert = e_pert
|
||||||
end do
|
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 do
|
||||||
end subroutine
|
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(banned(p1,p2)) cycle
|
||||||
if(mat(1, p1, p2) == 0d0) cycle
|
if(mat(1, p1, p2) == 0d0) cycle
|
||||||
call apply_particles(mask, s1, p1, s2, p2, det, ok, N_int)
|
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)
|
Hii = diag_H_mat_elem_fock(psi_det_generators(1,1,i_generator),det,fock_diag_tmp,N_int)
|
||||||
|
|
|
@ -258,12 +258,14 @@ subroutine remove_duplicates_in_psi_det(found_duplicates)
|
||||||
k += 1
|
k += 1
|
||||||
psi_det(:,:,k) = psi_det_sorted_bit (:,:,i)
|
psi_det(:,:,k) = psi_det_sorted_bit (:,:,i)
|
||||||
psi_coef(k,:) = psi_coef_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
|
endif
|
||||||
enddo
|
enddo
|
||||||
N_det = k
|
N_det = k
|
||||||
call write_bool(output_determinants,found_duplicates,'Found duplicate determinants')
|
call write_bool(output_determinants,found_duplicates,'Found duplicate determinants')
|
||||||
SOFT_TOUCH N_det psi_det psi_coef
|
SOFT_TOUCH N_det psi_det psi_coef
|
||||||
stop 'duplicates in psi_det'
|
|
||||||
endif
|
endif
|
||||||
deallocate (duplicate,bit_tmp)
|
deallocate (duplicate,bit_tmp)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user