~nickpapior/siesta/trunk-kpoint-dos

« back to all changes in this revision

Viewing changes to Pseudo/atom/excorr.f

  • Committer: Alberto Garcia
  • Date: 2004-11-25 18:49:43 UTC
  • Revision ID: Arch-1:siesta@uam.es--2004%siesta-devel--reference--0.11--patch-1
Siesta 0.11 -- imported from CVS
Import from cvs using date instead of siesta-0-11-release tag, since
the Pseudo structure was not properly integrated at that time and
did not get the tag.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
c
2
 
c $Id: excorr.f,v 1.2 1997/05/22 17:32:12 wdpgaara Exp $
3
 
c
4
 
c $Log: excorr.f,v $
5
 
c Revision 1.2  1997/05/22 17:32:12  wdpgaara
6
 
c Moving from RCSfiles to ATM_1_0
7
 
c
8
 
c Revision 1.1.1.1  1997/01/07 08:38:54  wdpgaara
9
 
c Froyen-Troullier-Martins-AG atom code
10
 
c
11
 
c Revision 1.1  1991/12/14  00:34:49  alberto
12
 
c Initial revision
 
2
c $Id: excorr.f,v 1.3 1999/02/26 14:26:43 wdpgaara Exp $
13
3
c
14
4
      subroutine excorr(id,cdd,cdu,cdc,vod,vou,vxc,vc,exc,ec)
15
5
c
70
60
     &                 vod(nrmax), vou(nrmax)
71
61
c
72
62
C     .. Local Scalars ..
73
 
      double precision a0, a1, alb, aln, alp, an, b1, be, beta, bn,
74
 
     &                 cdsum, ecf, ecp, ect, ehart, excf, excp,
75
 
     &                 exct, exf, exp, ftrd, fz, fzp, pi, rs,
 
63
      double precision a0, alb, aln, alp,  be, beta,
 
64
     &                 cdsum, ecf, ecp, ect, excf, excp,
 
65
     &                 exct, exf, exp_var, ftrd, fz, fzp, pi, rs,
76
66
     &                 rslog, sb, sqrs, te, tftm, trd, vcd, vcf,
77
67
     &                 vcp, vcu, vxcd, vxcf, vxcp, vxcu, vxf, 
78
68
     &                 lda_xpot, x, z
82
72
      external ext
83
73
C     ..
84
74
C     .. Intrinsic Functions ..
85
 
      intrinsic abs, atan, log, sqrt
 
75
      intrinsic atan, log, sqrt
86
76
C     ..
87
77
      logical leqi
88
78
      external leqi
141
131
c      exchange (only use (xa))
142
132
c
143
133
         lda_xpot = -3*alp/(pi*a0*rs)
144
 
         exp = 3*lda_xpot/4
 
134
         exp_var = 3*lda_xpot/4
145
135
c
146
136
c        Relativistic correction to exchange
147
137
c
150
140
            sb = sqrt(1+beta*beta)
151
141
            alb = log(beta+sb)
152
142
            lda_xpot = lda_xpot*(-pfive+opf*alb/(beta*sb))
153
 
            exp = exp*(one-opf*((beta*sb-alb)/beta**2)**2)
 
143
            exp_var = exp_var*(one-opf*((beta*sb-alb)/beta**2)**2)
154
144
         end if
155
145
c
156
146
   60    continue
157
147
c
158
148
         vxf = 2**trd*lda_xpot
159
 
         exf = 2**trd*exp
 
149
         exf = 2**trd*exp_var
160
150
         vcp = zero
161
151
         ecp = zero
162
152
         vcf = zero
254
244
         vxcf = vxf + vcf
255
245
         vxcd = vxcp
256
246
         vxcu = vxcp
257
 
         excp = exp + ecp
 
247
         excp = exp_var + ecp
258
248
         excf = exf + ecf
259
249
         vcd = vcp
260
250
         vcu = vcp