4
1
mirror of https://github.com/pfloos/quack synced 2024-06-19 11:42:20 +02:00

fix bug in URPA

This commit is contained in:
Pierre-Francois Loos 2021-04-01 22:04:23 +02:00
parent 80c77efe47
commit 6d590f237f
6 changed files with 22 additions and 15 deletions

View File

@ -1,5 +1,5 @@
# Restricted or unrestricted KS calculation # Restricted or unrestricted KS calculation
UKS eDFT-UKS
# exchange rung: # exchange rung:
# Hartree = 0: H # Hartree = 0: H
# LDA = 1: S51,CC-S51 # LDA = 1: S51,CC-S51
@ -28,7 +28,7 @@
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
# Ensemble weights: wEns(1),...,wEns(nEns-1) # Ensemble weights: wEns(1),...,wEns(nEns-1)
0.25 0.0 0.1 0.0
# N-centered? # N-centered?
F F
# Parameters for CC weight-dependent exchange functional # Parameters for CC weight-dependent exchange functional

View File

@ -9,9 +9,9 @@
# CIS* CIS(D) CID CISD FCI # CIS* CIS(D) CID CISD FCI
F F F F F F F F F F
# RPA* RPAx* ppRPA # RPA* RPAx* ppRPA
F F F F T F
# G0F2* evGF2* qsGF2* G0F3 evGF3 # G0F2* evGF2* qsGF2* G0F3 evGF3
F F T F F F F F F F
# G0W0* evGW* qsGW* # G0W0* evGW* qsGW*
F F F F F F
# G0T0 evGT qsGT # G0T0 evGT qsGT

View File

@ -1,5 +1,5 @@
# HF: maxSCF thresh DIIS n_diis guess_type ortho_type mix_guess stability # HF: maxSCF thresh DIIS n_diis guess_type ortho_type mix_guess stability
1024 0.0000001 T 5 2 1 T F 1024 0.00001 F 5 1 1 F F
# MP: # MP:
# CC: maxSCF thresh DIIS n_diis # CC: maxSCF thresh DIIS n_diis
@ -11,7 +11,7 @@
# GW/GT: maxSCF thresh DIIS n_diis lin eta COHSEX SOSEX TDA_W G0W GW0 # GW/GT: maxSCF thresh DIIS n_diis lin eta COHSEX SOSEX TDA_W G0W GW0
256 0.0000001 T 5 T 0.0 F F F F F 256 0.0000001 T 5 T 0.0 F F F F F
# ACFDT: AC Kx XBS # ACFDT: AC Kx XBS
F F T F T T
# BSE: BSE dBSE dTDA evDyn # BSE: BSE dBSE dTDA evDyn
F T T F F T T F
# MCMP2: nMC nEq nWalk dt nPrint iSeed doDrift # MCMP2: nMC nEq nWalk dt nPrint iSeed doDrift

View File

@ -1,4 +1,4 @@
2 2
H 0.0 0.0 0.0 H 0.0 0.0 0.0
H 0.0 0.0 1.0 H 0.0 0.0 0.7

View File

@ -146,6 +146,13 @@ subroutine URPA(TDA,doACFDT,exchange_kernel,spin_conserved,spin_flip,eta,nBas,nC
call unrestricted_ACFDT(exchange_kernel,.false.,.true.,.false.,TDA,.false.,spin_conserved,spin_flip,eta, & call unrestricted_ACFDT(exchange_kernel,.false.,.true.,.false.,TDA,.false.,spin_conserved,spin_flip,eta, &
nBas,nC,nO,nV,nR,nS,ERI_aaaa,ERI_aabb,ERI_bbbb,e,e,EcAC) nBas,nC,nO,nV,nR,nS,ERI_aaaa,ERI_aabb,ERI_bbbb,e,e,EcAC)
if(exchange_kernel) then
EcAC(1) = 0.5d0*EcAC(1)
EcAC(2) = 1.5d0*EcAC(2)
end if
write(*,*) write(*,*)
write(*,*)'-------------------------------------------------------------------------------' write(*,*)'-------------------------------------------------------------------------------'
write(*,'(2X,A50,F20.10)') 'AC@URPA correlation energy (spin-conserved) =',EcAC(1) write(*,'(2X,A50,F20.10)') 'AC@URPA correlation energy (spin-conserved) =',EcAC(1)

View File

@ -284,14 +284,14 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,aCC_w1,aCC_w2,nGrid,weig
! DIIS extrapolation ! DIIS extrapolation
n_diis = min(n_diis+1,max_diis) n_diis = min(n_diis+1,max_diis)
do ispin=1,nspin if(minval(rcond(:)) > 1d-7) then
call DIIS_extrapolation(rcond(ispin),nBasSq,nBasSq,n_diis, & do ispin=1,nspin
err_diis(:,:,ispin),F_diis(:,:,ispin),err(:,:,ispin),F(:,:,ispin)) call DIIS_extrapolation(rcond(ispin),nBasSq,nBasSq,n_diis, &
end do err_diis(:,:,ispin),F_diis(:,:,ispin),err(:,:,ispin),F(:,:,ispin))
end do
! Reset DIIS if required else
n_diis = 0
if(minval(rcond(:)) < 1d-15) n_diis = 0 end if
! Transform Fock matrix in orthogonal basis ! Transform Fock matrix in orthogonal basis