diff --git a/input/methods b/input/methods index 4b95a37..37e4a5b 100644 --- a/input/methods +++ b/input/methods @@ -13,7 +13,7 @@ # G0F2* evGF2* qsGF2* G0F3 evGF3 F F T F F # G0W0* evGW* qsGW* SRG-qsGW ufG0W0 ufGW - F F F F F F + F F F F F F # G0T0 evGT qsGT F F F # * unrestricted version available diff --git a/input/options b/input/options index 89c45e3..010ddf5 100644 --- a/input/options +++ b/input/options @@ -5,9 +5,9 @@ # CC: maxSCF thresh DIIS n_diis 64 0.0000001 T 5 # spin: TDA singlet triplet spin_conserved spin_flip - F T T T T + T T T T T # GF: maxSCF thresh DIIS n_diis lin eta renorm reg - 256 0.00001 T 5 T 0.0 3 F + 256 0.00001 T 5 T 0.0 0 F # GW: maxSCF thresh DIIS n_diis lin eta COHSEX SOSEX TDA_W reg 256 0.00001 T 5 T 0.01 F F F F # GT: maxSCF thresh DIIS n_diis lin eta TDA_T reg @@ -15,4 +15,4 @@ # ACFDT: AC Kx XBS F T T # BSE: BSE dBSE dTDA evDyn ppBSE BSE2 - F F T F F F + T F T F F F diff --git a/src/GW/BSE2_static_kernel_KB.f90 b/src/GW/BSE2_static_kernel_KB.f90 index cb4abe3..207c079 100644 --- a/src/GW/BSE2_static_kernel_KB.f90 +++ b/src/GW/BSE2_static_kernel_KB.f90 @@ -53,7 +53,7 @@ subroutine BSE2_static_kernel_KB(eta,nBas,nC,nO,nV,nR,nS,lambda,eW,W,KB2_sta) KB2_sta(ia,jb) = KB2_sta(ia,jb) - num*dem/(dem**2 + eta**2) dem = + (eW(c) - eW(k)) - num = 2d0*W(b,c,i,k)*W(a,k,b,c) + num = 2d0*W(b,c,i,k)*W(a,k,j,c) KB2_sta(ia,jb) = KB2_sta(ia,jb) + num*dem/(dem**2 + eta**2) diff --git a/src/utils/wrap_lapack.f90 b/src/utils/wrap_lapack.f90 index 9df820d..7aa870c 100644 --- a/src/utils/wrap_lapack.f90 +++ b/src/utils/wrap_lapack.f90 @@ -19,8 +19,15 @@ subroutine diagonalize_general_matrix(N,A,WR,VR) ! Memory allocation - lwork = 4*N - allocate(WI(N),VL(N,N),work(lwork)) + allocate(work(1),WI(N),VL(N,N)) + + lwork = -1 + call dgeev('V','V',N,A,N,WR,WI,VL,N,VR,N,work,lwork,info) + lwork = int(work(1)) + + deallocate(work) + + allocate(work(lwork)) call dgeev('V','V',N,A,N,WR,WI,VL,N,VR,N,work,lwork,info) @@ -49,8 +56,15 @@ subroutine diagonalize_matrix(N,A,e) ! Memory allocation - allocate(work(3*N)) - lwork = size(work) + allocate(work(1)) + + lwork = -1 + call dsyev('V','U',N,A,N,e,work,lwork,info) + lwork = int(work(1)) + + deallocate(work) + + allocate(work(lwork)) call dsyev('V','U',N,A,N,e,work,lwork,info)