4
1
mirror of https://github.com/pfloos/quack synced 2024-08-29 15:43:45 +02:00

rename routines in eDFT

This commit is contained in:
Pierre-Francois Loos 2022-01-07 09:13:38 +01:00
parent d51f99671d
commit 16066f96d8
84 changed files with 325 additions and 270 deletions

View File

@ -1,5 +1,5 @@
# RHF UHF KS MOM # RHF UHF KS MOM
T F F F F F T F
# MP2* MP3 MP2-F12 # MP2* MP3 MP2-F12
F F F F F F
# CCD pCCD DCD CCSD CCSD(T) # CCD pCCD DCD CCSD CCSD(T)
@ -13,7 +13,7 @@
# G0F2* evGF2* qsGF2* G0F3 evGF3 # G0F2* evGF2* qsGF2* G0F3 evGF3
F F F F F F F F F F
# G0W0* evGW* qsGW* ufG0W0 ufGW # G0W0* evGW* qsGW* ufG0W0 ufGW
F F T F F F F F F F
# G0T0 evGT qsGT # G0T0 evGT qsGT
F F F F F F
# MCMP2 # MCMP2

View File

@ -5,7 +5,7 @@
# CC: maxSCF thresh DIIS n_diis # CC: maxSCF thresh DIIS n_diis
64 0.00001 T 5 64 0.00001 T 5
# spin: TDA singlet triplet spin_conserved spin_flip # spin: TDA singlet triplet spin_conserved spin_flip
F T F T T F T T T T
# GF: maxSCF thresh DIIS n_diis lin eta renorm reg # 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 3 F
# GW: maxSCF thresh DIIS n_diis lin eta COHSEX SOSEX TDA_W G0W GW0 reg # GW: maxSCF thresh DIIS n_diis lin eta COHSEX SOSEX TDA_W G0W GW0 reg
@ -15,6 +15,6 @@
# ACFDT: AC Kx XBS # ACFDT: AC Kx XBS
F F F F F F
# BSE: BSE dBSE dTDA evDyn # BSE: BSE dBSE dTDA evDyn
F T T F T F T F
# MCMP2: nMC nEq nWalk dt nPrint iSeed doDrift # MCMP2: nMC nEq nWalk dt nPrint iSeed doDrift
1000000 100000 10 0.3 10000 1234 T 1000000 100000 10 0.3 10000 1234 T

View File

@ -42,8 +42,9 @@ subroutine linear_response_Tmatrix(ispin,dRPA,TDA,eta,nBas,nC,nO,nV,nR,nS,lambda
call linear_response_A_matrix(ispin,dRPA,nBas,nC,nO,nV,nR,nS,lambda,e,ERI,A) call linear_response_A_matrix(ispin,dRPA,nBas,nC,nO,nV,nR,nS,lambda,e,ERI,A)
if(ispin == 1) A(:,:) = A(:,:) + A_BSE(:,:) A(:,:) = A(:,:) + A_BSE(:,:)
if(ispin == 2) A(:,:) = A(:,:) - A_BSE(:,:) ! if(ispin == 1) A(:,:) = A(:,:) + A_BSE(:,:)
! if(ispin == 2) A(:,:) = A(:,:) - A_BSE(:,:)
! print*,'A' ! print*,'A'
! call matout(nS,nS,A) ! call matout(nS,nS,A)
@ -64,8 +65,9 @@ subroutine linear_response_Tmatrix(ispin,dRPA,TDA,eta,nBas,nC,nO,nV,nR,nS,lambda
call linear_response_B_matrix(ispin,dRPA,nBas,nC,nO,nV,nR,nS,lambda,ERI,B) call linear_response_B_matrix(ispin,dRPA,nBas,nC,nO,nV,nR,nS,lambda,ERI,B)
if(ispin == 1) B(:,:) = B(:,:) + B_BSE(:,:) B(:,:) = B(:,:) + B_BSE(:,:)
if(ispin == 2) B(:,:) = B(:,:) - B_BSE(:,:) ! if(ispin == 1) B(:,:) = B(:,:) + B_BSE(:,:)
! if(ispin == 2) B(:,:) = B(:,:) - B_BSE(:,:)
! print*,'B' ! print*,'B'
! call matout(nS,nS,B) ! call matout(nS,nS,B)

View File

@ -1,4 +1,4 @@
subroutine UB88_gga_exchange_energy(nGrid,weight,rho,drho,Ex) subroutine B88_gga_exchange_energy(nGrid,weight,rho,drho,Ex)
! Compute Becke's 88 GGA exchange energy ! Compute Becke's 88 GGA exchange energy
@ -45,4 +45,4 @@ subroutine UB88_gga_exchange_energy(nGrid,weight,rho,drho,Ex)
end do end do
end subroutine UB88_gga_exchange_energy end subroutine B88_gga_exchange_energy

View File

@ -1,4 +1,4 @@
subroutine UB88_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx) subroutine B88_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx)
! Compute Becke's GGA exchange potential ! Compute Becke's GGA exchange potential
@ -70,4 +70,4 @@ subroutine UB88_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx)
end do end do
end do end do
end subroutine UB88_gga_exchange_potential end subroutine B88_gga_exchange_potential

View File

@ -1,4 +1,4 @@
subroutine UC16_lda_correlation_energy(nGrid,weight,rho,Ec) subroutine C16_lda_correlation_energy(nGrid,weight,rho,Ec)
! Compute unrestricted Chachiyo's LDA correlation energy ! Compute unrestricted Chachiyo's LDA correlation energy
@ -90,4 +90,4 @@ subroutine UC16_lda_correlation_energy(nGrid,weight,rho,Ec)
Ec(2) = Ec(2) - Ec(1) - Ec(3) Ec(2) = Ec(2) - Ec(1) - Ec(3)
end subroutine UC16_lda_correlation_energy end subroutine C16_lda_correlation_energy

View File

@ -1,4 +1,4 @@
subroutine UC16_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc) subroutine C16_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc)
! Compute unrestricted LDA correlation potential ! Compute unrestricted LDA correlation potential
@ -128,4 +128,4 @@ include 'parameters.h'
enddo enddo
enddo enddo
end subroutine UC16_lda_correlation_potential end subroutine C16_lda_correlation_potential

View File

@ -1,4 +1,4 @@
subroutine UCC_lda_exchange_derivative_discontinuity(nEns,wEns,nCC,aCC,nGrid,weight,rhow,Cx_choice,doNcentered,ExDD) subroutine CC_lda_exchange_derivative_discontinuity(nEns,wEns,nCC,aCC,nGrid,weight,rhow,Cx_choice,doNcentered,ExDD)
! Compute the unrestricted version of the curvature-corrected exchange ensemble derivative ! Compute the unrestricted version of the curvature-corrected exchange ensemble derivative
@ -158,4 +158,4 @@ subroutine UCC_lda_exchange_derivative_discontinuity(nEns,wEns,nCC,aCC,nGrid,wei
end do end do
end do end do
end subroutine UCC_lda_exchange_derivative_discontinuity end subroutine CC_lda_exchange_derivative_discontinuity

View File

@ -1,4 +1,4 @@
subroutine UCC_lda_exchange_energy(nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,doNcentered,Ex) subroutine CC_lda_exchange_energy(nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,doNcentered,Ex)
! Compute the unrestricted version of the curvature-corrected exchange functional ! Compute the unrestricted version of the curvature-corrected exchange functional
@ -107,4 +107,4 @@ subroutine UCC_lda_exchange_energy(nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,
enddo enddo
end subroutine UCC_lda_exchange_energy end subroutine CC_lda_exchange_energy

View File

@ -1,4 +1,4 @@
subroutine UCC_lda_exchange_individual_energy(nEns,wEns,nCC,aCC,nGrid,weight,rhow,rho,Cx_choice,doNcentered,LZx,Ex) subroutine CC_lda_exchange_individual_energy(nEns,wEns,nCC,aCC,nGrid,weight,rhow,rho,Cx_choice,doNcentered,LZx,Ex)
! Compute the unrestricted version of the curvature-corrected exchange functional ! Compute the unrestricted version of the curvature-corrected exchange functional
@ -128,4 +128,4 @@ subroutine UCC_lda_exchange_individual_energy(nEns,wEns,nCC,aCC,nGrid,weight,rho
enddo enddo
end subroutine UCC_lda_exchange_individual_energy end subroutine CC_lda_exchange_individual_energy

View File

@ -1,4 +1,4 @@
subroutine UCC_lda_exchange_potential(nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho,Cx_choice,doNcentered,Fx) subroutine CC_lda_exchange_potential(nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho,Cx_choice,doNcentered,Fx)
! Compute the unrestricted version of the curvature-corrected exchange potential ! Compute the unrestricted version of the curvature-corrected exchange potential
@ -116,4 +116,4 @@ subroutine UCC_lda_exchange_potential(nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho
enddo enddo
enddo enddo
end subroutine UCC_lda_exchange_potential end subroutine CC_lda_exchange_potential

View File

@ -1,4 +1,4 @@
subroutine UG96_gga_exchange_energy(nGrid,weight,rho,drho,Ex) subroutine G96_gga_exchange_energy(nGrid,weight,rho,drho,Ex)
! Compute Gill's 96 GGA exchange energy ! Compute Gill's 96 GGA exchange energy
@ -45,4 +45,4 @@ subroutine UG96_gga_exchange_energy(nGrid,weight,rho,drho,Ex)
end do end do
end subroutine UG96_gga_exchange_energy end subroutine G96_gga_exchange_energy

View File

@ -1,4 +1,4 @@
subroutine UG96_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx) subroutine G96_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx)
! Compute Gill's GGA exchange poential ! Compute Gill's GGA exchange poential
@ -61,4 +61,4 @@ subroutine UG96_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx)
enddo enddo
enddo enddo
end subroutine UG96_gga_exchange_potential end subroutine G96_gga_exchange_potential

View File

@ -1,4 +1,4 @@
subroutine ULYP_gga_correlation_energy(nGrid,weight,rho,drho,Ec) subroutine LYP_gga_correlation_energy(nGrid,weight,rho,drho,Ec)
! Compute unrestricted LYP GGA correlation energy ! Compute unrestricted LYP GGA correlation energy
@ -70,4 +70,4 @@ subroutine ULYP_gga_correlation_energy(nGrid,weight,rho,drho,Ec)
end do end do
end subroutine ULYP_gga_correlation_energy end subroutine LYP_gga_correlation_energy

View File

@ -1,4 +1,4 @@
subroutine ULYP_gga_correlation_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fc) subroutine LYP_gga_correlation_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
! Compute LYP correlation potential ! Compute LYP correlation potential
@ -153,4 +153,4 @@ subroutine ULYP_gga_correlation_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
end do end do
end do end do
end subroutine ULYP_gga_correlation_potential end subroutine LYP_gga_correlation_potential

View File

@ -1,4 +1,4 @@
subroutine UPBE_gga_correlation_energy(nGrid,weight,rho,drho,Ec) subroutine PBE_gga_correlation_energy(nGrid,weight,rho,drho,Ec)
! Compute unrestricted PBE GGA correlation energy ! Compute unrestricted PBE GGA correlation energy
@ -169,4 +169,4 @@ subroutine UPBE_gga_correlation_energy(nGrid,weight,rho,drho,Ec)
Ec(2) = Ec(2) - Ec(1) - Ec(3) Ec(2) = Ec(2) - Ec(1) - Ec(3)
end subroutine UPBE_gga_correlation_energy end subroutine PBE_gga_correlation_energy

View File

@ -1,4 +1,4 @@
subroutine UPBE_gga_correlation_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fc) subroutine PBE_gga_correlation_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
! Compute LYP correlation potential ! Compute LYP correlation potential
@ -36,7 +36,7 @@ subroutine UPBE_gga_correlation_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
! Compute matrix elements in the AO basis ! Compute matrix elements in the AO basis
call UPW92_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc) call PW92_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc)
do mu=1,nBas do mu=1,nBas
do nu=1,nBas do nu=1,nBas
@ -85,4 +85,4 @@ subroutine UPBE_gga_correlation_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
end do end do
end do end do
end subroutine UPBE_gga_correlation_potential end subroutine PBE_gga_correlation_potential

View File

@ -1,4 +1,4 @@
subroutine UPBE_gga_exchange_energy(nGrid,weight,rho,drho,Ex) subroutine PBE_gga_exchange_energy(nGrid,weight,rho,drho,Ex)
! Compute PBE GGA exchange energy ! Compute PBE GGA exchange energy
@ -46,4 +46,4 @@ subroutine UPBE_gga_exchange_energy(nGrid,weight,rho,drho,Ex)
end do end do
end subroutine UPBE_gga_exchange_energy end subroutine PBE_gga_exchange_energy

View File

@ -1,4 +1,4 @@
subroutine UPBE_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx) subroutine PBE_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx)
! Compute PBE GGA exchange potential ! Compute PBE GGA exchange potential
@ -64,4 +64,4 @@ subroutine UPBE_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx)
end do end do
end do end do
end subroutine UPBE_gga_exchange_potential end subroutine PBE_gga_exchange_potential

View File

@ -1,4 +1,4 @@
subroutine UPW92_lda_correlation_energy(nGrid,weight,rho,Ec) subroutine PW92_lda_correlation_energy(nGrid,weight,rho,Ec)
! Compute unrestricted PW92 LDA correlation energy ! Compute unrestricted PW92 LDA correlation energy
@ -117,4 +117,4 @@ subroutine UPW92_lda_correlation_energy(nGrid,weight,rho,Ec)
Ec(2) = Ec(2) - Ec(1) - Ec(3) Ec(2) = Ec(2) - Ec(1) - Ec(3)
end subroutine UPW92_lda_correlation_energy end subroutine PW92_lda_correlation_energy

View File

@ -1,4 +1,4 @@
subroutine UPW92_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc) subroutine PW92_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc)
! Compute unrestricted PW92 LDA correlation potential ! Compute unrestricted PW92 LDA correlation potential
@ -182,4 +182,4 @@ subroutine UPW92_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc)
end do end do
end do end do
end subroutine UPW92_lda_correlation_potential end subroutine PW92_lda_correlation_potential

View File

@ -1,4 +1,4 @@
subroutine US51_lda_exchange_energy(nGrid,weight,rho,Ex) subroutine S51_lda_exchange_energy(nGrid,weight,rho,Ex)
! Compute Slater's LDA exchange energy ! Compute Slater's LDA exchange energy
@ -31,4 +31,4 @@ subroutine US51_lda_exchange_energy(nGrid,weight,rho,Ex)
enddo enddo
end subroutine US51_lda_exchange_energy end subroutine S51_lda_exchange_energy

View File

@ -1,4 +1,4 @@
subroutine US51_lda_exchange_individual_energy(nEns,nGrid,weight,rhow,rho,LZx,Ex) subroutine S51_lda_exchange_individual_energy(nEns,nGrid,weight,rhow,rho,LZx,Ex)
! Compute the restricted version of Slater's LDA exchange individual energy ! Compute the restricted version of Slater's LDA exchange individual energy
@ -58,4 +58,4 @@ subroutine US51_lda_exchange_individual_energy(nEns,nGrid,weight,rhow,rho,LZx,Ex
enddo enddo
end subroutine US51_lda_exchange_individual_energy end subroutine S51_lda_exchange_individual_energy

View File

@ -1,4 +1,4 @@
subroutine US51_lda_exchange_potential(nGrid,weight,nBas,AO,rho,Fx) subroutine S51_lda_exchange_potential(nGrid,weight,nBas,AO,rho,Fx)
! Compute Slater's LDA exchange potential ! Compute Slater's LDA exchange potential
@ -42,4 +42,4 @@ subroutine US51_lda_exchange_potential(nGrid,weight,nBas,AO,rho,Fx)
enddo enddo
enddo enddo
end subroutine US51_lda_exchange_potential end subroutine S51_lda_exchange_potential

View File

@ -1,4 +1,4 @@
subroutine UVWN3_lda_correlation_energy(nGrid,weight,rho,Ec) subroutine VWN3_lda_correlation_energy(nGrid,weight,rho,Ec)
! Compute unrestricted VWN3 LDA correlation energy ! Compute unrestricted VWN3 LDA correlation energy
@ -134,4 +134,4 @@ subroutine UVWN3_lda_correlation_energy(nGrid,weight,rho,Ec)
Ec(2) = Ec(2) - Ec(1) - Ec(3) Ec(2) = Ec(2) - Ec(1) - Ec(3)
end subroutine UVWN3_lda_correlation_energy end subroutine VWN3_lda_correlation_energy

View File

@ -1,4 +1,4 @@
subroutine UVWN3_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,doNcentered,LZc,Ec) subroutine VWN3_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,doNcentered,LZc,Ec)
! Compute VWN3 LDA correlation potential ! Compute VWN3 LDA correlation potential
@ -178,4 +178,4 @@ subroutine UVWN3_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,do
end do end do
end subroutine UVWN3_lda_correlation_individual_energy end subroutine VWN3_lda_correlation_individual_energy

View File

@ -1,4 +1,4 @@
subroutine UVWN3_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc) subroutine VWN3_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc)
! Compute unrestricted VWN3 LDA correlation potential ! Compute unrestricted VWN3 LDA correlation potential
@ -193,4 +193,4 @@ subroutine UVWN3_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc)
end do end do
end do end do
end subroutine UVWN3_lda_correlation_potential end subroutine VWN3_lda_correlation_potential

View File

@ -1,4 +1,4 @@
subroutine UVWN5_lda_correlation_energy(nGrid,weight,rho,Ec) subroutine VWN5_lda_correlation_energy(nGrid,weight,rho,Ec)
! Compute unrestricted VWN5 LDA correlation energy ! Compute unrestricted VWN5 LDA correlation energy
@ -134,4 +134,4 @@ subroutine UVWN5_lda_correlation_energy(nGrid,weight,rho,Ec)
Ec(2) = Ec(2) - Ec(1) - Ec(3) Ec(2) = Ec(2) - Ec(1) - Ec(3)
end subroutine UVWN5_lda_correlation_energy end subroutine VWN5_lda_correlation_energy

View File

@ -1,4 +1,4 @@
subroutine UVWN5_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,LZc,Ec) subroutine VWN5_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,LZc,Ec)
! Compute VWN5 LDA correlation potential ! Compute VWN5 LDA correlation potential
@ -181,4 +181,4 @@ subroutine UVWN5_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,LZ
end do end do
end subroutine UVWN5_lda_correlation_individual_energy end subroutine VWN5_lda_correlation_individual_energy

View File

@ -1,4 +1,4 @@
subroutine UVWN5_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc) subroutine VWN5_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc)
! Compute unrestricted VWN5 LDA correlation potential ! Compute unrestricted VWN5 LDA correlation potential
@ -190,4 +190,4 @@ subroutine UVWN5_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc)
end do end do
end do end do
end subroutine UVWN5_lda_correlation_potential end subroutine VWN5_lda_correlation_potential

View File

@ -1,4 +1,4 @@
subroutine UW38_lda_correlation_energy(nGrid,weight,rho,Ec) subroutine W38_lda_correlation_energy(nGrid,weight,rho,Ec)
! Compute the unrestricted version of the Wigner's LDA correlation energy ! Compute the unrestricted version of the Wigner's LDA correlation energy
@ -49,4 +49,4 @@ subroutine UW38_lda_correlation_energy(nGrid,weight,rho,Ec)
Ec(2) = -4d0*a*Ec(2) Ec(2) = -4d0*a*Ec(2)
end subroutine UW38_lda_correlation_energy end subroutine W38_lda_correlation_energy

View File

@ -1,4 +1,4 @@
subroutine UW38_lda_correlation_individual_energy(nGrid,weight,rhow,rho,Ec) subroutine W38_lda_correlation_individual_energy(nGrid,weight,rhow,rho,Ec)
! Compute the unrestricted version of the Wigner's LDA individual energy ! Compute the unrestricted version of the Wigner's LDA individual energy
@ -59,4 +59,4 @@ subroutine UW38_lda_correlation_individual_energy(nGrid,weight,rhow,rho,Ec)
Ec(2) = -4d0*a*Ec(2) Ec(2) = -4d0*a*Ec(2)
end subroutine UW38_lda_correlation_individual_energy end subroutine W38_lda_correlation_individual_energy

View File

@ -1,4 +1,4 @@
subroutine UW38_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc) subroutine W38_lda_correlation_potential(nGrid,weight,nBas,AO,rho,Fc)
! Compute the unrestricted version of the Wigner's LDA correlation potential ! Compute the unrestricted version of the Wigner's LDA correlation potential
@ -73,4 +73,4 @@ include 'parameters.h'
Fc(:,:,:) = -4d0*a*Fc(:,:,:) Fc(:,:,:) = -4d0*a*Fc(:,:,:)
end subroutine UW38_lda_correlation_potential end subroutine W38_lda_correlation_potential

View File

@ -1,5 +1,4 @@
subroutine allocate_grid(nNuc,ZNuc,max_ang_mom,min_exponent,max_exponent, & subroutine allocate_grid(nNuc,ZNuc,max_ang_mom,min_exponent,max_exponent,radial_precision,nAng,nGrid)
radial_precision,nAng,nGrid)
! Allocate quadrature grid with numgrid (Radovan Bast) ! Allocate quadrature grid with numgrid (Radovan Bast)

View File

@ -1,4 +1,4 @@
subroutine unrestricted_auxiliary_energy(nBas,nEns,eps,occnum,Eaux) subroutine auxiliary_energy(nBas,nEns,eps,occnum,Eaux)
! Compute the auxiliary KS energies ! Compute the auxiliary KS energies
@ -52,4 +52,4 @@ subroutine unrestricted_auxiliary_energy(nBas,nEns,eps,occnum,Eaux)
end do end do
end subroutine unrestricted_auxiliary_energy end subroutine auxiliary_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_correlation_derivative_discontinuity(rung,DFA,nEns,wEns,nGrid,weight,rhow,drhow,Ec) subroutine correlation_derivative_discontinuity(rung,DFA,nEns,wEns,nGrid,weight,rhow,drhow,Ec)
! Compute the correlation part of the derivative discontinuity ! Compute the correlation part of the derivative discontinuity
@ -34,26 +34,26 @@ subroutine unrestricted_correlation_derivative_discontinuity(rung,DFA,nEns,wEns,
case(1) case(1)
call unrestricted_lda_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec) call lda_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec)
! GGA functionals ! GGA functionals
case(2) case(2)
call unrestricted_gga_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec) call gga_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec)
! MGGA functionals ! MGGA functionals
case(3) case(3)
call unrestricted_mgga_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec) call mgga_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec)
! Hybrid functionals ! Hybrid functionals
case(4) case(4)
call unrestricted_hybrid_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec) call hybrid_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec)
end select end select
end subroutine unrestricted_correlation_derivative_discontinuity end subroutine correlation_derivative_discontinuity

View File

@ -1,4 +1,4 @@
subroutine unrestricted_correlation_energy(rung,DFA,nEns,wEns,nGrid,weight,rho,drho,Ec) subroutine correlation_energy(rung,DFA,nEns,wEns,nGrid,weight,rho,drho,Ec)
! Compute the unrestricted version of the correlation energy ! Compute the unrestricted version of the correlation energy
@ -34,26 +34,26 @@ subroutine unrestricted_correlation_energy(rung,DFA,nEns,wEns,nGrid,weight,rho,d
case(1) case(1)
call unrestricted_lda_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,Ec) call lda_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,Ec)
! GGA functionals ! GGA functionals
case(2) case(2)
call unrestricted_gga_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ec) call gga_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ec)
! MGGA functionals ! MGGA functionals
case(3) case(3)
call unrestricted_mgga_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ec) call mgga_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ec)
! Hybrid functionals ! Hybrid functionals
case(4) case(4)
call unrestricted_hybrid_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ec) call hybrid_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ec)
end select end select
end subroutine unrestricted_correlation_energy end subroutine correlation_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_correlation_individual_energy(rung,DFA,LDA_centered,nEns,wEns,nGrid,weight, & subroutine correlation_individual_energy(rung,DFA,LDA_centered,nEns,wEns,nGrid,weight, &
rhow,drhow,rho,drho,LZc,Ec) rhow,drhow,rho,drho,LZc,Ec)
! Compute the correlation energy of individual states ! Compute the correlation energy of individual states
@ -37,7 +37,7 @@ subroutine unrestricted_correlation_individual_energy(rung,DFA,LDA_centered,nEns
case(1) case(1)
call unrestricted_lda_correlation_individual_energy(DFA,LDA_centered,nEns,wEns,nGrid,weight,rhow,rho,LZc,Ec) call lda_correlation_individual_energy(DFA,LDA_centered,nEns,wEns,nGrid,weight,rhow,rho,LZc,Ec)
! GGA functionals ! GGA functionals
@ -55,8 +55,8 @@ subroutine unrestricted_correlation_individual_energy(rung,DFA,LDA_centered,nEns
case(4) case(4)
call unrestricted_hybrid_correlation_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,LZc,Ec) call hybrid_correlation_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,LZc,Ec)
end select end select
end subroutine unrestricted_correlation_individual_energy end subroutine correlation_individual_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_correlation_potential(rung,DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc) subroutine correlation_potential(rung,DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
! Compute the correlation potential ! Compute the correlation potential
@ -43,26 +43,26 @@ subroutine unrestricted_correlation_potential(rung,DFA,nEns,wEns,nGrid,weight,nB
case(1) case(1)
call unrestricted_lda_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,rho,Fc) call lda_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,rho,Fc)
! GGA functionals ! GGA functionals
case(2) case(2)
call unrestricted_gga_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc) call gga_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
! MGGA functionals ! MGGA functionals
case(3) case(3)
call unrestricted_mgga_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc) call mgga_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
! Hybrid functionals ! Hybrid functionals
case(4) case(4)
call unrestricted_hybrid_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc) call hybrid_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
end select end select
end subroutine unrestricted_correlation_potential end subroutine correlation_potential

View File

@ -1,4 +1,4 @@
subroutine unrestricted_density_matrix(nBas,nEns,c,P,occnum) subroutine density_matrix(nBas,nEns,c,P,occnum)
! Calculate density matrices ! Calculate density matrices
@ -45,4 +45,4 @@ subroutine unrestricted_density_matrix(nBas,nEns,c,P,occnum)
end subroutine unrestricted_density_matrix end subroutine density_matrix

View File

@ -184,7 +184,7 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nCC,aCC,nGrid,weight,max
! Compute density matrix ! Compute density matrix
!------------------------------------------------------------------------ !------------------------------------------------------------------------
call unrestricted_density_matrix(nBas,nEns,c(:,:,:),P(:,:,:,:),occnum(:,:,:)) call density_matrix(nBas,nEns,c(:,:,:),P(:,:,:,:),occnum(:,:,:))
! Weight-dependent density matrix ! Weight-dependent density matrix
@ -236,20 +236,20 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nCC,aCC,nGrid,weight,max
! Compute Hartree potential ! Compute Hartree potential
do ispin=1,nspin do ispin=1,nspin
call unrestricted_hartree_potential(nBas,Pw(:,:,ispin),ERI,J(:,:,ispin)) call hartree_potential(nBas,Pw(:,:,ispin),ERI,J(:,:,ispin))
end do end do
! Compute exchange potential ! Compute exchange potential
do ispin=1,nspin do ispin=1,nspin
call unrestricted_exchange_potential(x_rung,x_DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas, & call exchange_potential(x_rung,x_DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas, &
Pw(:,:,ispin),ERI,AO,dAO,rhow(:,ispin),drhow(:,:,ispin), & Pw(:,:,ispin),ERI,AO,dAO,rhow(:,ispin),drhow(:,:,ispin), &
Cx_choice,doNcentered,Fx(:,:,ispin),FxHF(:,:,ispin)) Cx_choice,doNcentered,Fx(:,:,ispin),FxHF(:,:,ispin))
end do end do
! Compute correlation potential ! Compute correlation potential
call unrestricted_correlation_potential(c_rung,c_DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rhow,drhow,Fc) call correlation_potential(c_rung,c_DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rhow,drhow,Fc)
! Build Fock operator ! Build Fock operator
@ -314,19 +314,19 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nCC,aCC,nGrid,weight,max
! Hartree energy ! Hartree energy
call unrestricted_hartree_energy(nBas,Pw,J,EH) call hartree_energy(nBas,Pw,J,EH)
! Exchange energy ! Exchange energy
do ispin=1,nspin do ispin=1,nspin
call unrestricted_exchange_energy(x_rung,x_DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas, & call exchange_energy(x_rung,x_DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas, &
Pw(:,:,ispin),FxHF(:,:,ispin),rhow(:,ispin),drhow(:,:,ispin), & Pw(:,:,ispin),FxHF(:,:,ispin),rhow(:,ispin),drhow(:,:,ispin), &
Cx_choice,doNcentered,Ex(ispin)) Cx_choice,doNcentered,Ex(ispin))
end do end do
! Correlation energy ! Correlation energy
call unrestricted_correlation_energy(c_rung,c_DFA,nEns,wEns,nGrid,weight,rhow,drhow,Ec) call correlation_energy(c_rung,c_DFA,nEns,wEns,nGrid,weight,rhow,drhow,Ec)
! Total energy ! Total energy
@ -377,7 +377,7 @@ subroutine eDFT_UKS(x_rung,x_DFA,c_rung,c_DFA,nEns,wEns,nCC,aCC,nGrid,weight,max
! Compute individual energies from ensemble energy ! Compute individual energies from ensemble energy
!------------------------------------------------------------------------ !------------------------------------------------------------------------
call unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas, & call individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas, &
AO,dAO,T,V,ERI,ENuc,eKS,Pw,rhow,drhow,J,Fx,FxHF,Fc,P,rho,drho,occnum,Cx_choice,doNcentered,Ew) AO,dAO,T,V,ERI,ENuc,eKS,Pw,rhow,drhow,J,Fx,FxHF,Fc,P,rho,drho,occnum,Cx_choice,doNcentered,Ew)
end subroutine eDFT_UKS end subroutine eDFT_UKS

View File

@ -1,4 +1,4 @@
subroutine unrestricted_exchange_derivative_discontinuity(rung,DFA,nEns,wEns,nCC,aCC,nGrid,weight,rhow,drhow,& subroutine exchange_derivative_discontinuity(rung,DFA,nEns,wEns,nCC,aCC,nGrid,weight,rhow,drhow,&
Cx_choice,doNcentered,ExDD) Cx_choice,doNcentered,ExDD)
! Compute the exchange part of the derivative discontinuity ! Compute the exchange part of the derivative discontinuity
@ -40,27 +40,27 @@ subroutine unrestricted_exchange_derivative_discontinuity(rung,DFA,nEns,wEns,nCC
case(1) case(1)
call unrestricted_lda_exchange_derivative_discontinuity(DFA,nEns,wEns(:),nCC,aCC,nGrid,weight(:),& call lda_exchange_derivative_discontinuity(DFA,nEns,wEns(:),nCC,aCC,nGrid,weight(:),&
rhow(:),Cx_choice,doNcentered,ExDD(:)) rhow(:),Cx_choice,doNcentered,ExDD(:))
! GGA functionals ! GGA functionals
case(2) case(2)
call unrestricted_gga_exchange_derivative_discontinuity(DFA,nEns,wEns(:),nGrid,weight(:),rhow(:),drhow(:,:),ExDD(:)) call gga_exchange_derivative_discontinuity(DFA,nEns,wEns(:),nGrid,weight(:),rhow(:),drhow(:,:),ExDD(:))
! MGGA functionals ! MGGA functionals
case(3) case(3)
call unrestricted_mgga_exchange_derivative_discontinuity(DFA,nEns,wEns(:),nGrid,weight(:),rhow(:),drhow(:,:),ExDD(:)) call mgga_exchange_derivative_discontinuity(DFA,nEns,wEns(:),nGrid,weight(:),rhow(:),drhow(:,:),ExDD(:))
! Hybrid functionals ! Hybrid functionals
case(4) case(4)
call unrestricted_hybrid_exchange_derivative_discontinuity(DFA,nEns,wEns(:),nCC,aCC,nGrid,weight(:),& call hybrid_exchange_derivative_discontinuity(DFA,nEns,wEns(:),nCC,aCC,nGrid,weight(:),&
rhow(:),Cx_choice,doNcentered,ExDD(:)) rhow(:),Cx_choice,doNcentered,ExDD(:))
end select end select
end subroutine unrestricted_exchange_derivative_discontinuity end subroutine exchange_derivative_discontinuity

View File

@ -1,4 +1,4 @@
subroutine unrestricted_exchange_energy(rung,DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P,FxHF, & subroutine exchange_energy(rung,DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P,FxHF, &
rho,drho,Cx_choice,doNcentered,Ex) rho,drho,Cx_choice,doNcentered,Ex)
! Compute the exchange energy ! Compute the exchange energy
@ -43,27 +43,27 @@ subroutine unrestricted_exchange_energy(rung,DFA,LDA_centered,nEns,wEns,nCC,aCC,
case(1) case(1)
call unrestricted_lda_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,doNcentered,Ex) call lda_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,doNcentered,Ex)
! GGA functionals ! GGA functionals
case(2) case(2)
call unrestricted_gga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ex) call gga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ex)
! MGGA functionals ! MGGA functionals
case(3) case(3)
call unrestricted_mgga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ex) call mgga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ex)
! Hybrid functionals ! Hybrid functionals
case(4) case(4)
call unrestricted_hybrid_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P,FxHF, & call hybrid_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P,FxHF, &
rho,drho,Cx_choice,doNcentered,Ex) rho,drho,Cx_choice,doNcentered,Ex)
end select end select
end subroutine unrestricted_exchange_energy end subroutine exchange_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_exchange_individual_energy(rung,DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas, & subroutine exchange_individual_energy(rung,DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas, &
ERI,Pw,rhow,drhow,P,rho,drho,Cx_choice,doNcentered,LZx,Ex) ERI,Pw,rhow,drhow,P,rho,drho,Cx_choice,doNcentered,LZx,Ex)
! Compute the exchange individual energy ! Compute the exchange individual energy
@ -45,27 +45,27 @@ subroutine unrestricted_exchange_individual_energy(rung,DFA,LDA_centered,nEns,wE
case(1) case(1)
call unrestricted_lda_exchange_individual_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,& call lda_exchange_individual_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,&
rhow,rho,Cx_choice,doNcentered,LZx,Ex) rhow,rho,Cx_choice,doNcentered,LZx,Ex)
! GGA functionals ! GGA functionals
case(2) case(2)
call unrestricted_gga_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,LZx,Ex) call gga_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,LZx,Ex)
! MGGA functionals ! MGGA functionals
case(3) case(3)
call unrestricted_mgga_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,LZx,Ex) call mgga_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,LZx,Ex)
! Hybrid functionals ! Hybrid functionals
case(4) case(4)
call unrestricted_hybrid_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,nBas,ERI,Pw,rhow,drhow,P,rho,drho,LZx,Ex) call hybrid_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,nBas,ERI,Pw,rhow,drhow,P,rho,drho,LZx,Ex)
end select end select
end subroutine unrestricted_exchange_individual_energy end subroutine exchange_individual_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_exchange_potential(rung,DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P, & subroutine exchange_potential(rung,DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P, &
ERI,AO,dAO,rho,drho,Cx_choice,doNcentered,Fx,FxHF) ERI,AO,dAO,rho,drho,Cx_choice,doNcentered,Fx,FxHF)
! Compute the exchange potential ! Compute the exchange potential
@ -52,28 +52,28 @@ subroutine unrestricted_exchange_potential(rung,DFA,LDA_centered,nEns,wEns,nCC,a
case(1) case(1)
call unrestricted_lda_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho,& call lda_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho,&
Cx_choice,doNcentered,Fx) Cx_choice,doNcentered,Fx)
! GGA functionals ! GGA functionals
case(2) case(2)
call unrestricted_gga_exchange_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fx) call gga_exchange_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fx)
! MGGA functionals ! MGGA functionals
case(3) case(3)
call unrestricted_mgga_exchange_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fx) call mgga_exchange_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fx)
! Hybrid functionals ! Hybrid functionals
case(4) case(4)
call unrestricted_hybrid_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P, & call hybrid_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P, &
ERI,AO,dAO,rho,drho,Cx_choice,doNcentered,Fx,FxHF) ERI,AO,dAO,rho,drho,Cx_choice,doNcentered,Fx,FxHF)
end select end select
end subroutine unrestricted_exchange_potential end subroutine exchange_potential

View File

@ -1,4 +1,4 @@
subroutine unrestricted_fock_exchange_energy(nBas,P,Fx,Ex) subroutine fock_exchange_energy(nBas,P,Fx,Ex)
! Compute the (exact) Fock exchange energy ! Compute the (exact) Fock exchange energy
@ -22,4 +22,4 @@ subroutine unrestricted_fock_exchange_energy(nBas,P,Fx,Ex)
Ex = 0.5d0*trace_matrix(nBas,matmul(P,Fx)) Ex = 0.5d0*trace_matrix(nBas,matmul(P,Fx))
end subroutine unrestricted_fock_exchange_energy end subroutine fock_exchange_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_fock_exchange_individual_energy(nBas,nEns,Pw,P,ERI,LZx,Ex) subroutine fock_exchange_individual_energy(nBas,nEns,Pw,P,ERI,LZx,Ex)
! Compute the HF individual energy in the unrestricted formalism ! Compute the HF individual energy in the unrestricted formalism
@ -32,7 +32,7 @@ subroutine unrestricted_fock_exchange_individual_energy(nBas,nEns,Pw,P,ERI,LZx,E
do ispin=1,nspin do ispin=1,nspin
call unrestricted_fock_exchange_potential(nBas,Pw(:,:,ispin),ERI,Fx(:,:,ispin)) call fock_exchange_potential(nBas,Pw(:,:,ispin),ERI,Fx(:,:,ispin))
LZx(ispin) = - 0.5d0*trace_matrix(nBas,matmul(Pw(:,:,ispin),Fx(:,:,ispin))) LZx(ispin) = - 0.5d0*trace_matrix(nBas,matmul(Pw(:,:,ispin),Fx(:,:,ispin)))
@ -43,4 +43,4 @@ subroutine unrestricted_fock_exchange_individual_energy(nBas,nEns,Pw,P,ERI,LZx,E
end do end do
end subroutine unrestricted_fock_exchange_individual_energy end subroutine fock_exchange_individual_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_fock_exchange_potential(nBas,P,ERI,Fx) subroutine fock_exchange_potential(nBas,P,ERI,Fx)
! Compute the Fock exchange potential ! Compute the Fock exchange potential
@ -31,4 +31,4 @@ subroutine unrestricted_fock_exchange_potential(nBas,P,ERI,Fx)
enddo enddo
enddo enddo
end subroutine unrestricted_fock_exchange_potential end subroutine fock_exchange_potential

View File

@ -1,4 +1,4 @@
subroutine unrestricted_gga_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec) subroutine gga_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec)
! Compute the correlation GGA part of the derivative discontinuity ! Compute the correlation GGA part of the derivative discontinuity
@ -41,4 +41,4 @@ subroutine unrestricted_gga_correlation_derivative_discontinuity(DFA,nEns,wEns,n
end select end select
end subroutine unrestricted_gga_correlation_derivative_discontinuity end subroutine gga_correlation_derivative_discontinuity

View File

@ -1,4 +1,4 @@
subroutine unrestricted_gga_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ec) subroutine gga_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ec)
! Compute unrestricted GGA correlation energy ! Compute unrestricted GGA correlation energy
@ -28,11 +28,11 @@ subroutine unrestricted_gga_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,dr
case (1) case (1)
call ULYP_gga_correlation_energy(nGrid,weight,rho,drho,Ec) call LYP_gga_correlation_energy(nGrid,weight,rho,drho,Ec)
case (2) case (2)
call UPBE_gga_correlation_energy(nGrid,weight,rho,drho,Ec) call PBE_gga_correlation_energy(nGrid,weight,rho,drho,Ec)
case default case default
@ -41,4 +41,4 @@ subroutine unrestricted_gga_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,dr
end select end select
end subroutine unrestricted_gga_correlation_energy end subroutine gga_correlation_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_gga_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc) subroutine gga_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
! Compute unrestricted GGA correlation potential ! Compute unrestricted GGA correlation potential
@ -30,11 +30,11 @@ subroutine unrestricted_gga_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBa
case (1) case (1)
call ULYP_gga_correlation_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fc) call LYP_gga_correlation_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
case (2) case (2)
call UPBE_gga_correlation_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fc) call PBE_gga_correlation_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
case default case default
@ -43,4 +43,4 @@ subroutine unrestricted_gga_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBa
end select end select
end subroutine unrestricted_gga_correlation_potential end subroutine gga_correlation_potential

View File

@ -1,4 +1,4 @@
subroutine unrestricted_gga_exchange_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,drhow,ExDD) subroutine gga_exchange_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,drhow,ExDD)
! Compute the exchange GGA part of the derivative discontinuity ! Compute the exchange GGA part of the derivative discontinuity
@ -45,4 +45,4 @@ subroutine unrestricted_gga_exchange_derivative_discontinuity(DFA,nEns,wEns,nGri
end select end select
end subroutine unrestricted_gga_exchange_derivative_discontinuity end subroutine gga_exchange_derivative_discontinuity

View File

@ -1,4 +1,4 @@
subroutine unrestricted_gga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ex) subroutine gga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ex)
! Select GGA exchange functional for energy calculation ! Select GGA exchange functional for energy calculation
@ -24,15 +24,15 @@ subroutine unrestricted_gga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,
case (1) case (1)
call UG96_gga_exchange_energy(nGrid,weight,rho,drho,Ex) call G96_gga_exchange_energy(nGrid,weight,rho,drho,Ex)
case (2) case (2)
call UB88_gga_exchange_energy(nGrid,weight,rho,drho,Ex) call B88_gga_exchange_energy(nGrid,weight,rho,drho,Ex)
case (3) case (3)
call UPBE_gga_exchange_energy(nGrid,weight,rho,drho,Ex) call PBE_gga_exchange_energy(nGrid,weight,rho,drho,Ex)
case default case default
@ -41,4 +41,4 @@ subroutine unrestricted_gga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,
end select end select
end subroutine unrestricted_gga_exchange_energy end subroutine gga_exchange_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_gga_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,LZx,Ex) subroutine gga_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,LZx,Ex)
! Compute GGA exchange energy for individual states ! Compute GGA exchange energy for individual states
@ -33,4 +33,4 @@ subroutine unrestricted_gga_exchange_individual_energy(DFA,nEns,wEns,nGrid,weigh
end select end select
end subroutine unrestricted_gga_exchange_individual_energy end subroutine gga_exchange_individual_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_gga_exchange_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fx) subroutine gga_exchange_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fx)
! Select GGA exchange functional for potential calculation ! Select GGA exchange functional for potential calculation
@ -28,15 +28,15 @@ subroutine unrestricted_gga_exchange_potential(DFA,nEns,wEns,nGrid,weight,nBas,A
case (1) case (1)
call UG96_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx) call G96_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx)
case (2) case (2)
call UB88_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx) call B88_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx)
case (3) case (3)
call UPBE_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx) call PBE_gga_exchange_potential(nGrid,weight,nBas,AO,dAO,rho,drho,Fx)
case default case default
@ -45,4 +45,4 @@ subroutine unrestricted_gga_exchange_potential(DFA,nEns,wEns,nGrid,weight,nBas,A
end select end select
end subroutine unrestricted_gga_exchange_potential end subroutine gga_exchange_potential

View File

@ -1,4 +1,4 @@
subroutine unrestricted_hartree_energy(nBas,P,J,EH) subroutine hartree_energy(nBas,P,J,EH)
! Compute the unrestricted version of the Hartree energy ! Compute the unrestricted version of the Hartree energy
@ -26,4 +26,4 @@ subroutine unrestricted_hartree_energy(nBas,P,J,EH)
+ 0.5d0*trace_matrix(nBas,matmul(P(:,:,2),J(:,:,1))) + 0.5d0*trace_matrix(nBas,matmul(P(:,:,2),J(:,:,1)))
EH(3) = 0.5d0*trace_matrix(nBas,matmul(P(:,:,2),J(:,:,2))) EH(3) = 0.5d0*trace_matrix(nBas,matmul(P(:,:,2),J(:,:,2)))
end subroutine unrestricted_hartree_energy end subroutine hartree_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_hartree_individual_energy(nBas,nEns,Pw,P,ERI,LZH,EH) subroutine hartree_individual_energy(nBas,nEns,Pw,P,ERI,LZH,EH)
! Compute the hartree contribution to the individual energies ! Compute the hartree contribution to the individual energies
@ -35,7 +35,7 @@ subroutine unrestricted_hartree_individual_energy(nBas,nEns,Pw,P,ERI,LZH,EH)
EH(:,:) = 0.d0 EH(:,:) = 0.d0
do ispin=1,nspin do ispin=1,nspin
call unrestricted_hartree_potential(nBas,Pw(:,:,ispin),ERI,J(:,:,ispin)) call hartree_potential(nBas,Pw(:,:,ispin),ERI,J(:,:,ispin))
end do end do
LZH(1) = - 0.5d0*trace_matrix(nBas,matmul(Pw(:,:,1),J(:,:,1))) LZH(1) = - 0.5d0*trace_matrix(nBas,matmul(Pw(:,:,1),J(:,:,1)))
@ -52,4 +52,4 @@ subroutine unrestricted_hartree_individual_energy(nBas,nEns,Pw,P,ERI,LZH,EH)
end do end do
end subroutine unrestricted_hartree_individual_energy end subroutine hartree_individual_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_hartree_potential(nBas,P,ERI,J) subroutine hartree_potential(nBas,P,ERI,J)
! Compute the unrestricted version of the Hartree potential ! Compute the unrestricted version of the Hartree potential
@ -30,4 +30,4 @@ subroutine unrestricted_hartree_potential(nBas,P,ERI,J)
enddo enddo
end subroutine unrestricted_hartree_potential end subroutine hartree_potential

View File

@ -1,4 +1,4 @@
subroutine unrestricted_hybrid_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec) subroutine hybrid_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec)
! Compute the correlation hybrid part of the derivative discontinuity ! Compute the correlation hybrid part of the derivative discontinuity
@ -43,4 +43,4 @@ subroutine unrestricted_hybrid_correlation_derivative_discontinuity(DFA,nEns,wEn
end select end select
end subroutine unrestricted_hybrid_correlation_derivative_discontinuity end subroutine hybrid_correlation_derivative_discontinuity

View File

@ -1,4 +1,4 @@
subroutine unrestricted_hybrid_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ec) subroutine hybrid_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ec)
! Compute the unrestricted version of the correlation energy for hybrid functionals ! Compute the unrestricted version of the correlation energy for hybrid functionals
@ -35,18 +35,18 @@ subroutine unrestricted_hybrid_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho
aC = 0.81d0 aC = 0.81d0
call unrestricted_lda_correlation_energy(3,nEns,wEns,nGrid,weight,rho,EcLDA) call lda_correlation_energy(3,nEns,wEns,nGrid,weight,rho,EcLDA)
call unrestricted_gga_correlation_energy(1,nEns,wEns,nGrid,weight,rho,drho,EcGGA) call gga_correlation_energy(1,nEns,wEns,nGrid,weight,rho,drho,EcGGA)
Ec(:) = EcLDA(:) + aC*(EcGGA(:) - EcLDA(:)) Ec(:) = EcLDA(:) + aC*(EcGGA(:) - EcLDA(:))
case(3) case(3)
call unrestricted_gga_correlation_energy(1,nEns,wEns,nGrid,weight,rho,drho,Ec) call gga_correlation_energy(1,nEns,wEns,nGrid,weight,rho,drho,Ec)
case(4) case(4)
call unrestricted_gga_correlation_energy(2,nEns,wEns,nGrid,weight,rho,drho,Ec) call gga_correlation_energy(2,nEns,wEns,nGrid,weight,rho,drho,Ec)
case default case default
@ -55,4 +55,4 @@ subroutine unrestricted_hybrid_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho
end select end select
end subroutine unrestricted_hybrid_correlation_energy end subroutine hybrid_correlation_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_hybrid_correlation_individual_energy(DFA,nEns,wEns,nGrid,weight, & subroutine hybrid_correlation_individual_energy(DFA,nEns,wEns,nGrid,weight, &
rhow,drhow,rho,drho,LZc,Ec) rhow,drhow,rho,drho,LZc,Ec)
! Compute the hybrid correlation energy for individual states ! Compute the hybrid correlation energy for individual states
@ -39,4 +39,4 @@ subroutine unrestricted_hybrid_correlation_individual_energy(DFA,nEns,wEns,nGrid
end select end select
end subroutine unrestricted_hybrid_correlation_individual_energy end subroutine hybrid_correlation_individual_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_hybrid_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc) subroutine hybrid_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
! Compute the correlation potential for hybrid functionals ! Compute the correlation potential for hybrid functionals
@ -42,8 +42,8 @@ subroutine unrestricted_hybrid_correlation_potential(DFA,nEns,wEns,nGrid,weight,
aC = 0.81d0 aC = 0.81d0
call unrestricted_lda_correlation_potential(3,nEns,wEns,nGrid,weight,nBas,AO,rho,FcLDA) call lda_correlation_potential(3,nEns,wEns,nGrid,weight,nBas,AO,rho,FcLDA)
call unrestricted_gga_correlation_potential(1,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,FcGGA) call gga_correlation_potential(1,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,FcGGA)
Fc(:,:,:) = FcLDA(:,:,:) + aC*(FcGGA(:,:,:) - FcLDA(:,:,:)) Fc(:,:,:) = FcLDA(:,:,:) + aC*(FcGGA(:,:,:) - FcLDA(:,:,:))
@ -51,13 +51,13 @@ subroutine unrestricted_hybrid_correlation_potential(DFA,nEns,wEns,nGrid,weight,
allocate(FcGGA(nBas,nBas,nspin)) allocate(FcGGA(nBas,nBas,nspin))
call unrestricted_gga_correlation_potential(1,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc) call gga_correlation_potential(1,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
case(4) case(4)
allocate(FcGGA(nBas,nBas,nspin)) allocate(FcGGA(nBas,nBas,nspin))
call unrestricted_gga_correlation_potential(2,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc) call gga_correlation_potential(2,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
case default case default
@ -66,4 +66,4 @@ subroutine unrestricted_hybrid_correlation_potential(DFA,nEns,wEns,nGrid,weight,
end select end select
end subroutine unrestricted_hybrid_correlation_potential end subroutine hybrid_correlation_potential

View File

@ -1,4 +1,4 @@
subroutine unrestricted_hybrid_exchange_derivative_discontinuity(DFA,nEns,wEns,nCC,aCC,nGrid,weight,rhow,& subroutine hybrid_exchange_derivative_discontinuity(DFA,nEns,wEns,nCC,aCC,nGrid,weight,rhow,&
Cx_choice,doNcentered,ExDD) Cx_choice,doNcentered,ExDD)
! Compute the exchange part of the derivative discontinuity for hybrid functionals ! Compute the exchange part of the derivative discontinuity for hybrid functionals
@ -50,4 +50,4 @@ subroutine unrestricted_hybrid_exchange_derivative_discontinuity(DFA,nEns,wEns,n
end select end select
end subroutine unrestricted_hybrid_exchange_derivative_discontinuity end subroutine hybrid_exchange_derivative_discontinuity

View File

@ -1,4 +1,4 @@
subroutine unrestricted_hybrid_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P,FxHF, & subroutine hybrid_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P,FxHF, &
rho,drho,Cx_choice,doNcentered,Ex) rho,drho,Cx_choice,doNcentered,Ex)
! Compute the exchange energy for hybrid functionals ! Compute the exchange energy for hybrid functionals
@ -37,17 +37,17 @@ subroutine unrestricted_hybrid_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aC
case (1) case (1)
call unrestricted_fock_exchange_energy(nBas,P,FxHF,Ex) call fock_exchange_energy(nBas,P,FxHF,Ex)
case (2) case (2)
a0 = 0.20d0 a0 = 0.20d0
aX = 0.72d0 aX = 0.72d0
call unrestricted_lda_exchange_energy(1,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,& call lda_exchange_energy(1,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,&
rho,Cx_choice,doNcentered,ExLDA) rho,Cx_choice,doNcentered,ExLDA)
call unrestricted_gga_exchange_energy(2,nEns,wEns,nGrid,weight,rho,drho,ExGGA) call gga_exchange_energy(2,nEns,wEns,nGrid,weight,rho,drho,ExGGA)
call unrestricted_fock_exchange_energy(nBas,P,FxHF,ExHF) call fock_exchange_energy(nBas,P,FxHF,ExHF)
Ex = ExLDA & Ex = ExLDA &
+ a0*(ExHF - ExLDA) & + a0*(ExHF - ExLDA) &
@ -55,15 +55,15 @@ subroutine unrestricted_hybrid_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aC
case (3) case (3)
call unrestricted_gga_exchange_energy(2,nEns,wEns,nGrid,weight,rho,drho,ExGGA) call gga_exchange_energy(2,nEns,wEns,nGrid,weight,rho,drho,ExGGA)
call unrestricted_fock_exchange_energy(nBas,P,FxHF,ExHF) call fock_exchange_energy(nBas,P,FxHF,ExHF)
Ex = 0.5d0*ExHF + 0.5d0*ExGGA Ex = 0.5d0*ExHF + 0.5d0*ExGGA
case (4) case (4)
call unrestricted_gga_exchange_energy(3,nEns,wEns,nGrid,weight,rho,drho,ExGGA) call gga_exchange_energy(3,nEns,wEns,nGrid,weight,rho,drho,ExGGA)
call unrestricted_fock_exchange_energy(nBas,P,FxHF,ExHF) call fock_exchange_energy(nBas,P,FxHF,ExHF)
Ex = 0.25d0*ExHF + 0.75d0*ExGGA Ex = 0.25d0*ExHF + 0.75d0*ExGGA
@ -74,4 +74,4 @@ subroutine unrestricted_hybrid_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aC
end select end select
end subroutine unrestricted_hybrid_exchange_energy end subroutine hybrid_exchange_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_hybrid_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,nBas,ERI,Pw,rhow,drhow, & subroutine hybrid_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,nBas,ERI,Pw,rhow,drhow, &
P,rho,drho,LZx,Ex) P,rho,drho,LZx,Ex)
! Compute the hybrid exchange energy for individual states ! Compute the hybrid exchange energy for individual states
@ -34,7 +34,7 @@ subroutine unrestricted_hybrid_exchange_individual_energy(DFA,nEns,wEns,nGrid,we
case (1) case (1)
call unrestricted_fock_exchange_individual_energy(nBas,nEns,Pw,P,ERI,LZx,Ex) call fock_exchange_individual_energy(nBas,nEns,Pw,P,ERI,LZx,Ex)
case default case default
@ -43,4 +43,4 @@ subroutine unrestricted_hybrid_exchange_individual_energy(DFA,nEns,wEns,nGrid,we
end select end select
end subroutine unrestricted_hybrid_exchange_individual_energy end subroutine hybrid_exchange_individual_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_hybrid_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P, & subroutine hybrid_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,P, &
ERI,AO,dAO,rho,drho,Cx_choice,doNcentered,Fx,FxHF) ERI,AO,dAO,rho,drho,Cx_choice,doNcentered,Fx,FxHF)
! Compute the exchange potential for hybrid functionals ! Compute the exchange potential for hybrid functionals
@ -44,7 +44,7 @@ subroutine unrestricted_hybrid_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC
case(1) case(1)
call unrestricted_fock_exchange_potential(nBas,P,ERI,FxHF) call fock_exchange_potential(nBas,P,ERI,FxHF)
Fx(:,:) = FxHF(:,:) Fx(:,:) = FxHF(:,:)
case(2) case(2)
@ -54,10 +54,10 @@ subroutine unrestricted_hybrid_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC
a0 = 0.20d0 a0 = 0.20d0
aX = 0.72d0 aX = 0.72d0
call unrestricted_lda_exchange_potential(1,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight, & call lda_exchange_potential(1,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight, &
nBas,AO,rho,Cx_choice,doNcentered,FxLDA) nBas,AO,rho,Cx_choice,doNcentered,FxLDA)
call unrestricted_gga_exchange_potential(2,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,FxGGA) call gga_exchange_potential(2,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,FxGGA)
call unrestricted_fock_exchange_potential(nBas,P,ERI,FxHF) call fock_exchange_potential(nBas,P,ERI,FxHF)
Fx(:,:) = FxLDA(:,:) & Fx(:,:) = FxLDA(:,:) &
+ a0*(FxHF(:,:) - FxLDA(:,:)) & + a0*(FxHF(:,:) - FxLDA(:,:)) &
@ -67,8 +67,8 @@ subroutine unrestricted_hybrid_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC
allocate(FxGGA(nBas,nBas)) allocate(FxGGA(nBas,nBas))
call unrestricted_gga_exchange_potential(2,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,FxGGA) call gga_exchange_potential(2,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,FxGGA)
call unrestricted_fock_exchange_potential(nBas,P,ERI,FxHF) call fock_exchange_potential(nBas,P,ERI,FxHF)
Fx(:,:) = 0.5d0*FxHF(:,:) + 0.5d0*FxGGA(:,:) Fx(:,:) = 0.5d0*FxHF(:,:) + 0.5d0*FxGGA(:,:)
@ -76,8 +76,8 @@ subroutine unrestricted_hybrid_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC
allocate(FxGGA(nBas,nBas)) allocate(FxGGA(nBas,nBas))
call unrestricted_gga_exchange_potential(3,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,FxGGA) call gga_exchange_potential(3,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,FxGGA)
call unrestricted_fock_exchange_potential(nBas,P,ERI,FxHF) call fock_exchange_potential(nBas,P,ERI,FxHF)
Fx(:,:) = 0.25d0*FxHF(:,:) + 0.75d0*FxGGA(:,:) Fx(:,:) = 0.25d0*FxHF(:,:) + 0.75d0*FxGGA(:,:)
@ -88,4 +88,4 @@ subroutine unrestricted_hybrid_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC
end select end select
end subroutine unrestricted_hybrid_exchange_potential end subroutine hybrid_exchange_potential

View File

@ -1,4 +1,4 @@
subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,dAO, & subroutine individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,dAO, &
T,V,ERI,ENuc,eKS,Pw,rhow,drhow,J,Fx,FxHF,Fc,P,rho,drho,occnum,Cx_choice,doNcentered,Ew) T,V,ERI,ENuc,eKS,Pw,rhow,drhow,J,Fx,FxHF,Fc,P,rho,drho,occnum,Cx_choice,doNcentered,Ew)
! Compute unrestricted individual energies as well as excitation energies ! Compute unrestricted individual energies as well as excitation energies
@ -118,7 +118,7 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
LZH(:) = 0d0 LZH(:) = 0d0
EH(:,:) = 0d0 EH(:,:) = 0d0
call unrestricted_hartree_individual_energy(nBas,nEns,Pw,P,ERI,LZH,EH) call hartree_individual_energy(nBas,nEns,Pw,P,ERI,LZH,EH)
!------------------------------------------------------------------------ !------------------------------------------------------------------------
! Individual exchange energy ! Individual exchange energy
@ -126,7 +126,7 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
LZx(:) = 0d0 LZx(:) = 0d0
Ex(:,:) = 0d0 Ex(:,:) = 0d0
call unrestricted_exchange_individual_energy(x_rung,x_DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,ERI, & call exchange_individual_energy(x_rung,x_DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,ERI, &
Pw,rhow,drhow,P,rho,drho,Cx_choice,doNcentered,LZx,Ex) Pw,rhow,drhow,P,rho,drho,Cx_choice,doNcentered,LZx,Ex)
!------------------------------------------------------------------------ !------------------------------------------------------------------------
@ -135,25 +135,25 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
LZc(:) = 0d0 LZc(:) = 0d0
Ec(:,:) = 0d0 Ec(:,:) = 0d0
call unrestricted_correlation_individual_energy(c_rung,c_DFA,LDA_centered,nEns,wEns,nGrid,weight, & call correlation_individual_energy(c_rung,c_DFA,LDA_centered,nEns,wEns,nGrid,weight, &
rhow,drhow,rho,drho,LZc,Ec) rhow,drhow,rho,drho,LZc,Ec)
!------------------------------------------------------------------------ !------------------------------------------------------------------------
! Compute auxiliary energies ! Compute auxiliary energies
!------------------------------------------------------------------------ !------------------------------------------------------------------------
call unrestricted_auxiliary_energy(nBas,nEns,eKS,occnum,Eaux) call auxiliary_energy(nBas,nEns,eKS,occnum,Eaux)
!------------------------------------------------------------------------ !------------------------------------------------------------------------
! Compute derivative discontinuities ! Compute derivative discontinuities
!------------------------------------------------------------------------ !------------------------------------------------------------------------
do ispin=1,nspin do ispin=1,nspin
call unrestricted_exchange_derivative_discontinuity(x_rung,x_DFA,nEns,wEns,nCC,aCC,nGrid,weight, & call exchange_derivative_discontinuity(x_rung,x_DFA,nEns,wEns,nCC,aCC,nGrid,weight, &
rhow(:,ispin),drhow(:,:,ispin),Cx_choice,doNcentered,ExDD(ispin,:)) rhow(:,ispin),drhow(:,:,ispin),Cx_choice,doNcentered,ExDD(ispin,:))
end do end do
call unrestricted_correlation_derivative_discontinuity(c_rung,c_DFA,nEns,wEns,nGrid,weight,rhow,drhow,EcDD) call correlation_derivative_discontinuity(c_rung,c_DFA,nEns,wEns,nGrid,weight,rhow,drhow,EcDD)
! Scaling derivative discontinuity for N-centered ensembles ! Scaling derivative discontinuity for N-centered ensembles
@ -232,7 +232,7 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
! Dump results ! Dump results
!------------------------------------------------------------------------ !------------------------------------------------------------------------
call print_unrestricted_individual_energy(nEns,ENuc,Ew,ET,EV,EH,Ex,Ec,Eaux,LZH,LZx,LZc,ExDD,EcDD,E, & call print_individual_energy(nEns,ENuc,Ew,ET,EV,EH,Ex,Ec,Eaux,LZH,LZx,LZc,ExDD,EcDD,E, &
Om,OmH,Omx,Omc,Omaux,OmxDD,OmcDD) Om,OmH,Omx,Omc,Omaux,OmxDD,OmcDD)
end subroutine unrestricted_individual_energy end subroutine individual_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_lda_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec) subroutine lda_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec)
! Compute the correlation LDA part of the derivative discontinuity ! Compute the correlation LDA part of the derivative discontinuity
@ -49,4 +49,4 @@ subroutine unrestricted_lda_correlation_derivative_discontinuity(DFA,nEns,wEns,n
end select end select
end subroutine unrestricted_lda_correlation_derivative_discontinuity end subroutine lda_correlation_derivative_discontinuity

View File

@ -1,4 +1,4 @@
subroutine unrestricted_lda_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,Ec) subroutine lda_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,Ec)
! Select the unrestrited version of the LDA correlation functional ! Select the unrestrited version of the LDA correlation functional
@ -24,23 +24,23 @@ subroutine unrestricted_lda_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,Ec
case (1) case (1)
call UW38_lda_correlation_energy(nGrid,weight,rho,Ec) call W38_lda_correlation_energy(nGrid,weight,rho,Ec)
case (2) case (2)
call UPW92_lda_correlation_energy(nGrid,weight,rho,Ec) call PW92_lda_correlation_energy(nGrid,weight,rho,Ec)
case (3) case (3)
call UVWN3_lda_correlation_energy(nGrid,weight,rho,Ec) call VWN3_lda_correlation_energy(nGrid,weight,rho,Ec)
case (4) case (4)
call UVWN5_lda_correlation_energy(nGrid,weight,rho,Ec) call VWN5_lda_correlation_energy(nGrid,weight,rho,Ec)
case (5) case (5)
call UC16_lda_correlation_energy(nGrid,weight,rho,Ec) call C16_lda_correlation_energy(nGrid,weight,rho,Ec)
case default case default
@ -49,4 +49,4 @@ subroutine unrestricted_lda_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,Ec
end select end select
end subroutine unrestricted_lda_correlation_energy end subroutine lda_correlation_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_lda_correlation_individual_energy(DFA,LDA_centered,nEns,wEns,nGrid,weight,rhow,rho,LZc,Ec) subroutine lda_correlation_individual_energy(DFA,LDA_centered,nEns,wEns,nGrid,weight,rhow,rho,LZc,Ec)
! Compute LDA correlation energy for individual states ! Compute LDA correlation energy for individual states
@ -27,19 +27,19 @@ subroutine unrestricted_lda_correlation_individual_energy(DFA,LDA_centered,nEns,
case (1) case (1)
! call UW38_lda_correlation_individual_energy(nGrid,weight,rhow,rho,LZc,Ec) ! call W38_lda_correlation_individual_energy(nGrid,weight,rhow,rho,LZc,Ec)
case (2) case (2)
! call UPW92_lda_correlation_individual_energy(nGrid,weight,rhow,rho,LZc,Ec) ! call PW92_lda_correlation_individual_energy(nGrid,weight,rhow,rho,LZc,Ec)
case (3) case (3)
! call UVWN3_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,LZc,Ec) ! call VWN3_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,LZc,Ec)
case (4) case (4)
call UVWN5_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,LZc,Ec) call VWN5_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,LZc,Ec)
case default case default
@ -48,4 +48,4 @@ subroutine unrestricted_lda_correlation_individual_energy(DFA,LDA_centered,nEns,
end select end select
end subroutine unrestricted_lda_correlation_individual_energy end subroutine lda_correlation_individual_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_lda_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,rho,Fc) subroutine lda_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,rho,Fc)
! Select LDA correlation potential ! Select LDA correlation potential
@ -28,23 +28,23 @@ include 'parameters.h'
case (1) case (1)
call UW38_lda_correlation_potential(nGrid,weight(:),nBas,AO(:,:),rho(:,:),Fc(:,:,:)) call W38_lda_correlation_potential(nGrid,weight(:),nBas,AO(:,:),rho(:,:),Fc(:,:,:))
case (2) case (2)
call UPW92_lda_correlation_potential(nGrid,weight(:),nBas,AO(:,:),rho(:,:),Fc(:,:,:)) call PW92_lda_correlation_potential(nGrid,weight(:),nBas,AO(:,:),rho(:,:),Fc(:,:,:))
case (3) case (3)
call UVWN3_lda_correlation_potential(nGrid,weight(:),nBas,AO(:,:),rho(:,:),Fc(:,:,:)) call VWN3_lda_correlation_potential(nGrid,weight(:),nBas,AO(:,:),rho(:,:),Fc(:,:,:))
case (4) case (4)
call UVWN5_lda_correlation_potential(nGrid,weight(:),nBas,AO(:,:),rho(:,:),Fc(:,:,:)) call VWN5_lda_correlation_potential(nGrid,weight(:),nBas,AO(:,:),rho(:,:),Fc(:,:,:))
case (5) case (5)
call UC16_lda_correlation_potential(nGrid,weight(:),nBas,AO(:,:),rho(:,:),Fc(:,:,:)) call C16_lda_correlation_potential(nGrid,weight(:),nBas,AO(:,:),rho(:,:),Fc(:,:,:))
case default case default
@ -53,4 +53,4 @@ include 'parameters.h'
end select end select
end subroutine unrestricted_lda_correlation_potential end subroutine lda_correlation_potential

View File

@ -1,4 +1,4 @@
subroutine unrestricted_lda_exchange_derivative_discontinuity(DFA,nEns,wEns,nCC,aCC,nGrid,weight,rhow,& subroutine lda_exchange_derivative_discontinuity(DFA,nEns,wEns,nCC,aCC,nGrid,weight,rhow,&
Cx_choice,doNcentered,ExDD) Cx_choice,doNcentered,ExDD)
! Compute the exchange LDA part of the derivative discontinuity ! Compute the exchange LDA part of the derivative discontinuity
@ -37,7 +37,7 @@ subroutine unrestricted_lda_exchange_derivative_discontinuity(DFA,nEns,wEns,nCC,
case (2) case (2)
call UCC_lda_exchange_derivative_discontinuity(nEns,wEns,nCC,aCC,nGrid,weight,rhow,& call CC_lda_exchange_derivative_discontinuity(nEns,wEns,nCC,aCC,nGrid,weight,rhow,&
Cx_choice,doNcentered,ExDD) Cx_choice,doNcentered,ExDD)
case default case default
@ -47,4 +47,4 @@ subroutine unrestricted_lda_exchange_derivative_discontinuity(DFA,nEns,wEns,nCC,
end select end select
end subroutine unrestricted_lda_exchange_derivative_discontinuity end subroutine lda_exchange_derivative_discontinuity

View File

@ -1,4 +1,4 @@
subroutine unrestricted_lda_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,doNcentered,Ex) subroutine lda_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,doNcentered,Ex)
! Select LDA exchange functional ! Select LDA exchange functional
@ -29,11 +29,11 @@ subroutine unrestricted_lda_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,n
case (1) case (1)
call US51_lda_exchange_energy(nGrid,weight,rho,Ex) call S51_lda_exchange_energy(nGrid,weight,rho,Ex)
case (2) case (2)
call UCC_lda_exchange_energy(nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,doNcentered,Ex) call CC_lda_exchange_energy(nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,doNcentered,Ex)
case default case default
@ -43,4 +43,4 @@ subroutine unrestricted_lda_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,n
end select end select
end subroutine unrestricted_lda_exchange_energy end subroutine lda_exchange_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_lda_exchange_individual_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,rhow,& subroutine lda_exchange_individual_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,rhow,&
rho,Cx_choice,doNcentered,LZx,Ex) rho,Cx_choice,doNcentered,LZx,Ex)
! Compute LDA exchange energy for individual states ! Compute LDA exchange energy for individual states
@ -32,11 +32,11 @@ subroutine unrestricted_lda_exchange_individual_energy(DFA,LDA_centered,nEns,wEn
case (1) case (1)
call US51_lda_exchange_individual_energy(nEns,nGrid,weight,rhow,rho,LZx,Ex) call S51_lda_exchange_individual_energy(nEns,nGrid,weight,rhow,rho,LZx,Ex)
case (2) case (2)
call UCC_lda_exchange_individual_energy(nEns,wEns,nCC,aCC,nGrid,weight,rhow,rho, & call CC_lda_exchange_individual_energy(nEns,wEns,nCC,aCC,nGrid,weight,rhow,rho, &
Cx_choice,doNcentered,LZx,Ex) Cx_choice,doNcentered,LZx,Ex)
case default case default
@ -46,4 +46,4 @@ subroutine unrestricted_lda_exchange_individual_energy(DFA,LDA_centered,nEns,wEn
end select end select
end subroutine unrestricted_lda_exchange_individual_energy end subroutine lda_exchange_individual_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_lda_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho, & subroutine lda_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho, &
Cx_choice,doNcentered,Fx) Cx_choice,doNcentered,Fx)
! Select LDA correlation potential ! Select LDA correlation potential
@ -33,11 +33,11 @@ subroutine unrestricted_lda_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC,aC
case (1) case (1)
call US51_lda_exchange_potential(nGrid,weight,nBas,AO,rho,Fx) call S51_lda_exchange_potential(nGrid,weight,nBas,AO,rho,Fx)
case (2) case (2)
call UCC_lda_exchange_potential(nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho,Cx_choice,doNcentered,Fx) call CC_lda_exchange_potential(nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho,Cx_choice,doNcentered,Fx)
case default case default
@ -46,4 +46,4 @@ subroutine unrestricted_lda_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC,aC
end select end select
end subroutine unrestricted_lda_exchange_potential end subroutine lda_exchange_potential

View File

@ -1,4 +1,4 @@
subroutine unrestricted_mgga_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec) subroutine mgga_correlation_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,Ec)
! Compute the correlation MGGA part of the derivative discontinuity ! Compute the correlation MGGA part of the derivative discontinuity
@ -31,4 +31,4 @@ subroutine unrestricted_mgga_correlation_derivative_discontinuity(DFA,nEns,wEns,
end select end select
end subroutine unrestricted_mgga_correlation_derivative_discontinuity end subroutine mgga_correlation_derivative_discontinuity

View File

@ -1,4 +1,4 @@
subroutine unrestricted_mgga_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ec) subroutine mgga_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ec)
! Compute unrestricted MGGA correlation energy ! Compute unrestricted MGGA correlation energy
@ -33,4 +33,4 @@ subroutine unrestricted_mgga_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,d
end select end select
end subroutine unrestricted_mgga_correlation_energy end subroutine mgga_correlation_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_mgga_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc) subroutine mgga_correlation_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fc)
! Compute unrestricted MGGA correlation potential ! Compute unrestricted MGGA correlation potential
@ -35,4 +35,4 @@ subroutine unrestricted_mgga_correlation_potential(DFA,nEns,wEns,nGrid,weight,nB
end select end select
end subroutine unrestricted_mgga_correlation_potential end subroutine mgga_correlation_potential

View File

@ -1,4 +1,4 @@
subroutine unrestricted_mgga_exchange_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,drhow,ExDD) subroutine mgga_exchange_derivative_discontinuity(DFA,nEns,wEns,nGrid,weight,rhow,drhow,ExDD)
! Compute the exchange MGGA part of the derivative discontinuity ! Compute the exchange MGGA part of the derivative discontinuity
@ -33,4 +33,4 @@ subroutine unrestricted_mgga_exchange_derivative_discontinuity(DFA,nEns,wEns,nGr
end select end select
end subroutine unrestricted_mgga_exchange_derivative_discontinuity end subroutine mgga_exchange_derivative_discontinuity

View File

@ -1,4 +1,4 @@
subroutine unrestricted_mgga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ex) subroutine mgga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ex)
! Select MGGA exchange functional for energy calculation ! Select MGGA exchange functional for energy calculation
@ -29,4 +29,4 @@ subroutine unrestricted_mgga_exchange_energy(DFA,nEns,wEns,nGrid,weight,rho,drho
end select end select
end subroutine unrestricted_mgga_exchange_energy end subroutine mgga_exchange_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_mgga_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,LZx,Ex) subroutine mgga_exchange_individual_energy(DFA,nEns,wEns,nGrid,weight,rhow,drhow,rho,drho,LZx,Ex)
! Compute MGGA exchange energy for individual states ! Compute MGGA exchange energy for individual states
@ -33,4 +33,4 @@ subroutine unrestricted_mgga_exchange_individual_energy(DFA,nEns,wEns,nGrid,weig
end select end select
end subroutine unrestricted_mgga_exchange_individual_energy end subroutine mgga_exchange_individual_energy

View File

@ -1,4 +1,4 @@
subroutine unrestricted_mgga_exchange_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fx) subroutine mgga_exchange_potential(DFA,nEns,wEns,nGrid,weight,nBas,AO,dAO,rho,drho,Fx)
! Select MGGA exchange functional for potential calculation ! Select MGGA exchange functional for potential calculation
@ -33,4 +33,4 @@ subroutine unrestricted_mgga_exchange_potential(DFA,nEns,wEns,nGrid,weight,nBas,
end select end select
end subroutine unrestricted_mgga_exchange_potential end subroutine mgga_exchange_potential

View File

@ -1,4 +1,4 @@
subroutine print_unrestricted_individual_energy(nEns,ENuc,Ew,ET,EV,EH,Ex,Ec,Eaux,LZH,LZx,LZc,ExDD,EcDD,E, & subroutine print_individual_energy(nEns,ENuc,Ew,ET,EV,EH,Ex,Ec,Eaux,LZH,LZx,LZc,ExDD,EcDD,E, &
Om,OmH,Omx,Omc,Omaux,OmxDD,OmcDD) Om,OmH,Omx,Omc,Omaux,OmxDD,OmcDD)
! Print individual energies for eDFT calculation ! Print individual energies for eDFT calculation
@ -243,4 +243,4 @@ subroutine print_unrestricted_individual_energy(nEns,ENuc,Ew,ET,EV,EH,Ex,Ec,Eaux
write(*,'(A60)') '-------------------------------------------------' write(*,'(A60)') '-------------------------------------------------'
write(*,*) write(*,*)
end subroutine print_unrestricted_individual_energy end subroutine print_individual_energy

View File

@ -0,0 +1,54 @@
subroutine xc_potential_grid(nBas,nGrid,AO,rho,Fx,Vxgrid)
! Compute the exchange-correlation potential on the grid
implicit none
include 'parameters.h'
! Input variables
integer,intent(in) :: nBas, nGrid
double precision,intent(in) :: rho(nGrid,nspin)
double precision,intent(in) :: Fx(nBas,nBas,nspin)
double precision,intent(in) :: AO(nBas,nGrid)
! Local variables
integer :: mu,nu
integer :: ispin,iG
double precision :: r
double precision :: Fxgrid(nGrid,nspin)
! Output variables
double precision,intent(out) :: Vxgrid(nGrid)
! Compute Vx
Vxgrid(:) = 0d0
Fxgrid(:,:) = 0d0
do iG=1,nGrid
do ispin=1,nspin
do mu=1,nBas
do nu=1,nBas
r = max(0d0,rho(iG,ispin))
if(r > threshold) then
Fxgrid(iG,ispin) = Fxgrid(iG,ispin) + AO(mu,iG)*AO(nu,iG)*4d0/3d0*CxLSDA*r**(1d0/3d0)
endif
enddo
enddo
enddo
enddo
Vxgrid(:)=Fxgrid(:,1)+Fxgrid(:,2)
open(411, file = 'Vxgrid.dat', status = 'new')
do iG=1,nGrid
write(411,*) iG, Vxgrid(iG)
end do
close(411)
end subroutine xc_potential_grid