diff --git a/input/dft b/input/dft index 03d7933..bfcaa1b 100644 --- a/input/dft +++ b/input/dft @@ -1,26 +1,26 @@ # Restricted or unrestricted KS calculation eDFT-UKS # exchange rung: -# Hartree = 0 +# Hartree = 0: H # LDA = 1: S51,CC-S51 # GGA = 2: B88,G96,PBE -# Hybrid = 4: B3LYP,PBE0 -# Hartree-Fock = 666 - 2 B88 +# MGGA = 3: +# Hybrid = 4: HF,B3,PBE + 4 B3 # correlation rung: # Hartree = 0: H # LDA = 1: VWN5,eVWN5 # GGA = 2: LYP,PBE -# Hybrid = 4: -# Hartree-Fock = 666 - 2 LYP +# MGGA = 3: +# Hybrid = 4: HF,B88,PBE + 4 LYP # quadrature grid SG-n 1 # Number of states in ensemble (nEns) 3 # occupation numbers - 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 - 1 1 1 1 1 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 + 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 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/input/methods b/input/methods index 1da5665..ceea951 100644 --- a/input/methods +++ b/input/methods @@ -1,5 +1,5 @@ # RHF UHF KS MOM - T F T F + F F T F # MP2* MP3 MP2-F12 F F F # CCD DCD CCSD CCSD(T) @@ -9,7 +9,7 @@ # CIS* CIS(D) CID CISD F F F F # RPA* RPAx* ppRPA - F F F + F T F # G0F2 evGF2 G0F3 evGF3 F F F F # G0W0* evGW* qsGW* diff --git a/src/eDFT/lda_exchange_potential.f90 b/src/eDFT/lda_exchange_potential.f90 deleted file mode 100644 index c486267..0000000 --- a/src/eDFT/lda_exchange_potential.f90 +++ /dev/null @@ -1,58 +0,0 @@ -subroutine lda_exchange_potential(DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,AO,rho,Fx) - -! Select LDA correlation potential - - implicit none - - include 'parameters.h' - -! Input variables - - logical,intent(in) :: LDA_centered - character(len=12),intent(in) :: DFA - integer,intent(in) :: nEns - double precision,intent(in) :: wEns(nEns) - double precision,intent(in) :: aCC_w1(3) - double precision,intent(in) :: aCC_w2(3) - integer,intent(in) :: nGrid - double precision,intent(in) :: weight(nGrid) - integer,intent(in) :: nBas - double precision,intent(in) :: AO(nBas,nGrid) - double precision,intent(in) :: rho(nGrid) - -! Output variables - - double precision,intent(out) :: Fx(nBas,nBas) - -! Select exchange functional - - select case (DFA) - - case ('RS51') - - call RS51_lda_exchange_potential(nGrid,weight,nBas,AO,rho,Fx) - - case ('US51') - - call US51_lda_exchange_potential(nGrid,weight,nBas,AO,rho,Fx) - - case ('RMFL20') - - call RMFL20_lda_exchange_potential(LDA_centered,nEns,wEns,nGrid,weight,nBas,AO,rho,Fx) - - case ('RCC') - - call RCC_lda_exchange_potential(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,AO,rho,Fx) - - case ('UCC') - - call UCC_lda_exchange_potential(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,AO,rho,Fx) - - case default - - call print_warning('!!! LDA exchange functional not available !!!') - stop - - end select - -end subroutine lda_exchange_potential diff --git a/src/eDFT/unrestricted_correlation_energy.f90 b/src/eDFT/unrestricted_correlation_energy.f90 index 54b702e..fe53825 100644 --- a/src/eDFT/unrestricted_correlation_energy.f90 +++ b/src/eDFT/unrestricted_correlation_energy.f90 @@ -18,10 +18,6 @@ subroutine unrestricted_correlation_energy(rung,DFA,nEns,wEns,nGrid,weight,rho,d ! Local variables - double precision :: EcLDA(nsp) - double precision :: EcGGA(nsp) - double precision :: aC - ! Output variables double precision,intent(out) :: Ec(nsp) @@ -56,12 +52,7 @@ subroutine unrestricted_correlation_energy(rung,DFA,nEns,wEns,nGrid,weight,rho,d case(4) - aC = 0.81d0 - - call unrestricted_lda_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,EcLDA) - call unrestricted_gga_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,EcGGA) - - Ec(:) = EcLDA(:) + aC*(EcGGA(:) - EcLDA(:)) + call unrestricted_hybrid_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ec) end select diff --git a/src/eDFT/unrestricted_correlation_potential.f90 b/src/eDFT/unrestricted_correlation_potential.f90 index 26d2fa5..d8e168e 100644 --- a/src/eDFT/unrestricted_correlation_potential.f90 +++ b/src/eDFT/unrestricted_correlation_potential.f90 @@ -61,14 +61,7 @@ subroutine unrestricted_correlation_potential(rung,DFA,nEns,wEns,nGrid,weight,nB case(4) - allocate(FcLDA(nBas,nBas,nspin),FcGGA(nBas,nBas,nspin)) - - aC = 0.81d0 - - call unrestricted_lda_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,rho,FcLDA) - call unrestricted_gga_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,FcGGA) - - Fc(:,:,:) = FcLDA(:,:,:) + aC*(FcGGA(:,:,:) - FcLDA(:,:,:)) + call unrestricted_hybrid_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc) end select diff --git a/src/eDFT/unrestricted_exchange_energy.f90 b/src/eDFT/unrestricted_exchange_energy.f90 index deb011d..f579248 100644 --- a/src/eDFT/unrestricted_exchange_energy.f90 +++ b/src/eDFT/unrestricted_exchange_energy.f90 @@ -26,9 +26,6 @@ subroutine unrestricted_exchange_energy(rung,DFA,LDA_centered,nEns,wEns,aCC_w1,a ! Local variables - double precision :: ExLDA,ExGGA,ExMGGA,ExHF - double precision :: cX,aX,aC - ! Output variables double precision,intent(out) :: Ex @@ -46,41 +43,26 @@ subroutine unrestricted_exchange_energy(rung,DFA,LDA_centered,nEns,wEns,aCC_w1,a case(1) call unrestricted_lda_exchange_energy(DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,& - rho,ExLDA,Cx_choice) - - Ex = ExLDA + rho,Ex,Cx_choice) ! GGA functionals case(2) - call unrestricted_gga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,ExGGA) - - Ex = ExGGA + call unrestricted_gga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ex) ! MGGA functionals case(3) - call unrestricted_mgga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,ExMGGA) - - Ex = ExMGGA + call unrestricted_mgga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ex) ! Hybrid functionals case(4) - cX = 0.20d0 - aX = 0.72d0 - aC = 0.81d0 - - call unrestricted_lda_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,ExLDA,Cx_choice) - call unrestricted_gga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,ExGGA) - call unrestricted_fock_exchange_energy(nBas,P,FxHF,ExHF) - - Ex = ExLDA & - + cX*(ExHF - ExLDA) & - + aX*(ExGGA - ExLDA) + call unrestricted_hybrid_exchange_energy(DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,P,FxHF, & + rho,drho,Ex,Cx_choice) end select diff --git a/src/eDFT/unrestricted_exchange_potential.f90 b/src/eDFT/unrestricted_exchange_potential.f90 index 70a0a54..31cecc9 100644 --- a/src/eDFT/unrestricted_exchange_potential.f90 +++ b/src/eDFT/unrestricted_exchange_potential.f90 @@ -67,18 +67,8 @@ subroutine unrestricted_exchange_potential(rung,DFA,LDA_centered,nEns,wEns,aCC_w case(4) - allocate(FxLDA(nBas,nBas),FxGGA(nBas,nBas)) - - cX = 0.20d0 - aX = 0.72d0 - - call unrestricted_lda_exchange_potential(DFA,nGrid,weight,nBas,AO,rho,FxLDA,Cx_choice) - call unrestricted_gga_exchange_potential(DFA,nGrid,weight,nBas,AO,dAO,rho,drho,FxGGA) - call unrestricted_fock_exchange_potential(nBas,P,ERI,FxHF) - - Fx(:,:) = FxLDA(:,:) & - + cX*(FxHF(:,:) - FxLDA(:,:)) & - + aX*(FxGGA(:,:) - FxLDA(:,:)) + call unrestricted_hybrid_exchange_potential(DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,nBas,P, & + ERI,AO,dAO,rho,drho,Fx,FxHF,Cx_choice) end select diff --git a/src/eDFT/unrestricted_lda_exchange_energy.f90 b/src/eDFT/unrestricted_lda_exchange_energy.f90 index f4d6fba..71e7aa1 100644 --- a/src/eDFT/unrestricted_lda_exchange_energy.f90 +++ b/src/eDFT/unrestricted_lda_exchange_energy.f90 @@ -36,7 +36,8 @@ subroutine unrestricted_lda_exchange_energy(DFA,LDA_centered,nEns,wEns,aCC_w1,aC case default - call print_warning('!!! LDA exchange functional not available !!!') + call print_warning('!!! LDA exchange energy not available !!!') + stop end select diff --git a/src/eDFT/unrestricted_lda_exchange_potential.f90 b/src/eDFT/unrestricted_lda_exchange_potential.f90 index dd26ffb..718bce8 100644 --- a/src/eDFT/unrestricted_lda_exchange_potential.f90 +++ b/src/eDFT/unrestricted_lda_exchange_potential.f90 @@ -39,7 +39,7 @@ subroutine unrestricted_lda_exchange_potential(DFA,LDA_centered,nEns,wEns,aCC_w1 case default - call print_warning('!!! LDA exchange functional not available !!!') + call print_warning('!!! LDA exchange potential not available !!!') stop end select