10
1
mirror of https://github.com/pfloos/quack synced 2024-11-03 20:53:53 +01:00

rename AOtoMO and MOtoAO

This commit is contained in:
Pierre-Francois Loos 2023-11-10 17:22:51 +01:00
parent 717138f363
commit 821265a7aa
22 changed files with 114 additions and 86 deletions

View File

@ -1,4 +1,4 @@
subroutine AOtoMO_transform(nBas,c,A,B)
subroutine AOtoMO(nBas,C,A,B)
! Perform AO to MO transformation of a matrix A for given coefficients c
@ -7,13 +7,20 @@ subroutine AOtoMO_transform(nBas,c,A,B)
! Input variables
integer,intent(in) :: nBas
double precision,intent(in) :: c(nBas,nBas)
double precision,intent(in) :: C(nBas,nBas)
double precision,intent(in) :: A(nBas,nBas)
! Local variables
double precision,allocatable :: AC(:,:)
! Output variables
double precision,intent(out) :: B(nBas,nBas)
B = matmul(transpose(c),matmul(A,c))
allocate(AC(nBas,nBas))
AC = matmul(A,C)
B = matmul(transpose(C),AC)
end subroutine

View File

@ -1,4 +1,4 @@
subroutine AOtoMO_integral_transform(bra1,bra2,ket1,ket2,nBas,c,ERI_AO,ERI_MO)
subroutine AOtoMO_ERI(bra1,bra2,ket1,ket2,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) = <bra1 ket1|bra2 ket2>

View File

@ -1,4 +1,4 @@
subroutine AOtoMO_integral_transform_GHF(nBas,nBas2,c1,c2,c3,c4,ERI_AO_basis,ERI_MO_basis)
subroutine AOtoMO_ERI_GHF(nBas,nBas2,c1,c2,c3,c4,ERI_AO_basis,ERI_MO_basis)
! 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)

View File

@ -1,4 +1,4 @@
subroutine AOtoMO_transform_GHF(nBas,nBas2,Ca,Cb,A,B)
subroutine AOtoMO_GHF(nBas,nBas2,Ca,Cb,A,B)
! Perform AO to MO transformation of a matrix A for given coefficients c
@ -12,11 +12,20 @@ subroutine AOtoMO_transform_GHF(nBas,nBas2,Ca,Cb,A,B)
double precision,intent(in) :: Cb(nBas,nBas2)
double precision,intent(in) :: A(nBas,nBas)
! Local variables
double precision,allocatable :: AC(:,:)
! Output variables
double precision,intent(out) :: B(nBas2,nBas2)
B = matmul(transpose(Ca),matmul(A,Ca)) &
+ matmul(transpose(Cb),matmul(A,Cb))
allocate(AC(nBas,nBas2))
AC = matmul(A,Ca)
B = matmul(transpose(Ca),AC)
AC = matmul(A,Cb)
B = B + matmul(transpose(Cb),AC)
end subroutine

View File

@ -1,4 +1,4 @@
subroutine MOtoAO_transform(nBas,S,c,B,A)
subroutine MOtoAO(nBas,S,C,B,A)
! Perform MO to AO transformation of a matrix A for a given metric S
! and coefficients c
@ -9,12 +9,12 @@ subroutine MOtoAO_transform(nBas,S,c,B,A)
integer,intent(in) :: nBas
double precision,intent(in) :: S(nBas,nBas)
double precision,intent(in) :: c(nBas,nBas)
double precision,intent(in) :: C(nBas,nBas)
double precision,intent(in) :: B(nBas,nBas)
! Local variables
double precision,allocatable :: Sc(:,:)
double precision,allocatable :: SC(:,:),BSC(:,:)
! Output variables
@ -22,9 +22,10 @@ subroutine MOtoAO_transform(nBas,S,c,B,A)
! Memory allocation
allocate(Sc(nBas,nBas))
allocate(SC(nBas,nBas),BSC(nBas,nBas))
Sc = matmul(S,c)
A = matmul(Sc,matmul(B,transpose(Sc)))
SC = matmul(S,C)
BSC = matmul(B,transpose(SC))
A = matmul(SC,BSC)
end subroutine

View File

@ -1,4 +1,4 @@
subroutine MOtoAO_transform_GHF(nBas2,nBas,S,Ca,Cb,B,A)
subroutine MOtoAO_GHF(nBas2,nBas,S,Ca,Cb,B,A)
! Perform MO to AO transformation of a matrix A for a given metric S
! and coefficients c
@ -16,7 +16,8 @@ subroutine MOtoAO_transform_GHF(nBas2,nBas,S,Ca,Cb,B,A)
! Local variables
double precision,allocatable :: Sc(:,:)
double precision,allocatable :: SC(:,:)
double precision,allocatable :: BSC(:,:)
! Output variables
@ -24,12 +25,14 @@ subroutine MOtoAO_transform_GHF(nBas2,nBas,S,Ca,Cb,B,A)
! Memory allocation
allocate(Sc(nBas,nBas2))
allocate(SC(nBas,nBas2),BSC(nBas2,nBas))
Sc = matmul(S,Ca)
A = matmul(Sc,matmul(B,transpose(Sc)))
SC = matmul(S,Ca)
BSC = matmul(B,transpose(SC))
A = matmul(SC,BSC)
Sc = matmul(S,Cb)
A = A + matmul(Sc,matmul(B,transpose(Sc)))
SC = matmul(S,Cb)
BSC = matmul(B,transpose(SC))
A = A + matmul(SC,BSc)
end subroutine

View File

@ -140,7 +140,7 @@ subroutine qsGF2(maxSCF,thresh,max_diis,dophBSE,doppBSE,TDA,dBSE,dTDA,singlet,tr
! AO to MO transformation of two-electron integrals
call AOtoMO_integral_transform(1,1,1,1,nBas,c,ERI_AO,ERI_MO)
call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_MO)
! Compute self-energy and renormalization factor
@ -158,7 +158,7 @@ subroutine qsGF2(maxSCF,thresh,max_diis,dophBSE,doppBSE,TDA,dBSE,dTDA,singlet,tr
SigC = 0.5d0*(SigC + transpose(SigC))
call MOtoAO_transform(nBas,S,c,SigC,SigCp)
call MOtoAO(nBas,S,c,SigC,SigCp)
! Solve the quasi-particle equation

View File

@ -163,15 +163,15 @@ subroutine qsUGF2(maxSCF,thresh,max_diis,BSE,TDA,dBSE,dTDA,spin_conserved,spin_f
! 4-index transform for (aa|aa) block
call AOtoMO_integral_transform(1,1,1,1,nBas,c,ERI_AO,ERI_aaaa)
call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_aaaa)
! 4-index transform for (aa|bb) block
call AOtoMO_integral_transform(1,1,2,2,nBas,c,ERI_AO,ERI_aabb)
call AOtoMO_ERI(1,1,2,2,nBas,c,ERI_AO,ERI_aabb)
! 4-index transform for (bb|bb) block
call AOtoMO_integral_transform(2,2,2,2,nBas,c,ERI_AO,ERI_bbbb)
call AOtoMO_ERI(2,2,2,2,nBas,c,ERI_AO,ERI_bbbb)
!------------------------------------------------!
! Compute self-energy and renormalization factor !
@ -194,7 +194,7 @@ subroutine qsUGF2(maxSCF,thresh,max_diis,BSE,TDA,dBSE,dTDA,spin_conserved,spin_f
end do
do is=1,nspin
call MOtoAO_transform(nBas,S,c(:,:,is),SigC(:,:,is),SigCp(:,:,is))
call MOtoAO(nBas,S,c(:,:,is),SigC(:,:,is),SigCp(:,:,is))
end do
! Solve the quasi-particle equation

View File

@ -167,7 +167,7 @@ subroutine qsGTeh(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dophBSE,d
! AO to MO transformation of two-electron integrals
call AOtoMO_integral_transform(1,1,1,1,nBas,c,ERI_AO,ERI_MO)
call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_MO)
! Compute linear response
@ -190,7 +190,7 @@ subroutine qsGTeh(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dophBSE,d
Sig = 0.5d0*(Sig + transpose(Sig))
call MOtoAO_transform(nBas,S,c,Sig,Sigp)
call MOtoAO(nBas,S,c,Sig,Sigp)
! Solve the quasi-particle equation

View File

@ -181,7 +181,7 @@ subroutine qsGTpp(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dophBSE,T
! AO to MO transformation of two-electron integrals
call AOtoMO_integral_transform(1,1,1,1,nBas,c,ERI_AO,ERI_MO)
call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_MO)
! Compute linear response
@ -234,7 +234,7 @@ subroutine qsGTpp(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dophBSE,T
Sig = 0.5d0*(Sig + transpose(Sig))
call MOtoAO_transform(nBas,S,c,Sig,Sigp)
call MOtoAO(nBas,S,c,Sig,Sigp)
! Solve the quasi-particle equation

View File

@ -187,15 +187,15 @@ subroutine qsUGTpp(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,BSE, &
! 4-index transform for (aa|aa) block
call AOtoMO_integral_transform(1,1,1,1,nBas,c,ERI_AO,ERI_aaaa)
call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_aaaa)
! 4-index transform for (aa|bb) block
call AOtoMO_integral_transform(1,1,2,2,nBas,c,ERI_AO,ERI_aabb)
call AOtoMO_ERI(1,1,2,2,nBas,c,ERI_AO,ERI_aabb)
! 4-index transform for (bb|bb) block
call AOtoMO_integral_transform(2,2,2,2,nBas,c,ERI_AO,ERI_bbbb)
call AOtoMO_ERI(2,2,2,2,nBas,c,ERI_AO,ERI_bbbb)
!----------------------------------------------
! alpha-beta block
@ -277,7 +277,7 @@ subroutine qsUGTpp(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,BSE, &
end do
do ispin=1,nspin
call MOtoAO_transform(nBas,S,c(:,:,ispin),SigT(:,:,ispin),SigTp(:,:,ispin))
call MOtoAO(nBas,S,c(:,:,ispin),SigT(:,:,ispin),SigTp(:,:,ispin))
end do
! Solve the quasi-particle equation

View File

@ -171,10 +171,10 @@ subroutine SRG_qsGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,BSE,BSE
call wall_time(tao1)
do ixyz=1,ncart
call AOtoMO_transform(nBas,cHF,dipole_int_AO(:,:,ixyz),dipole_int_MO(:,:,ixyz))
call AOtoMO(nBas,cHF,dipole_int_AO(:,:,ixyz),dipole_int_MO(:,:,ixyz))
end do
call AOtoMO_integral_transform(1,1,1,1,nBas,c,ERI_AO,ERI_MO)
call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_MO)
call wall_time(tao2)
@ -214,7 +214,7 @@ subroutine SRG_qsGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,BSE,BSE
! Make correlation self-energy Hermitian and transform it back to AO basis
call wall_time(tmo1)
call MOtoAO_transform(nBas,S,c,SigC,SigCp)
call MOtoAO(nBas,S,c,SigC,SigCp)
call wall_time(tmo2)
tmo = tmo + tmo2 - tmo1
! Solve the quasi-particle equation
@ -241,7 +241,7 @@ subroutine SRG_qsGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,BSE,BSE
call diagonalize_matrix(nBas,cp,eGW)
c = matmul(X,cp)
call AOtoMO_transform(nBas,c,SigCp,SigC)
call AOtoMO(nBas,c,SigCp,SigC)
! Compute new density matrix in the AO basis

View File

@ -232,19 +232,19 @@ subroutine qsGGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dophBSE,do
Cb(:,:) = C(nBas+1:nBas2,1:nBas2)
do ixyz=1,ncart
call AOtoMO_transform_GHF(nBas,nBas2,Ca,Cb,dipole_int_AO(:,:,ixyz),dipole_int_MO(:,:,ixyz))
call AOtoMO_GHF(nBas,nBas2,Ca,Cb,dipole_int_AO(:,:,ixyz),dipole_int_MO(:,:,ixyz))
end do
call AOtoMO_integral_transform_GHF(nBas,nBas2,Ca,Ca,Ca,Ca,ERI_AO,ERI_tmp)
call AOtoMO_ERI_GHF(nBas,nBas2,Ca,Ca,Ca,Ca,ERI_AO,ERI_tmp)
ERI_MO(:,:,:,:) = ERI_tmp(:,:,:,:)
call AOtoMO_integral_transform_GHF(nBas,nBas2,Ca,Cb,Ca,Cb,ERI_AO,ERI_tmp)
call AOtoMO_ERI_GHF(nBas,nBas2,Ca,Cb,Ca,Cb,ERI_AO,ERI_tmp)
ERI_MO(:,:,:,:) = ERI_MO(:,:,:,:) + ERI_tmp(:,:,:,:)
call AOtoMO_integral_transform_GHF(nBas,nBas2,Cb,Ca,Cb,Ca,ERI_AO,ERI_tmp)
call AOtoMO_ERI_GHF(nBas,nBas2,Cb,Ca,Cb,Ca,ERI_AO,ERI_tmp)
ERI_MO(:,:,:,:) = ERI_MO(:,:,:,:) + ERI_tmp(:,:,:,:)
call AOtoMO_integral_transform_GHF(nBas,nBas2,Cb,Cb,Cb,Cb,ERI_AO,ERI_tmp)
call AOtoMO_ERI_GHF(nBas,nBas2,Cb,Cb,Cb,Cb,ERI_AO,ERI_tmp)
ERI_MO(:,:,:,:) = ERI_MO(:,:,:,:) + ERI_tmp(:,:,:,:)
deallocate(ERI_tmp)
@ -269,7 +269,7 @@ subroutine qsGGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dophBSE,do
SigC = 0.5d0*(SigC + transpose(SigC))
call MOtoAO_transform_GHF(nBas2,nBas,S,Ca,Cb,SigC,SigCp)
call MOtoAO_GHF(nBas2,nBas,S,Ca,Cb,SigC,SigCp)
! ... and add self-energy
@ -301,7 +301,7 @@ subroutine qsGGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dophBSE,do
C(:,:) = matmul(X,Cp)
call AOtoMO_transform_GHF(nBas,nBas2,Ca,Cb,SigCp,SigC)
call AOtoMO_GHF(nBas,nBas2,Ca,Cb,SigCp,SigC)
! Form super density matrix

View File

@ -167,10 +167,10 @@ subroutine qsRGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dophBSE,do
! AO to MO transformation of two-electron integrals
do ixyz=1,ncart
call AOtoMO_transform(nBas,c,dipole_int_AO(:,:,ixyz),dipole_int_MO(:,:,ixyz))
call AOtoMO(nBas,c,dipole_int_AO(:,:,ixyz),dipole_int_MO(:,:,ixyz))
end do
call AOtoMO_integral_transform(1,1,1,1,nBas,c,ERI_AO,ERI_MO)
call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_MO)
! Compute linear response
@ -192,7 +192,7 @@ subroutine qsRGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dophBSE,do
SigC = 0.5d0*(SigC + transpose(SigC))
call MOtoAO_transform(nBas,S,c,SigC,SigCp)
call MOtoAO(nBas,S,c,SigC,SigCp)
! Solve the quasi-particle equation
@ -217,7 +217,7 @@ subroutine qsRGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,dophBSE,do
cp(:,:) = Fp(:,:)
call diagonalize_matrix(nBas,cp,eGW)
c = matmul(X,cp)
call AOtoMO_transform(nBas,c,SigCp,SigC)
call AOtoMO(nBas,c,SigCp,SigC)
! Compute new density matrix in the AO basis

View File

@ -183,21 +183,21 @@ subroutine qsUGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,BSE,TDA_W,
!--------------------------------------------------
do ixyz=1,ncart
call AOtoMO_transform(nBas,c(:,:,1),dipole_int_AO(:,:,ixyz),dipole_int_aa(:,:,ixyz))
call AOtoMO_transform(nBas,c(:,:,2),dipole_int_AO(:,:,ixyz),dipole_int_bb(:,:,ixyz))
call AOtoMO(nBas,c(:,:,1),dipole_int_AO(:,:,ixyz),dipole_int_aa(:,:,ixyz))
call AOtoMO(nBas,c(:,:,2),dipole_int_AO(:,:,ixyz),dipole_int_bb(:,:,ixyz))
end do
! 4-index transform for (aa|aa) block
call AOtoMO_integral_transform(1,1,1,1,nBas,c,ERI_AO,ERI_aaaa)
call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_aaaa)
! 4-index transform for (aa|bb) block
call AOtoMO_integral_transform(1,1,2,2,nBas,c,ERI_AO,ERI_aabb)
call AOtoMO_ERI(1,1,2,2,nBas,c,ERI_AO,ERI_aabb)
! 4-index transform for (bb|bb) block
call AOtoMO_integral_transform(2,2,2,2,nBas,c,ERI_AO,ERI_bbbb)
call AOtoMO_ERI(2,2,2,2,nBas,c,ERI_AO,ERI_bbbb)
! Compute linear response
@ -231,7 +231,7 @@ subroutine qsUGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,BSE,TDA_W,
end do
do is=1,nspin
call MOtoAO_transform(nBas,S,c(:,:,is),SigC(:,:,is),SigCp(:,:,is))
call MOtoAO(nBas,S,c(:,:,is),SigC(:,:,is),SigCp(:,:,is))
end do
! Solve the quasi-particle equation
@ -282,7 +282,7 @@ subroutine qsUGW(maxSCF,thresh,max_diis,doACFDT,exchange_kernel,doXBS,BSE,TDA_W,
! Back-transform self-energy
do is=1,nspin
call AOtoMO_transform(nBas,c(:,:,is),SigCp(:,:,is),SigC(:,:,is))
call AOtoMO(nBas,c(:,:,is),SigCp(:,:,is),SigC(:,:,is))
end do
! Compute density matrix

View File

@ -122,16 +122,16 @@ subroutine GHF_search(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNu
! 4-index transform
call AOtoMO_integral_transform_GHF(nBas,nBas2,Ca,Ca,Ca,Ca,ERI_AO,ERI_tmp)
call AOtoMO_ERI_GHF(nBas,nBas2,Ca,Ca,Ca,Ca,ERI_AO,ERI_tmp)
ERI_MO(:,:,:,:) = ERI_tmp(:,:,:,:)
call AOtoMO_integral_transform_GHF(nBas,nBas2,Ca,Cb,Ca,Cb,ERI_AO,ERI_tmp)
call AOtoMO_ERI_GHF(nBas,nBas2,Ca,Cb,Ca,Cb,ERI_AO,ERI_tmp)
ERI_MO(:,:,:,:) = ERI_MO(:,:,:,:) + ERI_tmp(:,:,:,:)
call AOtoMO_integral_transform_GHF(nBas,nBas2,Cb,Ca,Cb,Ca,ERI_AO,ERI_tmp)
call AOtoMO_ERI_GHF(nBas,nBas2,Cb,Ca,Cb,Ca,ERI_AO,ERI_tmp)
ERI_MO(:,:,:,:) = ERI_MO(:,:,:,:) + ERI_tmp(:,:,:,:)
call AOtoMO_integral_transform_GHF(nBas,nBas2,Cb,Cb,Cb,Cb,ERI_AO,ERI_tmp)
call AOtoMO_ERI_GHF(nBas,nBas2,Cb,Cb,Cb,Cb,ERI_AO,ERI_tmp)
ERI_MO(:,:,:,:) = ERI_MO(:,:,:,:) + ERI_tmp(:,:,:,:)
deallocate(Ca,Cb,ERI_tmp)

View File

@ -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_integral_transform(1,1,1,1,nBas,c,ERI_AO,ERI_MO)
call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_MO)
call wall_time(end_AOtoMO)
t_AOtoMO = end_AOtoMO - start_AOtoMO

View File

@ -1,4 +1,4 @@
subroutine ROHF_fock_matrix(nBas,nOa,nOb,S,c,Fa,Fb,F)
subroutine ROHF_fock_matrix(nBas,nOa,nOb,S,c,FaAO,FbAO,FAO)
! Construct the ROHF Fock matrix in the AO basis
! For open shells, the ROHF Fock matrix in the MO basis reads
@ -23,8 +23,8 @@ subroutine ROHF_fock_matrix(nBas,nOa,nOb,S,c,Fa,Fb,F)
double precision,intent(in) :: S(nBas,nBas)
double precision,intent(in) :: c(nBas,nBas)
double precision,intent(inout):: Fa(nBas,nBas)
double precision,intent(inout):: Fb(nBas,nBas)
double precision,intent(inout):: FaAO(nBas,nBas)
double precision,intent(inout):: FbAO(nBas,nBas)
! Local variables
@ -36,9 +36,17 @@ subroutine ROHF_fock_matrix(nBas,nOa,nOb,S,c,Fa,Fb,F)
integer :: nO
integer :: nV
double precision,allocatable :: F(:,:)
double precision,allocatable :: Fa(:,:)
double precision,allocatable :: Fb(:,:)
! Output variables
double precision,intent(out) :: F(nBas,nBas)
double precision,intent(out) :: FAO(nBas,nBas)
! Memory allocation
allocate(F(nBas,nBas),Fa(nBas,nBas),Fb(nBas,nBas))
! Roothan canonicalization parameters
@ -59,8 +67,8 @@ subroutine ROHF_fock_matrix(nBas,nOa,nOb,S,c,Fa,Fb,F)
! Block-by-block Fock matrix
Fa = matmul(transpose(c),matmul(Fa,c))
Fb = matmul(transpose(c),matmul(Fb,c))
call AOtoMO(nBas,c,FaAO,Fa)
call AOtoMO(nBas,c,FbAO,Fb)
F(1:nC, 1:nC ) = aC*Fa(1:nC, 1:nC ) + bC*Fb(1:nC, 1:nC )
F(1:nC, nC+1:nC+nO ) = Fb(1:nC, nC+1:nC+nO )
@ -74,8 +82,8 @@ subroutine ROHF_fock_matrix(nBas,nOa,nOb,S,c,Fa,Fb,F)
F(nO+nC+1:nC+nO+nV, nC+1:nC+nO ) = Fa(nO+nC+1:nC+nO+nV, nC+1:nC+nO )
F(nO+nC+1:nC+nO+nV,nO+nC+1:nC+nO+nV) = aV*Fa(nO+nC+1:nC+nO+nV,nO+nC+1:nC+nO+nV) + bV*Fb(nO+nC+1:nC+nO+nV,nO+nC+1:nC+nO+nV)
call MOtoAO_transform(nBas,S,c,F,F)
call MOtoAO_transform(nBas,S,c,Fa,Fa)
call MOtoAO_transform(nBas,S,c,Fb,Fb)
call MOtoAO(nBas,S,c,F,FAO)
call MOtoAO(nBas,S,c,Fa,FaAO)
call MOtoAO(nBas,S,c,Fb,FbAO)
end subroutine

View File

@ -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_integral_transform(1,1,1,1,nBas,c,ERI_AO,ERI_aaaa)
call AOtoMO_ERI(1,1,1,1,nBas,c,ERI_AO,ERI_aaaa)
! 4-index transform for (aa|bb) block
call AOtoMO_integral_transform(1,1,2,2,nBas,c,ERI_AO,ERI_aabb)
call AOtoMO_ERI(1,1,2,2,nBas,c,ERI_AO,ERI_aabb)
! 4-index transform for (bb|bb) block
call AOtoMO_integral_transform(2,2,2,2,nBas,c,ERI_AO,ERI_bbbb)
call AOtoMO_ERI(2,2,2,2,nBas,c,ERI_AO,ERI_bbbb)
call wall_time(end_AOtoMO)

View File

@ -129,21 +129,21 @@ subroutine GQuAcK(doGHF,dostab,dosearch,doMP2,doMP3,dophRPA,dophRPAx,doppRPA,
! Transform dipole-related integrals
do ixyz=1,ncart
call AOtoMO_transform_GHF(nBas,nBas2,Ca,Cb,dipole_int_AO(:,:,ixyz),dipole_int_MO(:,:,ixyz))
call AOtoMO_GHF(nBas,nBas2,Ca,Cb,dipole_int_AO(:,:,ixyz),dipole_int_MO(:,:,ixyz))
end do
! 4-index transform
call AOtoMO_integral_transform_GHF(nBas,nBas2,Ca,Ca,Ca,Ca,ERI_AO,ERI_tmp)
call AOtoMO_ERI_GHF(nBas,nBas2,Ca,Ca,Ca,Ca,ERI_AO,ERI_tmp)
ERI_MO(:,:,:,:) = ERI_tmp(:,:,:,:)
call AOtoMO_integral_transform_GHF(nBas,nBas2,Ca,Cb,Ca,Cb,ERI_AO,ERI_tmp)
call AOtoMO_ERI_GHF(nBas,nBas2,Ca,Cb,Ca,Cb,ERI_AO,ERI_tmp)
ERI_MO(:,:,:,:) = ERI_MO(:,:,:,:) + ERI_tmp(:,:,:,:)
call AOtoMO_integral_transform_GHF(nBas,nBas2,Cb,Ca,Cb,Ca,ERI_AO,ERI_tmp)
call AOtoMO_ERI_GHF(nBas,nBas2,Cb,Ca,Cb,Ca,ERI_AO,ERI_tmp)
ERI_MO(:,:,:,:) = ERI_MO(:,:,:,:) + ERI_tmp(:,:,:,:)
call AOtoMO_integral_transform_GHF(nBas,nBas2,Cb,Cb,Cb,Cb,ERI_AO,ERI_tmp)
call AOtoMO_ERI_GHF(nBas,nBas2,Cb,Cb,Cb,Cb,ERI_AO,ERI_tmp)
ERI_MO(:,:,:,:) = ERI_MO(:,:,:,:) + ERI_tmp(:,:,:,:)
deallocate(Ca,Cb,ERI_tmp)

View File

@ -151,12 +151,12 @@ subroutine RQuAcK(doRHF,doROHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,do
! Read and transform dipole-related integrals
do ixyz=1,ncart
call AOtoMO_transform(nBas,cHF,dipole_int_AO(:,:,ixyz),dipole_int_MO(:,:,ixyz))
call AOtoMO(nBas,cHF,dipole_int_AO(:,:,ixyz),dipole_int_MO(:,:,ixyz))
end do
! 4-index transform
call AOtoMO_integral_transform(1,1,1,1,nBas,cHF,ERI_AO,ERI_MO)
call AOtoMO_ERI(1,1,1,1,nBas,cHF,ERI_AO,ERI_MO)
call wall_time(end_AOtoMO)

View File

@ -158,21 +158,21 @@ subroutine UQuAcK(doUHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,doCCSD,do
! Read and transform dipole-related integrals
do ixyz=1,ncart
call AOtoMO_transform(nBas,cHF(:,:,1),dipole_int_AO(:,:,ixyz),dipole_int_aa(:,:,ixyz))
call AOtoMO_transform(nBas,cHF(:,:,2),dipole_int_AO(:,:,ixyz),dipole_int_bb(:,:,ixyz))
call AOtoMO(nBas,cHF(:,:,1),dipole_int_AO(:,:,ixyz),dipole_int_aa(:,:,ixyz))
call AOtoMO(nBas,cHF(:,:,2),dipole_int_AO(:,:,ixyz),dipole_int_bb(:,:,ixyz))
end do
! 4-index transform for (aa|aa) block
call AOtoMO_integral_transform(1,1,1,1,nBas,cHF,ERI_AO,ERI_aaaa)
call AOtoMO_ERI(1,1,1,1,nBas,cHF,ERI_AO,ERI_aaaa)
! 4-index transform for (aa|bb) block
call AOtoMO_integral_transform(1,1,2,2,nBas,cHF,ERI_AO,ERI_aabb)
call AOtoMO_ERI(1,1,2,2,nBas,cHF,ERI_AO,ERI_aabb)
! 4-index transform for (bb|bb) block
call AOtoMO_integral_transform(2,2,2,2,nBas,cHF,ERI_AO,ERI_bbbb)
call AOtoMO_ERI(2,2,2,2,nBas,cHF,ERI_AO,ERI_bbbb)
call wall_time(end_AOtoMO)