10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-06-02 11:25:18 +02:00

Introduced psi_det_tmp

This commit is contained in:
Anthony Scemama 2020-07-17 21:18:10 +02:00
parent 5db05a2aee
commit 5657597900

View File

@ -107,8 +107,11 @@ BEGIN_PROVIDER [ integer, det_num ]
double precision :: d_alpha(det_alpha_num), d_beta (det_beta_num)
integer :: i_alpha(det_alpha_num), i_beta(det_beta_num)
integer :: iorder(max(det_alpha_num,det_beta_num))
integer*8, allocatable :: psi_det_tmp(:,:)
double precision :: t, norm
allocate (psi_det_tmp (N_int,max(det_alpha_num,det_beta_num)))
t = ci_threshold
! Compute the norm of the alpha and beta determinants
@ -146,9 +149,12 @@ BEGIN_PROVIDER [ integer, det_num ]
enddo
do i=1,det_alpha_num
psi_det_alpha(:,i) = psi_det_alpha(:,iorder(i))
psi_det_tmp(:,i) = psi_det_alpha(:,iorder(i))
i_alpha(iorder(i)) = i
enddo
do i=1,det_alpha_num
psi_det_alpha(:,i) = psi_det_tmp(:,i)
enddo
! Reorder beta determinants
do i=1,det_beta_num
@ -173,9 +179,13 @@ BEGIN_PROVIDER [ integer, det_num ]
enddo
do i=1,det_beta_num
psi_det_beta(:,i) = psi_det_beta(:,iorder(i))
psi_det_tmp(:,i) = psi_det_beta(:,iorder(i))
i_beta(iorder(i)) = i
enddo
do i=1,det_beta_num
psi_det_beta(:,i) = psi_det_tmp(:,i)
enddo
deallocate(psi_det_tmp)
! Apply the threshold to the wave function
@ -366,7 +376,6 @@ BEGIN_PROVIDER [ integer, det_alpha_order, (det_alpha_num) ]
! Order in which to compute the alhpa determinants
END_DOC
integer :: i
! double precision :: tmp(det_alpha_num)
do i=1,det_alpha_num
det_alpha_order(i) = i
enddo