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 V.
4*
5* $Id$
6*
7#define FNL_VWN_5
8c xc_vwn_a contains the restricted calculation stuff.
9#include "xc_vwn_a.fh"
10c
11c     Compute the function deltaEc(rs,zeta) function and its derivatives
12c     wrt rs and zeta for the spin-unrestricted case - the rest has the
13c     same form for all VWN functionals and is handled in the header files.
14c
15            dec_rsz = devwn_rsz
16            d1dec_rsz(1) = d1devwn_rsz(1)
17            d1dec_rsz(2) = d1devwn_rsz(2)
18#ifdef SECOND_DERIV
19            d2dec_rsz(1) = d2devwn_rsz(1)
20            d2dec_rsz(2) = d2devwn_rsz(2)
21            d2dec_rsz(3) = d2devwn_rsz(3)
22#endif
23#ifdef THIRD_DERIV
24            d3dec_rsz(1) = d3devwn_rsz(1)
25            d3dec_rsz(2) = d3devwn_rsz(2)
26            d3dec_rsz(3) = d3devwn_rsz(3)
27            d3dec_rsz(4) = d3devwn_rsz(4)
28#endif
29c
30c xc_vwn_a contains the unrestricted calculation stuff.
31#include "xc_vwn_b.fh"
32c
33#ifndef SECOND_DERIV
34#define SECOND_DERIV
35c
36c     Compile source again for the 2nd derivative case
37c
38#include "xc_vwn_5.F"
39#endif
40#ifndef THIRD_DERIV
41#define THIRD_DERIV
42c
43c     Compile source again for the 3rd derivative case
44c
45#include "xc_vwn_5.F"
46#endif
47