mirror of
https://github.com/pfloos/quack
synced 2024-12-22 12:23:50 +01:00
udapted qsRGF2, qsRGTeh, qsRGTpp and qsRGW pour nOrb
This commit is contained in:
parent
4d8adcd6a2
commit
9d2a6eee0b
@ -188,6 +188,10 @@ subroutine qsRGF2(dotest, maxSCF, thresh, max_diis, dophBSE, doppBSE, TDA, &
|
||||
! Solve the quasi-particle equation
|
||||
|
||||
F(:,:) = Hc(:,:) + J(:,:) + 0.5d0*K(:,:) + SigCp(:,:)
|
||||
if(nBas .ne. nOrb) then
|
||||
call AOtoMO(nBas, nOrb, c(1,1), F(1,1), Fp(1,1))
|
||||
call MOtoAO(nBas, nOrb, S(1,1), c(1,1), Fp(1,1), F(1,1))
|
||||
endif
|
||||
|
||||
! Compute commutator and convergence criteria
|
||||
|
||||
@ -204,10 +208,18 @@ subroutine qsRGF2(dotest, maxSCF, thresh, max_diis, dophBSE, doppBSE, TDA, &
|
||||
|
||||
! Diagonalize Hamiltonian in AO basis
|
||||
|
||||
if(nBas .eq. nOrb) then
|
||||
Fp = matmul(transpose(X), matmul(F, X))
|
||||
cp(:,:) = Fp(:,:)
|
||||
call diagonalize_matrix(nOrb, cp, eGF)
|
||||
c = matmul(X, cp)
|
||||
else
|
||||
Fp = matmul(transpose(c), matmul(F, c))
|
||||
cp(:,:) = Fp(:,:)
|
||||
call diagonalize_matrix(nOrb, cp, eGF)
|
||||
c = matmul(c, cp)
|
||||
endif
|
||||
|
||||
|
||||
! Compute new density matrix in the AO basis
|
||||
|
||||
|
@ -221,6 +221,10 @@ subroutine qsRGTeh(dotest, maxSCF, thresh, max_diis, doACFDT, exchange_kernel, d
|
||||
! Solve the quasi-particle equation
|
||||
|
||||
F(:,:) = Hc(:,:) + J(:,:) + 0.5d0*K(:,:) + Sigp(:,:)
|
||||
if(nBas .ne. nOrb) then
|
||||
call AOtoMO(nBas, nOrb, c(1,1), F(1,1), Fp(1,1))
|
||||
call MOtoAO(nBas, nOrb, S(1,1), c(1,1), Fp(1,1), F(1,1))
|
||||
endif
|
||||
|
||||
! Compute commutator and convergence criteria
|
||||
|
||||
@ -237,10 +241,17 @@ subroutine qsRGTeh(dotest, maxSCF, thresh, max_diis, doACFDT, exchange_kernel, d
|
||||
|
||||
! Diagonalize Hamiltonian in AO basis
|
||||
|
||||
Fp = matmul(transpose(X),matmul(F,X))
|
||||
if(nBas .eq. nOrb) then
|
||||
Fp = matmul(transpose(X), matmul(F, X))
|
||||
cp(:,:) = Fp(:,:)
|
||||
call diagonalize_matrix(nOrb, cp, eGT)
|
||||
c = matmul(X,cp)
|
||||
c = matmul(X, cp)
|
||||
else
|
||||
Fp = matmul(transpose(c), matmul(F, c))
|
||||
cp(:,:) = Fp(:,:)
|
||||
call diagonalize_matrix(nOrb, cp, eGT)
|
||||
c = matmul(c, cp)
|
||||
endif
|
||||
|
||||
! Compute new density matrix in the AO basis
|
||||
|
||||
|
@ -258,6 +258,10 @@ subroutine qsRGTpp(dotest, maxSCF, thresh, max_diis, doACFDT, exchange_kernel, d
|
||||
! Solve the quasi-particle equation
|
||||
|
||||
F(:,:) = Hc(:,:) + J(:,:) + 0.5d0*K(:,:) + Sigp(:,:)
|
||||
if(nBas .ne. nOrb) then
|
||||
call AOtoMO(nBas, nOrb, c(1,1), F(1,1), Fp(1,1))
|
||||
call MOtoAO(nBas, nOrb, S(1,1), c(1,1), Fp(1,1), F(1,1))
|
||||
endif
|
||||
|
||||
! Compute commutator and convergence criteria
|
||||
|
||||
@ -274,10 +278,17 @@ subroutine qsRGTpp(dotest, maxSCF, thresh, max_diis, doACFDT, exchange_kernel, d
|
||||
|
||||
! Diagonalize Hamiltonian in AO basis
|
||||
|
||||
if(nBas .eq. nOrb) then
|
||||
Fp = matmul(transpose(X), matmul(F, X))
|
||||
cp(:,:) = Fp(:,:)
|
||||
call diagonalize_matrix(nOrb, cp, eGT)
|
||||
c = matmul(X, cp)
|
||||
else
|
||||
Fp = matmul(transpose(c), matmul(F, c))
|
||||
cp(:,:) = Fp(:,:)
|
||||
call diagonalize_matrix(nOrb, cp, eGT)
|
||||
c = matmul(c, cp)
|
||||
endif
|
||||
|
||||
! Compute new density matrix in the AO basis
|
||||
|
||||
|
@ -221,10 +221,14 @@ subroutine qsRGW(dotest, maxSCF, thresh, max_diis, doACFDT, exchange_kernel, doX
|
||||
! Solve the quasi-particle equation
|
||||
|
||||
F(:,:) = Hc(:,:) + J(:,:) + 0.5d0*K(:,:) + SigCp(:,:)
|
||||
if(nBas .ne. nOrb) then
|
||||
call AOtoMO(nBas, nOrb, c(1,1), F(1,1), Fp(1,1))
|
||||
call MOtoAO(nBas, nOrb, S(1,1), c(1,1), Fp(1,1), F(1,1))
|
||||
endif
|
||||
|
||||
! Compute commutator and convergence criteria
|
||||
|
||||
err = matmul(F,matmul(P,S)) - matmul(matmul(S,P),F)
|
||||
err = matmul(F, matmul(P, S)) - matmul(matmul(S, P), F)
|
||||
|
||||
if(nSCF > 1) Conv = maxval(abs(err))
|
||||
|
||||
@ -259,10 +263,19 @@ subroutine qsRGW(dotest, maxSCF, thresh, max_diis, doACFDT, exchange_kernel, doX
|
||||
|
||||
! Diagonalize Hamiltonian in AO basis
|
||||
|
||||
if(nBas .eq. nOrb) then
|
||||
Fp = matmul(transpose(X), matmul(F, X))
|
||||
cp(:,:) = Fp(:,:)
|
||||
call diagonalize_matrix(nOrb, cp, eGW)
|
||||
c = matmul(X, cp)
|
||||
else
|
||||
Fp = matmul(transpose(c), matmul(F, c))
|
||||
cp(:,:) = Fp(:,:)
|
||||
call diagonalize_matrix(nOrb, cp, eGW)
|
||||
c = matmul(c, cp)
|
||||
endif
|
||||
|
||||
|
||||
call AOtoMO(nBas, nOrb, c, SigCp, SigC)
|
||||
|
||||
! Density matrix
|
||||
|
Loading…
Reference in New Issue
Block a user