1c     Correlation energy and potential as determined via the local
2c     density functional of Vosko, Wilk and Nusair (Can. J. of Phys. 58,
3c     1200 (1980)), functional IV.
4*
5* $Id$
6*
7#define FNL_VWN_4
8#include "xc_vwn_a.fh"
9c
10c     Compute the function deltaEc(rs,zeta) function and its derivatives
11c     wrt rs and zeta for the spin-unrestricted case - the rest has the
12c     same form for all VWN functionals and is handled in the header files.
13c
14            dec_rsz = devwn_rsz
15            d1dec_rsz(1) = d1devwn_rsz(1)
16            d1dec_rsz(2) = d1devwn_rsz(2)
17#ifdef SECOND_DERIV
18            d2dec_rsz(1) = d2devwn_rsz(1)
19            d2dec_rsz(2) = d2devwn_rsz(2)
20            d2dec_rsz(3) = d2devwn_rsz(3)
21#endif
22#ifdef THIRD_DERIV
23            d3dec_rsz(1) = d3devwn_rsz(1)
24            d3dec_rsz(2) = d3devwn_rsz(2)
25            d3dec_rsz(3) = d3devwn_rsz(3)
26            d3dec_rsz(4) = d3devwn_rsz(4)
27#endif
28c
29#include "xc_vwn_b.fh"
30c
31#ifndef SECOND_DERIV
32#define SECOND_DERIV
33c
34c     Compile source again for the 2nd derivative case
35c
36#include "xc_vwn_4.F"
37#endif
38#ifndef THIRD_DERIV
39#define THIRD_DERIV
40c
41c     Compile source again for the 3rd derivative case
42c
43#include "xc_vwn_4.F"
44#endif
45