2020-03-17 22:39:04 +01:00
|
|
|
subroutine RMFL20_lda_correlation_derivative_discontinuity(nEns,wEns,nGrid,weight,rhow,EcDD)
|
2020-03-15 22:37:40 +01:00
|
|
|
|
|
|
|
! Compute the restricted version of the eLDA correlation part of the derivative discontinuity
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
|
|
|
integer,intent(in) :: nEns
|
|
|
|
double precision,intent(in) :: wEns(nEns)
|
|
|
|
integer,intent(in) :: nGrid
|
|
|
|
double precision,intent(in) :: weight(nGrid)
|
|
|
|
double precision,intent(in) :: rhow(nGrid)
|
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
|
|
|
integer :: iEns,jEns
|
|
|
|
double precision,allocatable :: aMFL(:,:)
|
2020-03-17 22:39:04 +01:00
|
|
|
double precision :: dEcdw(nEns)
|
2020-03-15 22:37:40 +01:00
|
|
|
double precision,external :: Kronecker_delta
|
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
2020-03-17 22:39:04 +01:00
|
|
|
double precision,intent(out) :: EcDD(nEns)
|
2020-03-15 22:37:40 +01:00
|
|
|
|
|
|
|
! Allocation
|
|
|
|
|
|
|
|
allocate(aMFL(3,nEns))
|
|
|
|
|
|
|
|
! Parameters for weight-dependent LDA correlation functional
|
|
|
|
|
|
|
|
aMFL(1,1) = -0.0238184d0
|
|
|
|
aMFL(2,1) = +0.00540994d0
|
|
|
|
aMFL(3,1) = +0.0830766d0
|
|
|
|
|
2020-04-26 23:17:27 +02:00
|
|
|
aMFL(1,2) = -0.0282814d0
|
|
|
|
aMFL(2,2) = +0.00273925d0
|
|
|
|
aMFL(3,2) = +0.0664914d0
|
|
|
|
|
|
|
|
aMFL(1,3) = -0.0144633d0
|
|
|
|
aMFL(2,3) = -0.0506019d0
|
|
|
|
aMFL(3,3) = +0.0331417d0
|
2020-03-15 22:37:40 +01:00
|
|
|
|
|
|
|
! Compute correlation energy for ground, singly-excited and doubly-excited states
|
|
|
|
|
|
|
|
do iEns=1,nEns
|
2020-03-31 22:15:45 +02:00
|
|
|
call restricted_elda_correlation_energy(aMFL(1:3,iEns),nGrid,weight(:),rhow(:),dEcdw(iEns))
|
2020-03-15 22:37:40 +01:00
|
|
|
end do
|
|
|
|
|
2020-03-17 22:39:04 +01:00
|
|
|
EcDD(:) = 0d0
|
2020-03-15 22:37:40 +01:00
|
|
|
|
|
|
|
do iEns=1,nEns
|
|
|
|
do jEns=1,nEns
|
|
|
|
|
2020-03-17 22:39:04 +01:00
|
|
|
EcDD(iEns) = EcDD(iEns) + (Kronecker_delta(iEns,jEns) - wEns(jEns))*(dEcdw(jEns) - dEcdw(1))
|
2020-03-15 22:37:40 +01:00
|
|
|
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
end subroutine RMFL20_lda_correlation_derivative_discontinuity
|