2015-04-20 16:45:06 +02:00
|
|
|
BEGIN_PROVIDER [ double precision, H_matrix_all_dets,(N_det,N_det) ]
|
2016-11-02 16:01:01 +01:00
|
|
|
use bitmasks
|
2015-04-20 16:45:06 +02:00
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! H matrix on the basis of the slater determinants defined by psi_det
|
|
|
|
END_DOC
|
2016-11-02 16:01:01 +01:00
|
|
|
integer :: i,j,k
|
2015-04-20 16:45:06 +02:00
|
|
|
double precision :: hij
|
2016-11-02 16:01:01 +01:00
|
|
|
integer :: degree(N_det),idx(0:N_det)
|
2015-04-20 16:45:06 +02:00
|
|
|
call i_H_j(psi_det(1,1,1),psi_det(1,1,1),N_int,hij)
|
2016-11-02 16:01:01 +01:00
|
|
|
!$OMP PARALLEL DO SCHEDULE(GUIDED) PRIVATE(i,j,hij,degree,idx,k) &
|
2015-04-20 16:45:06 +02:00
|
|
|
!$OMP SHARED (N_det, psi_det, N_int,H_matrix_all_dets)
|
|
|
|
do i =1,N_det
|
2016-11-02 16:01:01 +01:00
|
|
|
! call get_excitation_degree_vector(psi_det,psi_det(1,1,i),degree,N_int,N_det,idx)
|
|
|
|
! do k =1, idx(0)
|
|
|
|
! j = idx(k)
|
|
|
|
! if(j.lt.i)cycle
|
|
|
|
do j = i, N_det
|
2015-04-20 16:45:06 +02:00
|
|
|
call i_H_j(psi_det(1,1,i),psi_det(1,1,j),N_int,hij)
|
|
|
|
H_matrix_all_dets(i,j) = hij
|
|
|
|
H_matrix_all_dets(j,i) = hij
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
!$OMP END PARALLEL DO
|
|
|
|
END_PROVIDER
|
|
|
|
|
2016-11-02 16:01:01 +01:00
|
|
|
|
|
|
|
subroutine provide_big_matrix_stored_with_current_dets(sze,dets_in,big_matrix_stored)
|
|
|
|
use bitmasks
|
|
|
|
integer, intent(in) :: sze
|
|
|
|
integer(bit_kind), intent(in) :: dets_in(N_int,2,sze)
|
|
|
|
double precision, intent(out) :: big_matrix_stored(sze,sze)
|
|
|
|
integer :: i,j,k
|
|
|
|
double precision :: hij
|
|
|
|
integer :: degree(N_det),idx(0:N_det)
|
|
|
|
call i_H_j(dets_in(1,1,1),dets_in(1,1,1),N_int,hij)
|
|
|
|
print*, 'providing big_matrix_stored'
|
|
|
|
print*, n_det_max_stored
|
|
|
|
!$OMP PARALLEL DO SCHEDULE(GUIDED) PRIVATE(i,j,hij,degree,idx,k) &
|
|
|
|
!$OMP SHARED (sze, dets_in, N_int,big_matrix_stored)
|
|
|
|
do i =1,sze
|
|
|
|
! call get_excitation_degree_vector(dets_in,dets_in(1,1,i),degree,N_int,sze,idx)
|
|
|
|
! do k =1, idx(0)
|
|
|
|
! j = idx(k)
|
|
|
|
do j = i, sze
|
|
|
|
if(j.lt.i)cycle
|
|
|
|
call i_H_j(dets_in(1,1,i),dets_in(1,1,j),N_int,hij)
|
|
|
|
big_matrix_stored(i,j) = hij
|
|
|
|
big_matrix_stored(j,i) = hij
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
!$OMP END PARALLEL DO
|
|
|
|
print*, 'big_matrix_stored provided !!'
|
|
|
|
|
|
|
|
|
|
|
|
end
|