diff --git a/src/AOtoMO/AOtoMO_ERI.f90 b/src/AOtoMO/AOtoMO_ERI.f90 index 6b3ea6c..7c5ceab 100644 --- a/src/AOtoMO/AOtoMO_ERI.f90 +++ b/src/AOtoMO/AOtoMO_ERI.f90 @@ -1,15 +1,15 @@ -subroutine AOtoMO_ERI(bra1,bra2,ket1,ket2,nBas,c,ERI_AO,ERI_MO) +subroutine AOtoMO_ERI(bra,ket,nBas,c,ERI_AO,ERI_MO) ! AO to MO transformation of two-electron integrals via the semi-direct O(N^5) algorithm -! bra and ket are the spin of (bra1 bra2|ket1 ket2) = +! bra and ket are the spin of (bra|ket) = (bra bra|ket ket) = implicit none include 'parameters.h' ! Input variables - integer,intent(in) :: bra1,bra2 - integer,intent(in) :: ket1,ket2 + integer,intent(in) :: bra + integer,intent(in) :: ket integer,intent(in) :: nBas double precision,intent(in) :: ERI_AO(nBas,nBas,nBas,nBas),c(nBas,nBas,nspin) @@ -28,12 +28,12 @@ subroutine AOtoMO_ERI(bra1,bra2,ket1,ket2,nBas,c,ERI_AO,ERI_MO) ! Four-index transform via semi-direct O(N^5) algorithm - call dgemm ('T', 'N', nBas**3, nBas, nBas, 1d0, ERI_AO, nBas, c(1,1,bra2), size(c,1), 0d0, scr, nBas**3) + call dgemm ('T','N',nBas**3,nBas,nBas,1d0,ERI_AO,nBas,c(1,1,bra),size(c,1),0d0,scr,nBas**3) - call dgemm ('T', 'N', nBas**3, nBas, nBas, 1d0, scr, nBas, c(1,1,ket2), size(c,1), 0d0, ERI_MO, nBas**3) + call dgemm ('T','N',nBas**3,nBas,nBas,1d0,scr,nBas,c(1,1,ket),size(c,1),0d0,ERI_MO,nBas**3) - call dgemm ('T', 'N', nBas**3, nBas, nBas, 1d0, ERI_MO, nBas, c(1,1,bra1), size(c,1), 0d0, scr, nBas**3) + call dgemm ('T','N',nBas**3,nBas,nBas,1d0,ERI_MO,nBas,c(1,1,bra),size(c,1),0d0,scr,nBas**3) - call dgemm ('T', 'N', nBas**3, nBas, nBas, 1d0, scr, nBas, c(1,1,ket1), size(c,1), 0d0, ERI_MO, nBas**3) + call dgemm ('T','N',nBas**3,nBas,nBas,1d0,scr,nBas,c(1,1,ket),size(c,1),0d0,ERI_MO,nBas**3) end subroutine diff --git a/src/GF/qsRGF2.f90 b/src/GF/qsRGF2.f90 index a5d2ee8..6858c8c 100644 --- a/src/GF/qsRGF2.f90 +++ b/src/GF/qsRGF2.f90 @@ -143,7 +143,7 @@ subroutine qsRGF2(dotest,maxSCF,thresh,max_diis,dophBSE,doppBSE,TDA,dBSE,dTDA,si ! AO to MO transformation of two-electron integrals - call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_MO) + call AOtoMO_ERI(1,1,nBas,c,ERI_AO,ERI_MO) ! Compute self-energy and renormalization factor diff --git a/src/GF/qsUGF2.f90 b/src/GF/qsUGF2.f90 index a2c56cb..f4988ed 100644 --- a/src/GF/qsUGF2.f90 +++ b/src/GF/qsUGF2.f90 @@ -166,15 +166,15 @@ subroutine qsUGF2(dotest,maxSCF,thresh,max_diis,BSE,TDA,dBSE,dTDA,spin_conserved ! 4-index transform for (aa|aa) block - call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_aaaa) + call AOtoMO_ERI(1,1,nBas,c,ERI_AO,ERI_aaaa) ! 4-index transform for (aa|bb) block - call AOtoMO_ERI(1,1,2,2,nBas,c,ERI_AO,ERI_aabb) + call AOtoMO_ERI(1,2,nBas,c,ERI_AO,ERI_aabb) ! 4-index transform for (bb|bb) block - call AOtoMO_ERI(2,2,2,2,nBas,c,ERI_AO,ERI_bbbb) + call AOtoMO_ERI(2,2,nBas,c,ERI_AO,ERI_bbbb) !------------------------------------------------! ! Compute self-energy and renormalization factor ! diff --git a/src/GT/qsRGTeh.f90 b/src/GT/qsRGTeh.f90 index 5b57f45..d41ad1d 100644 --- a/src/GT/qsRGTeh.f90 +++ b/src/GT/qsRGTeh.f90 @@ -169,7 +169,7 @@ subroutine qsRGTeh(dotest,maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,d ! AO to MO transformation of two-electron integrals - call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_MO) + call AOtoMO_ERI(1,1,nBas,c,ERI_AO,ERI_MO) ! Compute linear response diff --git a/src/GT/qsRGTpp.f90 b/src/GT/qsRGTpp.f90 index 9e84606..941fa63 100644 --- a/src/GT/qsRGTpp.f90 +++ b/src/GT/qsRGTpp.f90 @@ -182,7 +182,7 @@ subroutine qsRGTpp(dotest,maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,d ! AO to MO transformation of two-electron integrals - call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_MO) + call AOtoMO_ERI(1,1,nBas,c,ERI_AO,ERI_MO) ! Compute linear response diff --git a/src/GT/qsUGTpp.f90 b/src/GT/qsUGTpp.f90 index 01ed8cb..ee8fe11 100644 --- a/src/GT/qsUGTpp.f90 +++ b/src/GT/qsUGTpp.f90 @@ -190,15 +190,15 @@ subroutine qsUGTpp(dotest,maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,B ! 4-index transform for (aa|aa) block - call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_aaaa) + call AOtoMO_ERI(1,1,nBas,c,ERI_AO,ERI_aaaa) ! 4-index transform for (aa|bb) block - call AOtoMO_ERI(1,1,2,2,nBas,c,ERI_AO,ERI_aabb) + call AOtoMO_ERI(1,2,nBas,c,ERI_AO,ERI_aabb) ! 4-index transform for (bb|bb) block - call AOtoMO_ERI(2,2,2,2,nBas,c,ERI_AO,ERI_bbbb) + call AOtoMO_ERI(2,2,nBas,c,ERI_AO,ERI_bbbb) !---------------------------------------------- ! alpha-beta block diff --git a/src/GW/SRG_qsGW.f90 b/src/GW/SRG_qsGW.f90 index e0b6167..a4ab5d3 100644 --- a/src/GW/SRG_qsGW.f90 +++ b/src/GW/SRG_qsGW.f90 @@ -176,7 +176,7 @@ subroutine SRG_qsGW(dotest,maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS, call AOtoMO(nBas,cHF,dipole_int_AO(:,:,ixyz),dipole_int_MO(:,:,ixyz)) end do - call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_MO) + call AOtoMO_ERI(1,1,nBas,c,ERI_AO,ERI_MO) call wall_time(tao2) diff --git a/src/GW/qsRGW.f90 b/src/GW/qsRGW.f90 index 9fc39f8..59084d0 100644 --- a/src/GW/qsRGW.f90 +++ b/src/GW/qsRGW.f90 @@ -172,7 +172,7 @@ subroutine qsRGW(dotest,maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dop call AOtoMO(nBas,c,dipole_int_AO(:,:,ixyz),dipole_int_MO(:,:,ixyz)) end do - call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_MO) + call AOtoMO_ERI(1,1,nBas,c,ERI_AO,ERI_MO) ! Compute linear response diff --git a/src/GW/qsUGW.f90 b/src/GW/qsUGW.f90 index 8105ba8..80f11c3 100644 --- a/src/GW/qsUGW.f90 +++ b/src/GW/qsUGW.f90 @@ -191,15 +191,15 @@ subroutine qsUGW(dotest,maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,BSE ! 4-index transform for (aa|aa) block - call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_aaaa) + call AOtoMO_ERI(1,1,nBas,c,ERI_AO,ERI_aaaa) ! 4-index transform for (aa|bb) block - call AOtoMO_ERI(1,1,2,2,nBas,c,ERI_AO,ERI_aabb) + call AOtoMO_ERI(1,2,nBas,c,ERI_AO,ERI_aabb) ! 4-index transform for (bb|bb) block - call AOtoMO_ERI(2,2,2,2,nBas,c,ERI_AO,ERI_bbbb) + call AOtoMO_ERI(2,2,nBas,c,ERI_AO,ERI_bbbb) ! Compute linear response diff --git a/src/HF/RHF_search.f90 b/src/HF/RHF_search.f90 index eb12b94..159852b 100644 --- a/src/HF/RHF_search.f90 +++ b/src/HF/RHF_search.f90 @@ -107,7 +107,7 @@ subroutine RHF_search(maxSCF,thresh,max_diis,guess_type,level_shift,nNuc,ZNuc,rN write(*,*) write(*,*) 'AO to MO transformation... Please be patient' write(*,*) - call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_MO) + call AOtoMO_ERI(1,1,nBas,c,ERI_AO,ERI_MO) call wall_time(end_AOtoMO) t_AOtoMO = end_AOtoMO - start_AOtoMO diff --git a/src/HF/UHF_search.f90 b/src/HF/UHF_search.f90 index ae4de45..97eae91 100644 --- a/src/HF/UHF_search.f90 +++ b/src/HF/UHF_search.f90 @@ -120,13 +120,13 @@ subroutine UHF_search(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNu write(*,*) ! 4-index transform for (aa|aa) block - call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_aaaa) + call AOtoMO_ERI(1,1,nBas,c,ERI_AO,ERI_aaaa) ! 4-index transform for (aa|bb) block - call AOtoMO_ERI(1,1,2,2,nBas,c,ERI_AO,ERI_aabb) + call AOtoMO_ERI(1,2,nBas,c,ERI_AO,ERI_aabb) ! 4-index transform for (bb|bb) block - call AOtoMO_ERI(2,2,2,2,nBas,c,ERI_AO,ERI_bbbb) + call AOtoMO_ERI(2,2,nBas,c,ERI_AO,ERI_bbbb) call wall_time(end_AOtoMO) diff --git a/src/QuAcK/RQuAcK.f90 b/src/QuAcK/RQuAcK.f90 index ff7b629..0a2bb6a 100644 --- a/src/QuAcK/RQuAcK.f90 +++ b/src/QuAcK/RQuAcK.f90 @@ -158,7 +158,7 @@ subroutine RQuAcK(dotest,doRHF,doROHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,d ! 4-index transform - call AOtoMO_ERI(1,1,1,1,nBas,cHF,ERI_AO,ERI_MO) + call AOtoMO_ERI(1,1,nBas,cHF,ERI_AO,ERI_MO) call wall_time(end_AOtoMO) diff --git a/src/QuAcK/UQuAcK.f90 b/src/QuAcK/UQuAcK.f90 index f7cc46f..99c0681 100644 --- a/src/QuAcK/UQuAcK.f90 +++ b/src/QuAcK/UQuAcK.f90 @@ -167,15 +167,15 @@ subroutine UQuAcK(dotest,doUHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,do ! 4-index transform for (aa|aa) block - call AOtoMO_ERI(1,1,1,1,nBas,cHF,ERI_AO,ERI_aaaa) + call AOtoMO_ERI(1,1,nBas,cHF,ERI_AO,ERI_aaaa) ! 4-index transform for (aa|bb) block - call AOtoMO_ERI(1,1,2,2,nBas,cHF,ERI_AO,ERI_aabb) + call AOtoMO_ERI(1,2,nBas,cHF,ERI_AO,ERI_aabb) ! 4-index transform for (bb|bb) block - call AOtoMO_ERI(2,2,2,2,nBas,cHF,ERI_AO,ERI_bbbb) + call AOtoMO_ERI(2,2,nBas,cHF,ERI_AO,ERI_bbbb) call wall_time(end_AOtoMO)