9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-07 14:03:37 +01:00

fixed a bug in cholesk_ao_transp
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
eginer 2024-05-15 15:41:35 +02:00
parent 5c69a7c005
commit 8eea5d7f7f
2 changed files with 54 additions and 1 deletions

View File

@ -0,0 +1,53 @@
program my_program_to_print_stuffs
implicit none
BEGIN_DOC
! TODO : Put the documentation of the program here
END_DOC
integer :: i,j,k,l,m
double precision :: integral, accu, accu_tot, integral_cholesky
double precision :: get_ao_two_e_integral, get_two_e_integral ! declaration of the functions
print*,'AO integrals, physicist notations : <i j|k l>'
accu_tot = 0.D0
do i = 1, ao_num
do j = 1, ao_num
do k = 1, ao_num
do l = 1, ao_num
integral = get_ao_two_e_integral(i, j, k, l, ao_integrals_map)
integral_cholesky = 0.D0
do m = 1, cholesky_ao_num
integral_cholesky += cholesky_ao_transp(m,i,k) * cholesky_ao_transp(m,j,l)
enddo
accu = dabs(integral_cholesky-integral)
accu_tot += accu
if(accu.gt.1.d-10)then
print*,i,j,k,l
print*,accu, integral, integral_cholesky
endif
enddo
enddo
enddo
enddo
print*,'accu_tot',accu_tot
print*,'MO integrals, physicist notations : <i j|k l>'
do i = 1, mo_num
do j = 1, mo_num
do k = 1, mo_num
do l = 1, mo_num
integral = get_two_e_integral(i, j, k, l, mo_integrals_map)
accu = 0.D0
integral_cholesky = 0.D0
do m = 1, cholesky_mo_num
integral_cholesky += cholesky_mo_transp(m,i,k) * cholesky_mo_transp(m,j,l)
enddo
accu = dabs(integral_cholesky-integral)
accu_tot += accu
if(accu.gt.1.d-10)then
print*,i,j,k,l
print*,accu, integral, integral_cholesky
endif
enddo
enddo
enddo
enddo
end

View File

@ -6,7 +6,7 @@ BEGIN_PROVIDER [ double precision, cholesky_ao_transp, (cholesky_ao_num, ao_num,
integer :: i,j,k integer :: i,j,k
do j=1,ao_num do j=1,ao_num
do i=1,ao_num do i=1,ao_num
do k=1,ao_num do k=1,cholesky_ao_num
cholesky_ao_transp(k,i,j) = cholesky_ao(i,j,k) cholesky_ao_transp(k,i,j) = cholesky_ao(i,j,k)
enddo enddo
enddo enddo