10
1
mirror of https://github.com/pfloos/quack synced 2024-12-25 05:43:41 +01:00
QuAcK/src/eDFT/unrestricted_lda_exchange_potential.f90

50 lines
1.3 KiB
Fortran
Raw Normal View History

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)
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)
integer,intent(in) :: Cx_choice
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