2023-02-06 19:00:35 +01:00
|
|
|
|
2023-06-22 18:26:52 +02:00
|
|
|
! TODO
|
|
|
|
! remove ao_two_e_coul and use map directly
|
|
|
|
|
2023-02-06 19:00:35 +01:00
|
|
|
! ---
|
|
|
|
|
2023-03-04 02:19:15 +01:00
|
|
|
BEGIN_PROVIDER [double precision, ao_vartc_int_chemist, (ao_num, ao_num, ao_num, ao_num)]
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
integer :: i, j, k, l
|
|
|
|
double precision :: wall1, wall0
|
|
|
|
|
|
|
|
print *, ' providing ao_vartc_int_chemist ...'
|
|
|
|
call wall_time(wall0)
|
|
|
|
|
|
|
|
if(test_cycle_tc) then
|
2023-05-07 12:44:59 +02:00
|
|
|
|
|
|
|
PROVIDE j1b_type
|
|
|
|
if(j1b_type .ne. 3) then
|
|
|
|
print*, ' TC integrals with cycle can not be used for j1b_type =', j1b_type
|
|
|
|
stop
|
|
|
|
endif
|
|
|
|
|
2023-03-04 02:19:15 +01:00
|
|
|
do j = 1, ao_num
|
|
|
|
do l = 1, ao_num
|
|
|
|
do i = 1, ao_num
|
|
|
|
do k = 1, ao_num
|
|
|
|
ao_vartc_int_chemist(k,i,l,j) = tc_grad_square_ao_test(k,i,l,j) + ao_two_e_coul(k,i,l,j)
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
2023-05-07 12:44:59 +02:00
|
|
|
|
2023-03-04 02:19:15 +01:00
|
|
|
else
|
2023-05-07 12:44:59 +02:00
|
|
|
|
2023-03-04 02:19:15 +01:00
|
|
|
do j = 1, ao_num
|
|
|
|
do l = 1, ao_num
|
|
|
|
do i = 1, ao_num
|
|
|
|
do k = 1, ao_num
|
|
|
|
ao_vartc_int_chemist(k,i,l,j) = tc_grad_square_ao(k,i,l,j) + ao_two_e_coul(k,i,l,j)
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
2023-05-07 12:44:59 +02:00
|
|
|
|
2023-03-04 02:19:15 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
call wall_time(wall1)
|
|
|
|
print *, ' wall time for ao_vartc_int_chemist ', wall1 - wall0
|
|
|
|
|
|
|
|
END_PROVIDER
|
|
|
|
|
|
|
|
! ---
|
|
|
|
|
2023-02-06 19:00:35 +01:00
|
|
|
BEGIN_PROVIDER [double precision, ao_tc_int_chemist, (ao_num, ao_num, ao_num, ao_num)]
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
integer :: i, j, k, l
|
|
|
|
double precision :: wall1, wall0
|
|
|
|
|
|
|
|
print *, ' providing ao_tc_int_chemist ...'
|
|
|
|
call wall_time(wall0)
|
|
|
|
|
2023-04-26 08:52:06 +02:00
|
|
|
if(test_cycle_tc) then
|
|
|
|
|
2023-05-07 12:44:59 +02:00
|
|
|
PROVIDE j1b_type
|
|
|
|
if(j1b_type .ne. 3) then
|
|
|
|
print*, ' TC integrals with cycle can not be used for j1b_type =', j1b_type
|
|
|
|
stop
|
|
|
|
endif
|
|
|
|
|
2023-03-04 02:19:15 +01:00
|
|
|
ao_tc_int_chemist = ao_tc_int_chemist_test
|
2023-04-26 08:52:06 +02:00
|
|
|
|
2023-02-06 19:00:35 +01:00
|
|
|
else
|
2023-04-26 08:52:06 +02:00
|
|
|
|
|
|
|
PROVIDE tc_grad_square_ao tc_grad_and_lapl_ao ao_two_e_coul
|
|
|
|
|
2023-03-04 02:19:15 +01:00
|
|
|
do j = 1, ao_num
|
|
|
|
do l = 1, ao_num
|
|
|
|
do i = 1, ao_num
|
|
|
|
do k = 1, ao_num
|
|
|
|
ao_tc_int_chemist(k,i,l,j) = tc_grad_square_ao(k,i,l,j) + tc_grad_and_lapl_ao(k,i,l,j) + ao_two_e_coul(k,i,l,j)
|
2023-03-14 23:49:38 +01:00
|
|
|
! ao_tc_int_chemist(k,i,l,j) = ao_two_e_coul(k,i,l,j)
|
2023-03-04 02:19:15 +01:00
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
2023-02-06 19:00:35 +01:00
|
|
|
endif
|
|
|
|
|
2023-06-02 20:16:39 +02:00
|
|
|
FREE tc_grad_square_ao tc_grad_and_lapl_ao ao_two_e_coul
|
2023-06-01 19:59:25 +02:00
|
|
|
|
2023-02-06 19:00:35 +01:00
|
|
|
call wall_time(wall1)
|
|
|
|
print *, ' wall time for ao_tc_int_chemist ', wall1 - wall0
|
2023-06-01 19:59:25 +02:00
|
|
|
call print_memory_usage()
|
2023-02-06 19:00:35 +01:00
|
|
|
|
|
|
|
END_PROVIDER
|
|
|
|
|
|
|
|
! ---
|
2023-04-26 08:52:06 +02:00
|
|
|
|
|
|
|
BEGIN_PROVIDER [double precision, ao_tc_int_chemist_no_cycle, (ao_num, ao_num, ao_num, ao_num)]
|
|
|
|
|
2023-03-28 11:21:19 +02:00
|
|
|
implicit none
|
|
|
|
integer :: i, j, k, l
|
|
|
|
double precision :: wall1, wall0
|
2023-04-26 08:52:06 +02:00
|
|
|
|
2023-03-28 11:21:19 +02:00
|
|
|
print *, ' providing ao_tc_int_chemist_no_cycle ...'
|
|
|
|
call wall_time(wall0)
|
2023-04-26 08:52:06 +02:00
|
|
|
|
|
|
|
do j = 1, ao_num
|
|
|
|
do l = 1, ao_num
|
|
|
|
do i = 1, ao_num
|
|
|
|
do k = 1, ao_num
|
|
|
|
ao_tc_int_chemist_no_cycle(k,i,l,j) = tc_grad_square_ao(k,i,l,j) + tc_grad_and_lapl_ao(k,i,l,j) + ao_two_e_coul(k,i,l,j)
|
|
|
|
!ao_tc_int_chemist(k,i,l,j) = ao_two_e_coul(k,i,l,j)
|
2023-03-28 11:21:19 +02:00
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
2023-04-26 08:52:06 +02:00
|
|
|
enddo
|
|
|
|
|
2023-03-28 11:21:19 +02:00
|
|
|
call wall_time(wall1)
|
|
|
|
print *, ' wall time for ao_tc_int_chemist_no_cycle ', wall1 - wall0
|
2023-06-22 22:04:57 +02:00
|
|
|
|
2023-03-28 11:21:19 +02:00
|
|
|
END_PROVIDER
|
2023-02-06 19:00:35 +01:00
|
|
|
|
2023-04-26 08:52:06 +02:00
|
|
|
! ---
|
|
|
|
|
2023-02-06 19:00:35 +01:00
|
|
|
BEGIN_PROVIDER [double precision, ao_tc_int_chemist_test, (ao_num, ao_num, ao_num, ao_num)]
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
integer :: i, j, k, l
|
|
|
|
double precision :: wall1, wall0
|
|
|
|
|
|
|
|
print *, ' providing ao_tc_int_chemist_test ...'
|
|
|
|
call wall_time(wall0)
|
|
|
|
|
|
|
|
do j = 1, ao_num
|
|
|
|
do l = 1, ao_num
|
|
|
|
do i = 1, ao_num
|
|
|
|
do k = 1, ao_num
|
|
|
|
ao_tc_int_chemist_test(k,i,l,j) = tc_grad_square_ao_test(k,i,l,j) + tc_grad_and_lapl_ao_test(k,i,l,j) + ao_two_e_coul(k,i,l,j)
|
2023-03-14 23:49:38 +01:00
|
|
|
! ao_tc_int_chemist_test(k,i,l,j) = ao_two_e_coul(k,i,l,j)
|
2023-02-06 19:00:35 +01:00
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
call wall_time(wall1)
|
|
|
|
print *, ' wall time for ao_tc_int_chemist_test ', wall1 - wall0
|
|
|
|
|
|
|
|
END_PROVIDER
|
|
|
|
|
|
|
|
! ---
|
|
|
|
|
|
|
|
BEGIN_PROVIDER [double precision, ao_two_e_coul, (ao_num, ao_num, ao_num, ao_num) ]
|
|
|
|
|
|
|
|
BEGIN_DOC
|
|
|
|
!
|
|
|
|
! ao_two_e_coul(k,i,l,j) = ( k i | 1/r12 | l j ) = < l k | 1/r12 | j i >
|
|
|
|
!
|
|
|
|
END_DOC
|
|
|
|
|
|
|
|
integer :: i, j, k, l
|
|
|
|
double precision :: integral
|
|
|
|
double precision, external :: get_ao_two_e_integral
|
|
|
|
|
|
|
|
PROVIDE ao_integrals_map
|
|
|
|
|
|
|
|
do j = 1, ao_num
|
|
|
|
do l = 1, ao_num
|
|
|
|
do i = 1, ao_num
|
|
|
|
do k = 1, ao_num
|
|
|
|
|
|
|
|
! < 1:k, 2:l | 1:i, 2:j >
|
|
|
|
integral = get_ao_two_e_integral(i, j, k, l, ao_integrals_map)
|
|
|
|
|
|
|
|
ao_two_e_coul(k,i,l,j) = integral
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
END_PROVIDER
|
|
|
|
|
|
|
|
! ---
|
|
|
|
|