mirror of
https://github.com/pfloos/quack
synced 2024-11-09 15:43:56 +01:00
45 lines
1013 B
Fortran
45 lines
1013 B
Fortran
subroutine 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 LYP_gga_correlation_energy(nGrid,weight,rho,drho,Ec)
|
|
|
|
case (2)
|
|
|
|
call PBE_gga_correlation_energy(nGrid,weight,rho,drho,Ec)
|
|
|
|
case default
|
|
|
|
call print_warning('!!! GGA correlation energy not available !!!')
|
|
stop
|
|
|
|
end select
|
|
|
|
end subroutine gga_correlation_energy
|