2022-01-07 09:13:38 +01:00
|
|
|
subroutine lda_exchange_energy(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,doNcentered,Ex)
|
2019-03-13 11:07:31 +01:00
|
|
|
|
|
|
|
! Select LDA exchange functional
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
2021-10-25 12:20:25 +02:00
|
|
|
integer,intent(in) :: DFA
|
2020-04-01 22:59:52 +02:00
|
|
|
logical,intent(in) :: LDA_centered
|
2019-03-13 11:07:31 +01:00
|
|
|
integer,intent(in) :: nEns
|
|
|
|
double precision,intent(in) :: wEns(nEns)
|
2021-11-24 10:25:48 +01:00
|
|
|
integer,intent(in) :: nCC
|
|
|
|
double precision,intent(in) :: aCC(nCC,nEns-1)
|
2019-03-13 11:07:31 +01:00
|
|
|
integer,intent(in) :: nGrid
|
|
|
|
double precision,intent(in) :: weight(nGrid)
|
|
|
|
double precision,intent(in) :: rho(nGrid)
|
2020-08-02 13:09:30 +02:00
|
|
|
integer,intent(in) :: Cx_choice
|
2021-11-24 10:25:48 +01:00
|
|
|
logical,intent(in) :: doNcentered
|
2019-03-13 11:07:31 +01:00
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
|
|
|
double precision,intent(out) :: Ex
|
|
|
|
|
|
|
|
! Select correlation functional
|
|
|
|
|
|
|
|
select case (DFA)
|
|
|
|
|
2021-10-25 12:20:25 +02:00
|
|
|
case (1)
|
2020-03-15 14:33:53 +01:00
|
|
|
|
2022-01-07 09:13:38 +01:00
|
|
|
call S51_lda_exchange_energy(nGrid,weight,rho,Ex)
|
2020-03-15 14:33:53 +01:00
|
|
|
|
2021-10-25 12:20:25 +02:00
|
|
|
case (2)
|
2020-07-02 14:27:38 +02:00
|
|
|
|
2022-01-07 09:13:38 +01:00
|
|
|
call CC_lda_exchange_energy(nEns,wEns,nCC,aCC,nGrid,weight,rho,Cx_choice,doNcentered,Ex)
|
2020-07-02 14:27:38 +02:00
|
|
|
|
2019-03-13 11:07:31 +01:00
|
|
|
case default
|
|
|
|
|
2021-02-14 21:54:10 +01:00
|
|
|
call print_warning('!!! LDA exchange energy not available !!!')
|
|
|
|
|
2019-03-13 11:07:31 +01:00
|
|
|
stop
|
|
|
|
|
|
|
|
end select
|
|
|
|
|
2022-01-07 09:13:38 +01:00
|
|
|
end subroutine lda_exchange_energy
|