summaryrefslogtreecommitdiff
path: root/src/labat/ldaec.f
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2011-10-08 20:30:28 +0200
committerHenrik Rydberg <rydberg@euromail.se>2011-10-08 20:30:28 +0200
commit5df79c53745fde5d6c3340a2979b1429cd5892c1 (patch)
tree1a81af141708b826e9c61e8a04019994fcca8298 /src/labat/ldaec.f
Initial import of htcd system 1.0
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/labat/ldaec.f')
-rw-r--r--src/labat/ldaec.f21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/labat/ldaec.f b/src/labat/ldaec.f
new file mode 100644
index 0000000..01e18ca
--- /dev/null
+++ b/src/labat/ldaec.f
@@ -0,0 +1,21 @@
1 subroutine ldaec(rs,zet,ec)
2c uniform-gas correlation of perdew and wang 1991
3c calculates the local correlation energy within the lda approx.
4c input rs : seitz radius
5c input zet : relative spin polarization
6c output ec : correlation energy per electron
7 implicit double precision (a-h,o-z)
8 data gam,fzz/0.5198421d0,1.709921d0/
9 data thrd4/1.333333333333d0/
10 f = ((1.d0+zet)**thrd4+(1.d0-zet)**thrd4-2.d0)/gam
11 call gcor(0.0310907d0,0.21370d0,7.5957d0,3.5876d0,1.6382d0,
12 1 0.49294d0,1.00d0,rs,eu,eurs)
13 call gcor(0.01554535d0,0.20548d0,14.1189d0,6.1977d0,3.3662d0,
14 1 0.62517d0,1.00d0,rs,ep,eprs)
15 call gcor(0.0168869d0,0.11125d0,10.357d0,3.6231d0,0.88026d0,
16 1 0.49671d0,1.00d0,rs,alfm,alfrsm)
17c alfm is minus the spin stiffness alfc
18 z4 = zet**4
19 ec = eu*(1.d0-f*z4)+ep*f*z4-alfm*f*(1.d0-z4)/fzz
20 return
21 end