Skip to content

Commit

Permalink
merge with Abdallah
Browse files Browse the repository at this point in the history
  • Loading branch information
eginer committed May 6, 2024
2 parents 96f2312 + 310872e commit 76732ff
Show file tree
Hide file tree
Showing 57 changed files with 1,358 additions and 7,996 deletions.
15 changes: 6 additions & 9 deletions plugins/local/bi_ort_ints/no_dressing.irp.f
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@

BEGIN_PROVIDER [double precision, noL_0e]

BEGIN_DOC
!
! < Phi_left | L | Phi_right >
!
END_DOC

implicit none
integer :: i, j, k, ipoint
double precision :: t0, t1
Expand All @@ -330,10 +336,6 @@
double precision, allocatable :: tmp_M(:,:), tmp_S(:), tmp_O(:), tmp_J(:,:)
double precision, allocatable :: tmp_M_priv(:,:), tmp_S_priv(:), tmp_O_priv(:), tmp_J_priv(:,:)


call wall_time(t0)
print*, " Providing noL_0e ..."

if(elec_alpha_num .eq. elec_beta_num) then

allocate(tmp(elec_beta_num))
Expand Down Expand Up @@ -708,11 +710,6 @@

endif

call wall_time(t1)
print*, " Wall time for noL_0e (min) = ", (t1 - t0)/60.d0

print*, " noL_0e = ", noL_0e

END_PROVIDER

! ---
Expand Down
2 changes: 1 addition & 1 deletion plugins/local/bi_ort_ints/three_body_ints_bi_ort.irp.f
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ subroutine give_integrals_3_body_bi_ort_spin( n, sigma_n, l, sigma_l, k, sigma_k
endif

return
end subroutine give_integrals_3_body_bi_ort_spin
end

! ---

Expand Down
18 changes: 10 additions & 8 deletions plugins/local/non_h_ints_mu/jast_1e_utils.irp.f
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ subroutine get_j1e_coef_fit_ao2(dim_fit, coef_fit)
double precision, allocatable :: A(:,:,:,:), b(:), A_tmp(:,:,:,:)
double precision, allocatable :: Pa(:,:), Pb(:,:), Pt(:,:)
double precision, allocatable :: u1e_tmp(:), tmp(:,:,:)
double precision, allocatable :: tmp1(:,:,:), tmp2(:,:,:)
double precision, allocatable :: U(:,:), D(:), Vt(:,:), work(:)


Expand Down Expand Up @@ -176,26 +177,27 @@ subroutine get_j1e_coef_fit_ao2(dim_fit, coef_fit)
! --- --- ---
! get A

allocate(tmp(n_points_final_grid,ao_num,ao_num))
allocate(tmp1(n_points_final_grid,ao_num,ao_num), tmp2(n_points_final_grid,ao_num,ao_num))
allocate(A(ao_num,ao_num,ao_num,ao_num))

!$OMP PARALLEL &
!$OMP DEFAULT (NONE) &
!$OMP PRIVATE (i, j, ipoint) &
!$OMP SHARED (n_points_final_grid, ao_num, final_weight_at_r_vector, aos_in_r_array_transp, tmp)
!$OMP SHARED (n_points_final_grid, ao_num, final_weight_at_r_vector, aos_in_r_array_transp, tmp1, tmp2)
!$OMP DO COLLAPSE(2)
do j = 1, ao_num
do i = 1, ao_num
do ipoint = 1, n_points_final_grid
tmp(ipoint,i,j) = dsqrt(final_weight_at_r_vector(ipoint)) * aos_in_r_array_transp(ipoint,i) * aos_in_r_array_transp(ipoint,j)
tmp1(ipoint,i,j) = final_weight_at_r_vector(ipoint) * aos_in_r_array_transp(ipoint,i) * aos_in_r_array_transp(ipoint,j)
tmp2(ipoint,i,j) = aos_in_r_array_transp(ipoint,i) * aos_in_r_array_transp(ipoint,j)
enddo
enddo
enddo
!$OMP END DO
!$OMP END PARALLEL

call dgemm( "T", "N", ao_num*ao_num, ao_num*ao_num, n_points_final_grid, 1.d0 &
, tmp(1,1,1), n_points_final_grid, tmp(1,1,1), n_points_final_grid &
call dgemm( "T", "N", ao_num*ao_num, ao_num*ao_num, n_points_final_grid, 1.d0 &
, tmp1(1,1,1), n_points_final_grid, tmp2(1,1,1), n_points_final_grid &
, 0.d0, A(1,1,1,1), ao_num*ao_num)

allocate(A_tmp(ao_num,ao_num,ao_num,ao_num))
Expand All @@ -207,13 +209,13 @@ subroutine get_j1e_coef_fit_ao2(dim_fit, coef_fit)
allocate(b(ao_num*ao_num))

do ipoint = 1, n_points_final_grid
u1e_tmp(ipoint) = dsqrt(final_weight_at_r_vector(ipoint)) * u1e_tmp(ipoint)
u1e_tmp(ipoint) = u1e_tmp(ipoint)
enddo

call dgemv("T", n_points_final_grid, ao_num*ao_num, 1.d0, tmp(1,1,1), n_points_final_grid, u1e_tmp(1), 1, 0.d0, b(1), 1)
call dgemv("T", n_points_final_grid, ao_num*ao_num, 1.d0, tmp1(1,1,1), n_points_final_grid, u1e_tmp(1), 1, 0.d0, b(1), 1)

deallocate(u1e_tmp)
deallocate(tmp)
deallocate(tmp1, tmp2)

! --- --- ---
! solve Ax = b
Expand Down
Loading

0 comments on commit 76732ff

Please sign in to comment.