2021-12-01 10:54:51 +01:00
|
|
|
subroutine unrestricted_lda_exchange_potential(DFA,LDA_centered,nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho, &
|
|
|
|
Cx_choice,doNcentered,Fx)
|
2020-07-06 20:57:27 +02:00
|
|
|
|
|
|
|
! Select LDA correlation potential
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
|
|
|
logical,intent(in) :: LDA_centered
|
2021-10-25 12:20:25 +02:00
|
|
|
integer,intent(in) :: DFA
|
2020-07-06 20:57:27 +02: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)
|
2020-07-06 20:57:27 +02:00
|
|
|
integer,intent(in) :: nGrid
|
|
|
|
double precision,intent(in) :: weight(nGrid)
|
|
|
|
integer,intent(in) :: nBas
|
|
|
|
double precision,intent(in) :: AO(nBas,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
|
2020-07-06 20:57:27 +02:00
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
|
|
|
double precision,intent(out) :: Fx(nBas,nBas)
|
|
|
|
|
|
|
|
! Select exchange functional
|
|
|
|
|
|
|
|
select case (DFA)
|
|
|
|
|
2021-10-25 12:20:25 +02:00
|
|
|
case (1)
|
2020-07-06 20:57:27 +02:00
|
|
|
|
|
|
|
call US51_lda_exchange_potential(nGrid,weight,nBas,AO,rho,Fx)
|
|
|
|
|
2021-10-25 12:20:25 +02:00
|
|
|
case (2)
|
2020-07-06 20:57:27 +02:00
|
|
|
|
2021-12-01 10:54:51 +01:00
|
|
|
call UCC_lda_exchange_potential(nEns,wEns,nCC,aCC,nGrid,weight,nBas,AO,rho,Cx_choice,doNcentered,Fx)
|
2020-07-06 20:57:27 +02:00
|
|
|
|
|
|
|
case default
|
|
|
|
|
2021-02-14 21:54:10 +01:00
|
|
|
call print_warning('!!! LDA exchange potential not available !!!')
|
2020-07-06 20:57:27 +02:00
|
|
|
stop
|
|
|
|
|
|
|
|
end select
|
|
|
|
|
|
|
|
end subroutine unrestricted_lda_exchange_potential
|