mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-23 12:56:14 +01:00
Corrected bug for large PT2
This commit is contained in:
parent
ad4dc469cc
commit
e1e2a1d3e4
@ -20,14 +20,18 @@ subroutine perturb_buffer_$PERT(i_generator,buffer,buffer_size,e_2_pert_buffer,c
|
|||||||
integer, external :: connected_to_ref
|
integer, external :: connected_to_ref
|
||||||
logical, external :: is_in_wavefunction
|
logical, external :: is_in_wavefunction
|
||||||
|
|
||||||
integer(bit_kind) :: minilist(Nint,2,N_det_selectors)
|
integer(bit_kind), allocatable :: minilist(:,:,:)
|
||||||
integer :: idx_minilist(N_det_selectors), N_minilist
|
integer, allocatable :: idx_minilist(:)
|
||||||
|
integer :: N_minilist
|
||||||
|
|
||||||
integer(bit_kind) :: minilist_gen(Nint,2,N_det_generators)
|
integer(bit_kind), allocatable :: minilist_gen(:,:,:)
|
||||||
integer :: N_minilist_gen
|
integer :: N_minilist_gen
|
||||||
logical :: fullMatch
|
logical :: fullMatch
|
||||||
logical, external :: is_connected_to
|
logical, external :: is_connected_to
|
||||||
|
|
||||||
|
allocate( minilist(Nint,2,N_det_selectors), &
|
||||||
|
minilist_gen(Nint,2,N_det_generators), &
|
||||||
|
idx_minilist(N_det_selectors) )
|
||||||
|
|
||||||
|
|
||||||
ASSERT (Nint > 0)
|
ASSERT (Nint > 0)
|
||||||
@ -40,6 +44,7 @@ subroutine perturb_buffer_$PERT(i_generator,buffer,buffer_size,e_2_pert_buffer,c
|
|||||||
call create_minilist_find_previous(key_mask, psi_det_generators, miniList_gen, i_generator-1, N_minilist_gen, fullMatch, Nint)
|
call create_minilist_find_previous(key_mask, psi_det_generators, miniList_gen, i_generator-1, N_minilist_gen, fullMatch, Nint)
|
||||||
|
|
||||||
if(fullMatch) then
|
if(fullMatch) then
|
||||||
|
deallocate( minilist, minilist_gen, idx_minilist )
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
@ -66,6 +71,7 @@ subroutine perturb_buffer_$PERT(i_generator,buffer,buffer_size,e_2_pert_buffer,c
|
|||||||
enddo
|
enddo
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
deallocate( minilist, minilist_gen, idx_minilist )
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -89,14 +95,18 @@ subroutine perturb_buffer_by_mono_$PERT(i_generator,buffer,buffer_size,e_2_pert_
|
|||||||
integer, external :: connected_to_ref_by_mono
|
integer, external :: connected_to_ref_by_mono
|
||||||
logical, external :: is_in_wavefunction
|
logical, external :: is_in_wavefunction
|
||||||
|
|
||||||
integer(bit_kind) :: minilist(Nint,2,N_det_selectors)
|
integer(bit_kind), allocatable :: minilist(:,:,:)
|
||||||
integer :: idx_minilist(N_det_selectors), N_minilist
|
integer, allocatable :: idx_minilist(:)
|
||||||
|
integer :: N_minilist
|
||||||
|
|
||||||
integer(bit_kind) :: minilist_gen(Nint,2,N_det_generators)
|
integer(bit_kind), allocatable :: minilist_gen(:,:,:)
|
||||||
integer :: N_minilist_gen
|
integer :: N_minilist_gen
|
||||||
logical :: fullMatch
|
logical :: fullMatch
|
||||||
logical, external :: is_connected_to
|
logical, external :: is_connected_to
|
||||||
|
|
||||||
|
allocate( minilist(Nint,2,N_det_selectors), &
|
||||||
|
minilist_gen(Nint,2,N_det_generators), &
|
||||||
|
idx_minilist(N_det_selectors) )
|
||||||
|
|
||||||
|
|
||||||
ASSERT (Nint > 0)
|
ASSERT (Nint > 0)
|
||||||
@ -109,6 +119,7 @@ subroutine perturb_buffer_by_mono_$PERT(i_generator,buffer,buffer_size,e_2_pert_
|
|||||||
call create_minilist_find_previous(key_mask, psi_det_generators, miniList_gen, i_generator-1, N_minilist_gen, fullMatch, Nint)
|
call create_minilist_find_previous(key_mask, psi_det_generators, miniList_gen, i_generator-1, N_minilist_gen, fullMatch, Nint)
|
||||||
|
|
||||||
if(fullMatch) then
|
if(fullMatch) then
|
||||||
|
deallocate( minilist, minilist_gen, idx_minilist )
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
@ -137,6 +148,7 @@ subroutine perturb_buffer_by_mono_$PERT(i_generator,buffer,buffer_size,e_2_pert_
|
|||||||
enddo
|
enddo
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
deallocate( minilist, minilist_gen, idx_minilist )
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user