10
1
mirror of https://github.com/pfloos/quack synced 2024-12-24 13:23:38 +01:00
QuAcK/src/eDFT/unrestricted_gga_correlation_energy.f90

45 lines
1.0 KiB
Fortran

subroutine unrestricted_gga_correlation_energy(DFA,nEns,wEns,nGrid,weight,rho,drho,Ec)
! Compute unrestricted GGA correlation energy
implicit none
include 'parameters.h'
! Input variables
integer,intent(in) :: DFA
integer,intent(in) :: nEns
double precision,intent(in) :: wEns(nEns)
integer,intent(in) :: nGrid
double precision,intent(in) :: weight(nGrid)
double precision,intent(in) :: rho(nGrid,nspin)
double precision,intent(in) :: drho(ncart,nGrid,nspin)
! Local variables
integer :: iG
double precision :: ra,rb,ga,gb
! Output variables
double precision :: Ec(nsp)
select case (DFA)
case (1)
call ULYP_gga_correlation_energy(nGrid,weight,rho,drho,Ec)
case (2)
call UPBE_gga_correlation_energy(nGrid,weight,rho,drho,Ec)
case default
call print_warning('!!! GGA correlation energy not available !!!')
stop
end select
end subroutine unrestricted_gga_correlation_energy