4
1
mirror of https://github.com/pfloos/quack synced 2024-06-23 13:42:19 +02:00
quack/src/eDFT/restricted_lda_exchange_energy.f90

49 lines
1.2 KiB
Fortran
Raw Normal View History

subroutine restricted_lda_exchange_energy(DFA,LDA_centered,nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,rho,Ex,Cx_choice)
2019-03-13 11:07:31 +01:00
! Select LDA exchange functional
implicit none
include 'parameters.h'
! Input variables
character(len=12),intent(in) :: DFA
logical,intent(in) :: LDA_centered
2019-03-13 11:07:31 +01:00
integer,intent(in) :: nEns
double precision,intent(in) :: wEns(nEns)
double precision,intent(in) :: aCC_w1(3)
double precision,intent(in) :: aCC_w2(3)
2019-03-13 11:07:31 +01:00
integer,intent(in) :: nGrid
double precision,intent(in) :: weight(nGrid)
double precision,intent(in) :: rho(nGrid)
integer,intent(in) :: Cx_choice
2019-03-13 11:07:31 +01:00
! Output variables
double precision,intent(out) :: Ex
! Select correlation functional
select case (DFA)
2020-07-06 20:57:27 +02:00
case ('S51')
2019-03-13 11:07:31 +01:00
2020-03-16 22:08:04 +01:00
call RS51_lda_exchange_energy(nGrid,weight,rho,Ex)
2019-03-13 11:07:31 +01:00
2020-07-06 20:57:27 +02:00
case ('MFL20')
2020-03-15 08:23:01 +01:00
call RMFL20_lda_exchange_energy(LDA_centered,nEns,wEns,nGrid,weight,rho,Ex)
2020-03-15 08:23:01 +01:00
2020-07-06 20:57:27 +02:00
case ('CC')
2020-04-06 19:40:42 +02:00
call RCC_lda_exchange_energy(nEns,wEns,aCC_w1,aCC_w2,nGrid,weight,rho,Ex,Cx_choice)
2020-04-06 19:40:42 +02:00
2019-03-13 11:07:31 +01:00
case default
2020-07-06 20:57:27 +02:00
call print_warning('!!! LDA restricted exchange functional not available !!!')
2019-03-13 11:07:31 +01:00
stop
end select
2020-07-06 20:57:27 +02:00
end subroutine restricted_lda_exchange_energy