4
1
mirror of https://github.com/pfloos/quack synced 2024-06-29 08:24:53 +02:00

lda centered

This commit is contained in:
Pierre-Francois Loos 2020-03-29 18:34:09 +02:00
parent 3e72d87adf
commit 438a36a82c
12 changed files with 90 additions and 132 deletions

View File

@ -1,5 +1,5 @@
# nAt nEla nElb nCore nRyd # nAt nEla nElb nCore nRyd
2 1 1 0 0 2 1 1 0 0
# Znuc x y z # Znuc x y z
H 0. 0. 0. H 0.0 0.0 0.0
H 0. 0. 1.4 H 0.0 0.0 1.4

View File

@ -1,62 +1,27 @@
1 14 1 5
S 3 S 3
1 82.6400000 0.0020060 1 13.0100000 0.0196850
2 12.4100000 0.0153430 2 1.9620000 0.1379770
3 2.8240000 0.0755790 3 0.4446000 0.4781480
S 1 S 1
1 0.7977000 1.0000000 1 0.1220000 1.0000000
S 1 S 1
1 0.2581000 1.0000000 1 0.0297400 1.0000000
S 1
1 0.0898900 1.0000000
S 1
1 0.0236300 1.0000000
P 1 P 1
1 2.2920000 1.0000000 1 0.7270000 1.0000000
P 1 P 1
1 0.8380000 1.0000000 1 0.1410000 1.0000000
P 1 2 5
1 0.2920000 1.0000000
P 1
1 0.0848000 1.0000000
D 1
1 2.0620000 1.0000000
D 1
1 0.6620000 1.0000000
D 1
1 0.1900000 1.0000000
F 1
1 1.3970000 1.0000000
F 1
1 0.3600000 1.0000000
2 14
S 3 S 3
1 82.6400000 0.0020060 1 13.0100000 0.0196850
2 12.4100000 0.0153430 2 1.9620000 0.1379770
3 2.8240000 0.0755790 3 0.4446000 0.4781480
S 1 S 1
1 0.7977000 1.0000000 1 0.1220000 1.0000000
S 1 S 1
1 0.2581000 1.0000000 1 0.0297400 1.0000000
S 1
1 0.0898900 1.0000000
S 1
1 0.0236300 1.0000000
P 1 P 1
1 2.2920000 1.0000000 1 0.7270000 1.0000000
P 1 P 1
1 0.8380000 1.0000000 1 0.1410000 1.0000000
P 1
1 0.2920000 1.0000000
P 1
1 0.0848000 1.0000000
D 1
1 2.0620000 1.0000000
D 1
1 0.6620000 1.0000000
D 1
1 0.1900000 1.0000000
F 1
1 1.3970000 1.0000000
F 1
1 0.3600000 1.0000000

View File

@ -1,10 +1,10 @@
# Restricted or unrestricted KS calculation # Restricted or unrestricted KS calculation
LIM-RKS LIM-RKS
# exchange rung: # exchange rung:
# Hartree = 0 # Hartree = 0
# LDA = 1: RS51,RMFL20 # LDA = 1: RS51,RMFL20
# GGA = 2: RB88 # GGA = 2: RB88
# Hybrid = 4 # Hybrid = 4
# Hartree-Fock = 666 # Hartree-Fock = 666
1 RMFL20 1 RMFL20
# correlation rung: # correlation rung:
@ -13,12 +13,12 @@
# GGA = 2: # GGA = 2:
# Hybrid = 4: # Hybrid = 4:
# Hartree-Fock = 666 # Hartree-Fock = 666
666 HF 1 RVWN5
# quadrature grid SG-n # quadrature grid SG-n
1 1
# Number of states in ensemble (nEns) # Number of states in ensemble (nEns)
2 2
# Ensemble weights: wEns(1),...,wEns(nEns-1) # Ensemble weights: wEns(1),...,wEns(nEns-1)
1.00000 0.00000 0.5 0.0
# GOK-DFT: maxSCF thresh DIIS n_diis guess_type ortho_type # GOK-DFT: maxSCF thresh DIIS n_diis guess_type ortho_type
32 0.00001 T 5 1 1 32 0.00001 T 5 1 1

View File

@ -1,5 +1,5 @@
# nAt nEla nElb nCore nRyd # nAt nEla nElb nCore nRyd
2 1 1 0 0 2 1 1 0 0
# Znuc x y z # Znuc x y z
H 0. 0. 0. H 0.0 0.0 0.0
H 0. 0. 1.4 H 0.0 0.0 1.4

View File

@ -1,62 +1,27 @@
1 14 1 5
S 3 S 3
1 82.6400000 0.0020060 1 13.0100000 0.0196850
2 12.4100000 0.0153430 2 1.9620000 0.1379770
3 2.8240000 0.0755790 3 0.4446000 0.4781480
S 1 S 1
1 0.7977000 1.0000000 1 0.1220000 1.0000000
S 1 S 1
1 0.2581000 1.0000000 1 0.0297400 1.0000000
S 1
1 0.0898900 1.0000000
S 1
1 0.0236300 1.0000000
P 1 P 1
1 2.2920000 1.0000000 1 0.7270000 1.0000000
P 1 P 1
1 0.8380000 1.0000000 1 0.1410000 1.0000000
P 1 2 5
1 0.2920000 1.0000000
P 1
1 0.0848000 1.0000000
D 1
1 2.0620000 1.0000000
D 1
1 0.6620000 1.0000000
D 1
1 0.1900000 1.0000000
F 1
1 1.3970000 1.0000000
F 1
1 0.3600000 1.0000000
2 14
S 3 S 3
1 82.6400000 0.0020060 1 13.0100000 0.0196850
2 12.4100000 0.0153430 2 1.9620000 0.1379770
3 2.8240000 0.0755790 3 0.4446000 0.4781480
S 1 S 1
1 0.7977000 1.0000000 1 0.1220000 1.0000000
S 1 S 1
1 0.2581000 1.0000000 1 0.0297400 1.0000000
S 1
1 0.0898900 1.0000000
S 1
1 0.0236300 1.0000000
P 1 P 1
1 2.2920000 1.0000000 1 0.7270000 1.0000000
P 1 P 1
1 0.8380000 1.0000000 1 0.1410000 1.0000000
P 1
1 0.2920000 1.0000000
P 1
1 0.0848000 1.0000000
D 1
1 2.0620000 1.0000000
D 1
1 0.6620000 1.0000000
D 1
1 0.1900000 1.0000000
F 1
1 1.3970000 1.0000000
F 1
1 0.3600000 1.0000000

View File

@ -16,6 +16,7 @@ subroutine RMFL20_lda_correlation_energy(nEns,wEns,nGrid,weight,rho,Ec)
! Local variables ! Local variables
logical :: LDA_centered = .true.
integer :: iEns integer :: iEns
double precision :: EcLDA double precision :: EcLDA
double precision,allocatable :: aMFL(:,:) double precision,allocatable :: aMFL(:,:)
@ -51,11 +52,11 @@ subroutine RMFL20_lda_correlation_energy(nEns,wEns,nGrid,weight,rho,Ec)
call RVWN5_lda_correlation_energy(nGrid,weight(:),rho(:),EcLDA) call RVWN5_lda_correlation_energy(nGrid,weight(:),rho(:),EcLDA)
do iEns=1,nEns if(LDA_centered) then
do iEns=1,nEns
EceLDA(iEns) = EceLDA(iEns) + EcLDA - EceLDA(1) EceLDA(iEns) = EceLDA(iEns) + EcLDA - EceLDA(1)
end do
end do end if
! Weight-denpendent functional for ensembles ! Weight-denpendent functional for ensembles

View File

@ -16,6 +16,7 @@ subroutine RMFL20_lda_correlation_individual_energy(nEns,wEns,nGrid,weight,rhow,
! Local variables ! Local variables
logical :: LDA_centered = .true.
integer :: iEns integer :: iEns
double precision :: EcLDA double precision :: EcLDA
double precision,allocatable :: aMFL(:,:) double precision,allocatable :: aMFL(:,:)
@ -51,9 +52,11 @@ subroutine RMFL20_lda_correlation_individual_energy(nEns,wEns,nGrid,weight,rhow,
call RVWN5_lda_correlation_individual_energy(nGrid,weight(:),rhow(:),rho(:),EcLDA) call RVWN5_lda_correlation_individual_energy(nGrid,weight(:),rhow(:),rho(:),EcLDA)
do iEns=1,nEns if(LDA_centered) then
EceLDA(iEns) = EceLDA(iEns) + EcLDA - EceLDA(1) do iEns=1,nEns
end do EceLDA(iEns) = EceLDA(iEns) + EcLDA - EceLDA(1)
end do
end if
! Weight-denpendent functional for ensembles ! Weight-denpendent functional for ensembles

View File

@ -17,6 +17,7 @@ include 'parameters.h'
! Local variables ! Local variables
logical :: LDA_centered = .true.
integer :: iEns integer :: iEns
double precision,allocatable :: aMFL(:,:) double precision,allocatable :: aMFL(:,:)
double precision,allocatable :: FcLDA(:,:) double precision,allocatable :: FcLDA(:,:)
@ -54,11 +55,11 @@ include 'parameters.h'
call RVWN5_lda_correlation_potential(nGrid,weight,nBas,AO,rho,FcLDA) call RVWN5_lda_correlation_potential(nGrid,weight,nBas,AO,rho,FcLDA)
do iEns=1,nEns if(LDA_centered) then
do iEns=1,nEns
FceLDA(:,:,iEns) = FceLDA(:,:,iEns) + FcLDA(:,:) - FceLDA(:,:,1) FceLDA(:,:,iEns) = FceLDA(:,:,iEns) + FcLDA(:,:) - FceLDA(:,:,1)
end do
end do end if
! Weight-denpendent functional for ensembles ! Weight-denpendent functional for ensembles

View File

@ -29,7 +29,7 @@ subroutine RMFL20_lda_exchange_derivative_discontinuity(nEns,wEns,nGrid,weight,r
Cx(1) = Cx0 Cx(1) = Cx0
Cx(2) = Cx1 Cx(2) = Cx1
! Compute correlation energy for ground, singly-excited and doubly-excited states ! Compute correlation energy for ground- and doubly-excited states
do iEns=1,nEns do iEns=1,nEns
@ -42,7 +42,9 @@ subroutine RMFL20_lda_exchange_derivative_discontinuity(nEns,wEns,nGrid,weight,r
do iEns=1,nEns do iEns=1,nEns
do jEns=1,nEns do jEns=1,nEns
ExDD(iEns) = ExDD(iEns) + (Kronecker_delta(iEns,jEns) - wEns(jEns))*(dExdw(jEns) - dExdw(1)) ExDD(iEns) = ExDD(iEns) + (Kronecker_delta(iEns,jEns) - wEns(jEns))* &
(dExdw(jEns) - dExdw(1))
! (cos(2d0*pi*wEns(jEns)) + 1d0)
end do end do
end do end do

View File

@ -16,6 +16,7 @@ subroutine RMFL20_lda_exchange_energy(nEns,wEns,nGrid,weight,rho,Ex)
! Local variables ! Local variables
logical :: LDA_centered = .true.
integer :: iG integer :: iG
double precision :: Cxw double precision :: Cxw
double precision :: r double precision :: r
@ -26,7 +27,13 @@ subroutine RMFL20_lda_exchange_energy(nEns,wEns,nGrid,weight,rho,Ex)
! Weight-denepdent Cx coefficient ! Weight-denepdent Cx coefficient
Cxw = CxLDA + wEns(2)*(Cx1 - Cx0) if(LDA_centered) then
Cxw = CxLDA + (Cx1 - Cx0)*wEns(2)
else
Cxw = wEns(1)*Cx0 + wEns(2)*Cx1
end if
! Cxw = CxLDA + (Cx1 - Cx0)*wEns(2)*(cos(2d0*pi*wEns(2)) + 1d0)
! Compute LDA exchange energy ! Compute LDA exchange energy

View File

@ -16,6 +16,7 @@ subroutine RMFL20_lda_exchange_individual_energy(nEns,wEns,nGrid,weight,rhow,rho
! Local variables ! Local variables
logical :: LDA_centered = .true.
integer :: iG integer :: iG
double precision :: Cxw double precision :: Cxw
double precision :: r,rI double precision :: r,rI
@ -27,7 +28,13 @@ subroutine RMFL20_lda_exchange_individual_energy(nEns,wEns,nGrid,weight,rhow,rho
! Weight-dependent Cx coefficient for RMFL20 exchange functional ! Weight-dependent Cx coefficient for RMFL20 exchange functional
Cxw = CxLDA + wEns(2)*(Cx1 - Cx0) if(LDA_centered) then
Cxw = CxLDA + (Cx1 - Cx0)*wEns(2)
else
Cxw = wEns(1)*Cx0 + wEns(2)*Cx1
end if
! Cxw = CxLDA + (Cx1 - Cx0)*wEns(2)*(cos(2d0*pi*wEns(2)) + 1d0)
! Compute LDA exchange matrix in the AO basis ! Compute LDA exchange matrix in the AO basis

View File

@ -17,6 +17,7 @@ subroutine RMFL20_lda_exchange_potential(nEns,wEns,nGrid,weight,nBas,AO,rho,Fx)
! Local variables ! Local variables
logical :: LDA_centered = .true.
integer :: mu,nu,iG integer :: mu,nu,iG
double precision :: Cxw double precision :: Cxw
double precision :: r,vAO double precision :: r,vAO
@ -27,7 +28,13 @@ subroutine RMFL20_lda_exchange_potential(nEns,wEns,nGrid,weight,nBas,AO,rho,Fx)
! Weight-dependent Cx coefficient for RMFL20 exchange functional ! Weight-dependent Cx coefficient for RMFL20 exchange functional
Cxw = CxLDA + wEns(2)*(Cx1 - Cx0) if(LDA_centered) then
Cxw = CxLDA + (Cx1 - Cx0)*wEns(2)
else
Cxw = wEns(1)*Cx0 + wEns(2)*Cx1
end if
! Cxw = CxLDA + (Cx1 - Cx0)*wEns(2)*(cos(2d0*pi*wEns(2)) + 1d0)
! Compute LDA exchange matrix in the AO basis ! Compute LDA exchange matrix in the AO basis