10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-08-26 06:21:45 +02:00
This commit is contained in:
Anthony Scemama 2018-09-04 18:05:00 +02:00
parent 873035e016
commit 9ebb88cbf3
3 changed files with 6 additions and 10 deletions

View File

@ -13,7 +13,7 @@ BEGIN_PROVIDER [ integer, N_det_generators ]
N_det_generators = N_det N_det_generators = N_det
do i=1,N_det do i=1,N_det
norm = norm + psi_average_norm_contrib_sorted(i) norm = norm + psi_average_norm_contrib_sorted(i)
if (norm >= threshold_generators) then if (norm > threshold_generators+1d-10) then
N_det_generators = i N_det_generators = i
exit exit
endif endif
@ -29,7 +29,6 @@ END_PROVIDER
! For Single reference wave functions, the generator is the ! For Single reference wave functions, the generator is the
! Hartree-Fock determinant ! Hartree-Fock determinant
END_DOC END_DOC
integer :: i, k
psi_det_generators(1:N_int,1:2,1:N_det) = psi_det_sorted(1:N_int,1:2,1:N_det) psi_det_generators(1:N_int,1:2,1:N_det) = psi_det_sorted(1:N_int,1:2,1:N_det)
psi_coef_generators(1:N_det,1:N_states) = psi_coef_sorted(1:N_det,1:N_states) psi_coef_generators(1:N_det,1:N_states) = psi_coef_sorted(1:N_det,1:N_states)
@ -44,7 +43,6 @@ END_PROVIDER
! For Single reference wave functions, the generator is the ! For Single reference wave functions, the generator is the
! Hartree-Fock determinant ! Hartree-Fock determinant
END_DOC END_DOC
integer :: i, k
psi_det_sorted_gen = psi_det_sorted psi_det_sorted_gen = psi_det_sorted
psi_coef_sorted_gen = psi_coef_sorted psi_coef_sorted_gen = psi_coef_sorted
psi_det_sorted_gen_order = psi_det_sorted_order psi_det_sorted_gen_order = psi_det_sorted_order

View File

@ -66,7 +66,7 @@ subroutine generate_singles_and_doubles(delta_ij_loc, i_generator, bitmask_index
integer(bit_kind), allocatable:: preinteresting_det(:,:,:) integer(bit_kind), allocatable:: preinteresting_det(:,:,:)
integer ,allocatable :: abuf(:), labuf(:) integer ,allocatable :: abuf(:), labuf(:)
allocate(abuf(0:N_det*6), labuf(0:N_det)) allocate(abuf(N_det*6), labuf(N_det))
allocate(preinteresting_det(N_int,2,N_det)) allocate(preinteresting_det(N_int,2,N_det))
@ -386,7 +386,7 @@ subroutine alpha_callback_mask(delta_ij_loc, i_gen, sp, mask, bannedOrb, banned,
integer(bit_kind), allocatable :: det_minilist(:,:,:) integer(bit_kind), allocatable :: det_minilist(:,:,:)
allocate(abuf(0:siz), labuf(0:N_det), putten(N_det), det_minilist(N_int, 2, N_det)) allocate(abuf(siz), labuf(N_det), putten(N_det), det_minilist(N_int, 2, N_det))
do i=1,siz do i=1,siz
abuf(i) = psi_from_sorted_gen(rabuf(i)) abuf(i) = psi_from_sorted_gen(rabuf(i))
@ -703,7 +703,7 @@ subroutine get_d2(i_gen, gen, banned, bannedOrb, indexes, abuf, mask, h, p, sp)
implicit none implicit none
integer(bit_kind), intent(in) :: mask(N_int, 2), gen(N_int, 2) integer(bit_kind), intent(in) :: mask(N_int, 2), gen(N_int, 2)
integer, intent(inout) :: abuf(0:*) integer, intent(inout) :: abuf(*)
integer, intent(in) :: i_gen integer, intent(in) :: i_gen
logical, intent(in) :: bannedOrb(mo_tot_num, 2), banned(mo_tot_num, mo_tot_num,2) logical, intent(in) :: bannedOrb(mo_tot_num, 2), banned(mo_tot_num, mo_tot_num,2)
integer, intent(inout) :: indexes(0:mo_tot_num, 0:mo_tot_num) integer, intent(inout) :: indexes(0:mo_tot_num, 0:mo_tot_num)
@ -831,7 +831,7 @@ subroutine get_d1(i_gen, gen, banned, bannedOrb, indexes, abuf, mask, h, p, sp)
implicit none implicit none
integer(bit_kind), intent(in) :: mask(N_int, 2), gen(N_int, 2) integer(bit_kind), intent(in) :: mask(N_int, 2), gen(N_int, 2)
integer, intent(inout) :: abuf(0:*) integer, intent(inout) :: abuf(*)
integer,intent(in) :: i_gen integer,intent(in) :: i_gen
logical, intent(in) :: bannedOrb(mo_tot_num, 2), banned(mo_tot_num, mo_tot_num,2) logical, intent(in) :: bannedOrb(mo_tot_num, 2), banned(mo_tot_num, mo_tot_num,2)
integer(bit_kind) :: det(N_int, 2) integer(bit_kind) :: det(N_int, 2)

View File

@ -50,9 +50,7 @@ subroutine run_wf
else if (zmq_state(:5) == 'dress') then else if (zmq_state(:5) == 'dress') then
! Dress ! Dress
! --------- ! ---------
!call zmq_get_psi(zmq_to_qp_run_socket,1,energy,N_states)
if (zmq_get_psi(zmq_to_qp_run_socket,1) == -1) cycle if (zmq_get_psi(zmq_to_qp_run_socket,1) == -1) cycle
!TOUCH psi_det
if (zmq_get_N_det_generators (zmq_to_qp_run_socket, 1) == -1) cycle if (zmq_get_N_det_generators (zmq_to_qp_run_socket, 1) == -1) cycle
if (zmq_get_N_det_selectors(zmq_to_qp_run_socket, 1) == -1) cycle if (zmq_get_N_det_selectors(zmq_to_qp_run_socket, 1) == -1) cycle
if (zmq_get_dvector(zmq_to_qp_run_socket,1,'state_average_weight',state_average_weight,N_states) == -1) cycle if (zmq_get_dvector(zmq_to_qp_run_socket,1,'state_average_weight',state_average_weight,N_states) == -1) cycle
@ -60,7 +58,7 @@ subroutine run_wf
if (zmq_get_dvector(zmq_to_qp_run_socket,1,'dress_stoch_istate',tmp,1) == -1) cycle if (zmq_get_dvector(zmq_to_qp_run_socket,1,'dress_stoch_istate',tmp,1) == -1) cycle
dress_stoch_istate = int(tmp) dress_stoch_istate = int(tmp)
psi_energy(1:N_states) = energy(1:N_states) psi_energy(1:N_states) = energy(1:N_states)
TOUCH psi_energy dress_stoch_istate state_average_weight TOUCH psi_energy dress_stoch_istate state_average_weight
PROVIDE psi_bilinear_matrix_columns_loc psi_det_alpha_unique psi_det_beta_unique PROVIDE psi_bilinear_matrix_columns_loc psi_det_alpha_unique psi_det_beta_unique
PROVIDE psi_bilinear_matrix_rows psi_det_sorted_gen_order psi_bilinear_matrix_order PROVIDE psi_bilinear_matrix_rows psi_det_sorted_gen_order psi_bilinear_matrix_order