12subroutine fxcifc(fxctype,n,rho,rhoup,rhodn,fxc,fxcuu,fxcud,fxcdd)
15integer,
intent(in) :: fxctype(3),n
17real(8),
optional,
intent(in) :: rho(n),rhoup(n),rhodn(n)
18real(8),
optional,
intent(out) :: fxc(n),fxcuu(n),fxcud(n),fxcdd(n)
20real(8),
allocatable :: ra(:,:)
23 write(*,
'("Error(fxcifc): n < 1 : ",I8)') n
27select case(abs(fxctype(1)))
30 if (
present(fxcuu).and.
present(fxcud).and.
present(fxcdd))
then
34 else if (
present(fxc))
then
41 if (
present(rhoup).and.
present(rhodn).and.
present(fxcuu).and.
present(fxcud) &
42 .and.
present(fxcdd))
then
44 call fxc_pwca(n,rhoup,rhodn,fxcuu,fxcud,fxcdd)
45 else if (
present(rho).and.
present(fxc))
then
48 ra(1:n,1)=0.5d0*rho(1:n)
49 call fxc_pwca(n,ra(:,1),ra(:,1),ra(:,2),ra(:,3),ra(:,4))
50 fxc(1:n)=0.5d0*(ra(1:n,2)+ra(1:n,3))
57 if (
present(rhoup).and.
present(rhodn).and.
present(fxcuu).and.
present(fxcud) &
58 .and.
present(fxcdd))
then
60 call fxcifc_libxc(fxctype,n,rhoup=rhoup,rhodn=rhodn,fxcuu=fxcuu, &
61 fxcud=fxcud,fxcdd=fxcdd)
62 else if (
present(rho).and.
present(fxc))
then
70 write(*,
'("Error(fxcifc): response function unavailable for fxctype ",3I8)') &
78write(*,
'("Error(fxcifc): missing arguments for exchange-correlation type ",&
subroutine fxcifc_libxc(fxctype, n, rho, rhoup, rhodn, fxc, fxcuu, fxcud, fxcdd)
subroutine fxcifc(fxctype, n, rho, rhoup, rhodn, fxc, fxcuu, fxcud, fxcdd)