mirror of
https://github.com/pfloos/quack
synced 2025-01-03 18:16:03 +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
|
! Solve the quasi-particle equation
|
||||||
|
|
||||||
F(:,:) = Hc(:,:) + J(:,:) + 0.5d0*K(:,:) + SigCp(:,:)
|
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
|
! Compute commutator and convergence criteria
|
||||||
|
|
||||||
@ -204,10 +208,18 @@ subroutine qsRGF2(dotest, maxSCF, thresh, max_diis, dophBSE, doppBSE, TDA, &
|
|||||||
|
|
||||||
! Diagonalize Hamiltonian in AO basis
|
! Diagonalize Hamiltonian in AO basis
|
||||||
|
|
||||||
Fp = matmul(transpose(X), matmul(F, X))
|
if(nBas .eq. nOrb) then
|
||||||
cp(:,:) = Fp(:,:)
|
Fp = matmul(transpose(X), matmul(F, X))
|
||||||
call diagonalize_matrix(nOrb, cp, eGF)
|
cp(:,:) = Fp(:,:)
|
||||||
c = matmul(X, cp)
|
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
|
! 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
|
! Solve the quasi-particle equation
|
||||||
|
|
||||||
F(:,:) = Hc(:,:) + J(:,:) + 0.5d0*K(:,:) + Sigp(:,:)
|
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
|
! 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
|
! Diagonalize Hamiltonian in AO basis
|
||||||
|
|
||||||
Fp = matmul(transpose(X),matmul(F,X))
|
if(nBas .eq. nOrb) then
|
||||||
cp(:,:) = Fp(:,:)
|
Fp = matmul(transpose(X), matmul(F, X))
|
||||||
call diagonalize_matrix(nOrb, cp, eGT)
|
cp(:,:) = Fp(:,:)
|
||||||
c = matmul(X,cp)
|
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
|
! 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
|
! Solve the quasi-particle equation
|
||||||
|
|
||||||
F(:,:) = Hc(:,:) + J(:,:) + 0.5d0*K(:,:) + Sigp(:,:)
|
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
|
! 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
|
! Diagonalize Hamiltonian in AO basis
|
||||||
|
|
||||||
Fp = matmul(transpose(X), matmul(F, X))
|
if(nBas .eq. nOrb) then
|
||||||
cp(:,:) = Fp(:,:)
|
Fp = matmul(transpose(X), matmul(F, X))
|
||||||
call diagonalize_matrix(nOrb, cp, eGT)
|
cp(:,:) = Fp(:,:)
|
||||||
c = matmul(X, cp)
|
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
|
! 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
|
! Solve the quasi-particle equation
|
||||||
|
|
||||||
F(:,:) = Hc(:,:) + J(:,:) + 0.5d0*K(:,:) + SigCp(:,:)
|
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
|
! 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))
|
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
|
! Diagonalize Hamiltonian in AO basis
|
||||||
|
|
||||||
Fp = matmul(transpose(X), matmul(F, X))
|
if(nBas .eq. nOrb) then
|
||||||
cp(:,:) = Fp(:,:)
|
Fp = matmul(transpose(X), matmul(F, X))
|
||||||
call diagonalize_matrix(nOrb, cp, eGW)
|
cp(:,:) = Fp(:,:)
|
||||||
c = matmul(X, cp)
|
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)
|
call AOtoMO(nBas, nOrb, c, SigCp, SigC)
|
||||||
|
|
||||||
! Density matrix
|
! Density matrix
|
||||||
|
Loading…
Reference in New Issue
Block a user