5
C> Implementation of the M05 correlation functional
12
C> \brief The M05 correlation functional
14
C> The M05 functional [1,2] is a meta-GGA of which this evaluates
15
C> the correlation component.
19
C> [1] Y Zhao, NE Schultz, DG Truhlar,
20
C> "Exchange-correlation functional with broad accuracy for
21
C> metallic and nonmetallic compounds, kinetics, and
22
C> noncovalent interactions",
23
C> J.Chem.Phys. <b>123</b>, 161103-161106 (2005), DOI:
24
C> <a href="http://dx.doi.org/10.1063/1.2126975">
25
C> 10.1063/1.2126975</a>.
27
C> [2] Y Zhao, NE Schultz, DG Truhlar,
28
C> "Design of density functionals by combining the method of
29
C> constraint satisfaction parametrization for thermochemistry,
30
C> thermochemical kinetics, and noncovalent interactions",
31
C> J.Chem.Theory.Comput. <b>2</b>, 364-382 (2006), DOI:
32
C> <a href="http://dx.doi.org/10.1021/ct0502763">
33
C> 10.1021/ct0502763</a>.
36
c M05 or M05-2X exchange functional
38
C utilizes ingredients:
40
c delrho - gradient of density
41
c tau - K.S kinetic energy density
42
c tauU - uniform-gas KE density
46
c [a] Zhao, Y.; Schultz, N. E.; Truhlar, D. G. J. Chem. Phys. 2005, 123, 161103;
47
c Note that in this communication we interchanged cCab,i and cCss,i in Table 1.
48
c [b] Zhao, Y.; Schultz, N. E.; Truhlar, D. G. J. Chem. Theory Comput. 2006, in press.
51
Subroutine nwxc_x_m05(param, tol_rho, ipol, nq, wght, rho, rgamma,
52
& tau, func, Amat, Cmat, Mmat)
54
c$Id: xc_xm05.F 22535 2012-05-31 01:22:18Z edo $
58
#include "nwxc_param.fh"
61
c Input and other parameters
63
double precision param(*) !< [Input] Parameters of functional
64
!< - param(1): \f$ a_{1} \f$
65
!< - param(2): \f$ a_{2} \f$
66
!< - param(3): \f$ a_{3} \f$
67
!< - param(4): \f$ a_{4} \f$
68
!< - param(5): \f$ a_{5} \f$
69
!< - param(6): \f$ a_{6} \f$
70
!< - param(7): \f$ a_{7} \f$
71
!< - param(8): \f$ a_{8} \f$
72
!< - param(9): \f$ a_{9} \f$
73
!< - param(10): \f$ a_{10} \f$
74
!< - param(11): \f$ a_{11} \f$
75
double precision tol_rho !< [Input] The lower limit on the density
76
integer nq !< [Input] The number of points
77
integer ipol !< [Input] The number of spin channels
78
double precision wght !< [Input] The weight of the functional
82
double precision rho(nq,*) !< [Input] The density
84
c Charge Density Gradient Norm
86
double precision rgamma(nq,*) !< [Input] The density gradient norm
88
c Kinetic Energy Density
90
double precision tau(nq,*) !< [Input] The kinetic energy density
94
double precision func(*) !< [Output] The functional value
96
c Sampling Matrices for the XC Potential
98
double precision Amat(nq,*) !< [Output] Derivative wrt density
99
double precision Cmat(nq,*) !< [Output] Derivative wrt rgamma
100
double precision Mmat(nq,*) !< [Output] Derivative wrt tau
105
double precision at1, at2, at3, at4, at5, at6, at7, at8, at9
106
double precision at, at10, at11, C1, C2, fL, fNL
107
double precision rrho, rho43, rho13, rhoo, rho53
108
double precision Gamma2, Gamma
109
double precision TauUEG, Tsig, Wsig, W1, W2, W3, W4, W5, W6
110
double precision W7, W8, W9, W10, W11, Fsig
112
c kinetic energy density or tau
114
double precision tauN,tauu,DTol
115
double precision F83, F23, F53, F43, F13, F1o3
116
double precision F1o4, F2o3, F3o2, F4o3, F4o9, F3o5
117
double precision One, Two, Three, Four, Five, Six, Seven, Eight
118
double precision Nine, F10, F11
119
double precision Cs, Ax, P32, s, s2, En, Ed, E, dE, dEn, dEd
121
c functional derivatives below FFFFFFFFFFFF
123
double precision dFdW, dWdT, dTdR, dTdTau, dGGAdR, dFdR
124
double precision dFdTau, dGGAdG,tauW
126
c functional derivatives above FFFFFFFFFFFF
129
parameter( pi = 3.1415926535897932384626433832795d0 )
132
parameter (F1o3=1.d0/3.d0, F1o4=1.d0/4.d0, F2o3=2.d0/3.d0,
133
& F3o2=3.d0/2.d0,F13=1.d0/3.d0)
134
parameter (F4o3=4.d0/3.d0, F4o9=4.d0/9.d0, F3o5=3.d0/5.d0)
135
parameter (F83=8.d0/3.0d0, F23=2.0d0/3.d0, F53=5.d0/3.d0)
136
parameter (One=1.0d0, Two=2.0d0, Three=3.0d0, Four=4.0d0,
137
& Five=5.0d0,Six=6.0d0, Seven=7.0d0,
138
& Eight=8.0d0, Nine=9.0d0,F10=10.d0, F11=11.d0)
152
c if (ijzy.eq.1) then
165
c elseif (ijzy.eq.2) then
166
c Parameters for M05-2X
181
C1 = 0.2195149727645171d0
185
C Scale factors for local and non-local contributions.
189
Cs = 0.5d0/(3.0d0*pi*pi)**F13
190
P32 = (3.d0*pi**2)**F23
193
Ax = (-0.75d0)*(3.0d0/pi)**F13
199
c ======> SPIN-RESTRICTED <======
206
if (rho(n,R_T).lt.DTol) goto 10
209
rrho = 1d0/rhoo ! reciprocal of rho
217
c Gamma2 = delrho(n,1,1)*delrho(n,1,1) +
218
c & delrho(n,2,1)*delrho(n,2,1) +
219
c & delrho(n,3,1)*delrho(n,3,1)
220
Gamma2 = rgamma(n,G_TT)
221
Gamma = dsqrt(Gamma2)
222
if (gamma.lt.DTol) goto 10
223
TauUEG=0.3d0*P32*rho53
225
Wsig =(Tsig-One)/(Tsig+One)
237
Fsig =at*(at1*W1+ at2*W2 + at3*W3
238
& + at4*W4 + at5*W5 + at6*W6 + at7*W7
239
& + at8*W8 + at9*W9 + at10*W10 + at11*W11)
246
c Ex = Ex + rho43*Ax*(fL+fNL*E)*(One+Fsig)*qwght(n)
247
func(n)=func(n)+rho43*Ax*(fL+fNL*E)*(One+Fsig)
249
c functional derivatives
253
dE = (dEn*Ed-En*dEd)/(Ed*Ed)
254
dFdW = at*(at1 + Two*at2*W1 + Three*at3*W2
255
& + Four*at4*W3 + Five*at5*W4
256
& + Six*at6*W5 + Seven*at7*W6
257
& + Eight*at8*W7 + Nine*at9*W8
258
& + F10*at10*W9 + F11*at11*W10)
259
dWdT = Two/((One + Tsig)**2)
260
dTdR = (0.5d0*P32*rho13*rho13)/tauu
261
dTdTau = -TauUEG/tauu**2
262
dGGAdR = F4o3*rho13*Ax*(fL+fNL*(E-s*dE))
263
dFdR = dFdW*dWdT*dTdR
264
dFdTau=dFdW*dWdT*dTdTau
265
dGGAdG =(fNL*dE*s/(Two*Gamma2))
266
Amat(n,D1_RA) = Amat(n,D1_RA) + dGGAdR*(One+Fsig)
267
& + (fL+fNL*E)*Ax*rho43*dFdR
268
Cmat(n,D1_GAA)= Cmat(n,D1_GAA) +
269
& Two*dGGAdG*Ax*rho43*(One+Fsig)
270
Mmat(n,D1_TA)= Mmat(n,D1_TA)
271
& + 0.5d0*rho43*Ax*(fL+fNL*E)*dFdTau
278
c UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUnrestricted
281
c ======> SPIN-UNRESTRICTED <======
284
c use spin density functional theory ie n-->2n
285
c Ex=(1/2)Ex[2*alpha] + (1/2)Ex[2*beta]
288
if (rho(n,R_A)+rho(n,R_B).lt.DTol) goto 20
292
if (rho(n,R_A).lt.0.5d0*DTol) goto 25
293
rhoo = Two*rho(n,R_A)
295
rrho = 1.0d0/rhoo ! reciprocal of rho
303
TauUEG=0.3d0*P32*rho53
305
Wsig =(Tsig-One)/(Tsig+One)
317
Fsig =at*(at1*W1+ at2*W2 + at3*W3
318
& + at4*W4 + at5*W5 + at6*W6 + at7*W7
319
& + at8*W8 + at9*W9 + at10*W10 + at11*W11)
322
c Gamma2 = delrho(n,1,1)*delrho(n,1,1) +
323
c & delrho(n,2,1)*delrho(n,2,1) +
324
c & delrho(n,3,1)*delrho(n,3,1)
325
Gamma2 = rgamma(n,G_AA)
327
Gamma = dsqrt(Gamma2)
328
if (gamma.lt.DTol) goto 25
335
c Ex = Ex + rho43*Ax*(fL+fNL*E)*(One+Fsig)*0.5d0*qwght(n)
336
func(n)= func(n)+rho43*Ax*(fL+fNL*E)*(One+Fsig)*.5d0
338
c functional derivatives
342
dE = (dEn*Ed-En*dEd)/(Ed*Ed)
343
dFdW = at*(at1 + Two*at2*W1 + Three*at3*W2
344
& + Four*at4*W3 + Five*at5*W4
345
& + Six*at6*W5 + Seven*at7*W6
346
& + Eight*at8*W7 + Nine*at9*W8
347
& + F10*at10*W9 + F11*at11*W10)
348
dWdT = Two/((One + Tsig)**2)
349
dTdR = Two*(0.5d0*P32*rho13*rho13)/tauu
350
dTdTau = -Two*TauUEG/tauu**2
351
dGGAdR = Two*F4o3*rho13*Ax*(fL+fNL*(E-s*dE))
352
dFdR = dFdW*dWdT*dTdR
353
dFdTau=dFdW*dWdT*dTdTau
354
dGGAdG =Four*(fNL*dE*s/(Two*Gamma2))
356
Amat(n,D1_RA) = Amat(n,D1_RA) + (dGGAdR*(One+Fsig)
357
& + (fL+fNL*E)*Ax*rho43*dFdR)*0.5d0
358
Cmat(n,D1_GAA)= Cmat(n,D1_GAA) +
359
& dGGAdG*Ax*rho43*(One+Fsig)*0.5d0
360
Mmat(n,D1_TA)= Mmat(n,D1_TA) +
361
& 0.5d0*0.5d0*rho43*Ax*(fL+fNL*E)*dFdTau
363
c write (*,*) "Ex,Amat(n,1),Cmat(n,1)",
364
c & Ex,Amat(n,1),Cmat(n,1)
375
if (rho(n,R_B).lt.0.5d0*DTol) goto 20
376
rhoo = Two*rho(n,R_B)
378
rrho = 1.0d0/rhoo ! reciprocal of rho
386
TauUEG=0.3d0*P32*rho53
388
Wsig =(Tsig-One)/(Tsig+One)
400
Fsig =at*(at1*W1+ at2*W2 + at3*W3
401
& + at4*W4 + at5*W5 + at6*W6 + at7*W7
402
& + at8*W8 + at9*W9 + at10*W10 + at11*W11)
405
c Gamma2 = delrho(n,1,2)*delrho(n,1,2) +
406
c & delrho(n,2,2)*delrho(n,2,2) +
407
c & delrho(n,3,2)*delrho(n,3,2)
408
Gamma2 = rgamma(n,G_BB)
410
Gamma = dsqrt(Gamma2)
411
if (gamma.lt.DTol) goto 20
417
c Ex = Ex + rho43*Ax*(fL+fNL*E)*(One+Fsig)*0.5d0*qwght(n)
418
func(n)= func(n)+rho43*Ax*(fL+fNL*E)*(One+Fsig)*.5d0
420
c functional derivatives
424
dE = (dEn*Ed-En*dEd)/(Ed*Ed)
425
dFdW = at*(at1 + Two*at2*W1 + Three*at3*W2
426
& + Four*at4*W3 + Five*at5*W4
427
& + Six*at6*W5 + Seven*at7*W6
428
& + Eight*at8*W7 + Nine*at9*W8
429
& + F10*at10*W9 + F11*at11*W10)
430
dWdT = Two/((One + Tsig)**2)
431
dTdR = Two*(0.5d0*P32*rho13*rho13)/tauu
432
dTdTau = -Two*TauUEG/tauu**2
433
dGGAdR = Two*F4o3*rho13*Ax*(fL+fNL*(E-s*dE))
434
dFdR = dFdW*dWdT*dTdR
435
dFdTau=dFdW*dWdT*dTdTau
436
dGGAdG =Four*(fNL*dE*s/(Two*Gamma2))
438
Amat(n,D1_RB) = Amat(n,D1_RB) + (dGGAdR*(One+Fsig)
439
& + (fL+fNL*E)*Ax*rho43*dFdR)*0.5d0
440
Cmat(n,D1_GBB)= Cmat(n,D1_GBB) +
441
& dGGAdG*Ax*rho43*(One+Fsig)*0.5d0
442
Mmat(n,D1_TB)= Mmat(n,D1_TB) +
443
& 0.5d0*0.5d0*rho43*Ax*(fL+fNL*E)*dFdTau
456
Subroutine nwxc_x_m05_d2()
457
call errquit(' xm05: d2 not coded ',0,0)
462
c----------------------------------------------------------------------
463
C> \brief Calculate the dlDF correlation functional
465
C> Calculate the dlDF correlation functional [1].
467
C> ### References ###
469
C> [1] K Pernal, R Podeszwa, K Patkowski, K Szalewicz,
470
C> "Dispersionless density functional theory",
471
C> Phys.Rev.Lett. <b>103</b>, 263201-263204 (2009), DOI:
472
C> <a href="http://dx.doi.org/10.1103/PhysRevLett.103.263201">
473
C> 10.1103/PhysRevLett.103.263201</a>.
475
c dlDF exchange functional
477
C utilizes ingredients:
479
c delrho - gradient of density
480
c tau - K.S kinetic energy density
481
c tauU - uniform-gas KE density
484
c [a] Pernal,Podeszwa,Patkowski,Szalewicz, PRL 103 263201 (2009)
486
Subroutine nwxc_x_dldf(tol_rho, ipol, nq, wght, rho, rgamma, tau,
487
& func, Amat, Cmat, Mmat)
491
#include "nwxc_param.fh"
494
c Input and other parameters
496
double precision tol_rho !< [Input] The lower limit on the density
497
integer nq !< [Input] The number of points
498
integer ipol !< [Input] The number of spin channels
499
double precision wght !< [Input] The weight of the functional
503
double precision rho(nq,*) !< [Input] The density
505
c Charge Density Gradient Norm
507
double precision rgamma(nq,*) !< [Input] The density gradient norm
509
c Kinetic Energy Density
511
double precision tau(nq,*) !< [Input] The kinetic energy density
515
double precision func(*) !< [Output] The functional value
517
c Sampling Matrices for the XC Potential
519
double precision Amat(nq,*) !< [Output] Derivative wrt density
520
double precision Cmat(nq,*) !< [Output] Derivative wrt rgamma
521
double precision Mmat(nq,*) !< [Output] Derivative wrt tau
526
double precision at1, at2, at3, at4, at5, at6, at7, at8, at9
527
double precision at, at10, at11, C1, C2, fL, fNL
528
double precision rrho, rho43, rho13, rhoo, rho53
529
double precision Gamma2, Gamma
530
double precision TauUEG, Tsig, Wsig, W1, W2, W3, W4, W5, W6
531
double precision W7, W8, W9, W10, W11, Fsig
533
c kinetic energy density or tau
535
double precision tauN,tauu,DTol
536
double precision F83, F23, F53, F43, F13, F1o3
537
double precision F1o4, F2o3, F3o2, F4o3, F4o9, F3o5
538
double precision One, Two, Three, Four, Five, Six, Seven, Eight
539
double precision Nine, F10, F11
540
double precision Cs, Ax, P32, s, s2, En, Ed, E, dE, dEn, dEd
542
c functional derivatives below FFFFFFFFFFFF
544
double precision dFdW, dWdT, dTdR, dTdTau, dGGAdR, dFdR
545
double precision dFdTau, dGGAdG,tauW
547
c functional derivatives above FFFFFFFFFFFF
550
parameter( pi = 3.1415926535897932384626433832795d0 )
553
parameter (F1o3=1.d0/3.d0, F1o4=1.d0/4.d0, F2o3=2.d0/3.d0,
554
& F3o2=3.d0/2.d0,F13=1.d0/3.d0)
555
parameter (F4o3=4.d0/3.d0, F4o9=4.d0/9.d0, F3o5=3.d0/5.d0)
556
parameter (F83=8.d0/3.0d0, F23=2.0d0/3.d0, F53=5.d0/3.d0)
557
parameter (One=1.0d0, Two=2.0d0, Three=3.0d0, Four=4.0d0,
558
& Five=5.0d0,Six=6.0d0, Seven=7.0d0,
559
& Eight=8.0d0, Nine=9.0d0,F10=10.d0, F11=11.d0)
561
c Parameters for dlDF
580
C Scale factors for local and non-local contributions.
584
Cs = 0.5d0/(3.0d0*pi*pi)**F13
585
P32 = (3.d0*pi**2)**F23
588
Ax = (-0.75d0)*(3.0d0/pi)**F13
594
c ======> SPIN-RESTRICTED <======
601
if (rho(n,R_T).lt.DTol) goto 10
604
rrho = 1d0/rhoo ! reciprocal of rho
612
cedo if (taun.lt.sqrt(DTol)) goto 10
613
c Gamma2 = delrho(n,1,1)*delrho(n,1,1) +
614
c & delrho(n,2,1)*delrho(n,2,1) +
615
c & delrho(n,3,1)*delrho(n,3,1)
616
Gamma2 = rgamma(n,G_TT)
617
Gamma = dsqrt(Gamma2)
618
if (gamma.lt.DTol) goto 10
619
TauUEG=0.3d0*P32*rho53
621
Wsig =(Tsig-One)/(Tsig+One)
633
Fsig =at*(at1*W1+ at2*W2 + at3*W3
634
& + at4*W4 + at5*W5 + at6*W6 + at7*W7
635
& + at8*W8 + at9*W9 + at10*W10 + at11*W11)
642
c Ex = Ex + rho43*Ax*(fL+fNL*E)*(One+Fsig)*qwght(n)
643
func(n)=func(n)+rho43*Ax*(fL+fNL*E)*(One+Fsig)
645
c functional derivatives
649
dE = (dEn*Ed-En*dEd)/(Ed*Ed)
650
dFdW = at*(at1 + Two*at2*W1 + Three*at3*W2
651
& + Four*at4*W3 + Five*at5*W4
652
& + Six*at6*W5 + Seven*at7*W6
653
& + Eight*at8*W7 + Nine*at9*W8
654
& + F10*at10*W9 + F11*at11*W10)
655
dWdT = Two/((One + Tsig)**2)
656
dTdR = (0.5d0*P32*rho13*rho13)/tauu
657
dTdTau = -TauUEG/tauu**2
658
dGGAdR = F4o3*rho13*Ax*(fL+fNL*(E-s*dE))
659
dFdR = dFdW*dWdT*dTdR
660
dFdTau=dFdW*dWdT*dTdTau
661
dGGAdG =(fNL*dE*s/(Two*Gamma2))
662
Amat(n,D1_RA) = Amat(n,D1_RA) + dGGAdR*(One+Fsig)
663
& + (fL+fNL*E)*Ax*rho43*dFdR
664
Cmat(n,D1_GAA)= Cmat(n,D1_GAA) +
665
& Two*dGGAdG*Ax*rho43*(One+Fsig)
666
Mmat(n,D1_TA)= Mmat(n,D1_TA)
667
& + 0.5d0*rho43*Ax*(fL+fNL*E)*dFdTau
674
c UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUnrestricted
677
c ======> SPIN-UNRESTRICTED <======
680
c use spin density functional theory ie n-->2n
681
c Ex=(1/2)Ex[2*alpha] + (1/2)Ex[2*beta]
684
if (rho(n,R_A)+rho(n,R_B).lt.DTol) goto 20
688
if (rho(n,R_A).lt.0.5d0*DTol) goto 25
689
rhoo = Two*rho(n,R_A)
691
rrho = 1.0d0/rhoo ! reciprocal of rho
699
TauUEG=0.3d0*P32*rho53
701
Wsig =(Tsig-One)/(Tsig+One)
713
Fsig =at*(at1*W1+ at2*W2 + at3*W3
714
& + at4*W4 + at5*W5 + at6*W6 + at7*W7
715
& + at8*W8 + at9*W9 + at10*W10 + at11*W11)
718
c Gamma2 = delrho(n,1,1)*delrho(n,1,1) +
719
c & delrho(n,2,1)*delrho(n,2,1) +
720
c & delrho(n,3,1)*delrho(n,3,1)
721
Gamma2 = rgamma(n,G_AA)
723
Gamma = dsqrt(Gamma2)
724
if (gamma.lt.DTol) goto 25
731
c Ex = Ex + rho43*Ax*(fL+fNL*E)*(One+Fsig)*0.5d0*qwght(n)
732
func(n)= func(n)+rho43*Ax*(fL+fNL*E)*(One+Fsig)*.5d0
734
c functional derivatives
738
dE = (dEn*Ed-En*dEd)/(Ed*Ed)
739
dFdW = at*(at1 + Two*at2*W1 + Three*at3*W2
740
& + Four*at4*W3 + Five*at5*W4
741
& + Six*at6*W5 + Seven*at7*W6
742
& + Eight*at8*W7 + Nine*at9*W8
743
& + F10*at10*W9 + F11*at11*W10)
744
dWdT = Two/((One + Tsig)**2)
745
dTdR = Two*(0.5d0*P32*rho13*rho13)/tauu
746
dTdTau = -Two*TauUEG/tauu**2
747
dGGAdR = Two*F4o3*rho13*Ax*(fL+fNL*(E-s*dE))
748
dFdR = dFdW*dWdT*dTdR
749
dFdTau=dFdW*dWdT*dTdTau
750
dGGAdG =Four*(fNL*dE*s/(Two*Gamma2))
752
Amat(n,D1_RA) = Amat(n,D1_RA) + (dGGAdR*(One+Fsig)
753
& + (fL+fNL*E)*Ax*rho43*dFdR)*0.5d0
754
Cmat(n,D1_GAA)= Cmat(n,D1_GAA) +
755
& dGGAdG*Ax*rho43*(One+Fsig)*0.5d0
756
Mmat(n,D1_TA)= Mmat(n,D1_TA) +
757
& 0.5d0*0.5d0*rho43*Ax*(fL+fNL*E)*dFdTau
759
c write (*,*) "Ex,Amat(n,1),Cmat(n,1)",
760
c & Ex,Amat(n,1),Cmat(n,1)
771
if (rho(n,R_B).lt.0.5d0*DTol) goto 20
772
rhoo = Two*rho(n,R_B)
774
rrho = 1.0d0/rhoo ! reciprocal of rho
782
TauUEG=0.3d0*P32*rho53
784
Wsig =(Tsig-One)/(Tsig+One)
796
Fsig =at*(at1*W1+ at2*W2 + at3*W3
797
& + at4*W4 + at5*W5 + at6*W6 + at7*W7
798
& + at8*W8 + at9*W9 + at10*W10 + at11*W11)
801
c Gamma2 = delrho(n,1,2)*delrho(n,1,2) +
802
c & delrho(n,2,2)*delrho(n,2,2) +
803
c & delrho(n,3,2)*delrho(n,3,2)
804
Gamma2 = rgamma(n,G_BB)
806
Gamma = dsqrt(Gamma2)
807
if (gamma.lt.DTol) goto 20
813
c Ex = Ex + rho43*Ax*(fL+fNL*E)*(One+Fsig)*0.5d0*qwght(n)
814
func(n)=func(n)+rho43*Ax*(fL+fNL*E)*(One+Fsig)*.5d0
816
c functional derivatives
820
dE = (dEn*Ed-En*dEd)/(Ed*Ed)
821
dFdW = at*(at1 + Two*at2*W1 + Three*at3*W2
822
& + Four*at4*W3 + Five*at5*W4
823
& + Six*at6*W5 + Seven*at7*W6
824
& + Eight*at8*W7 + Nine*at9*W8
825
& + F10*at10*W9 + F11*at11*W10)
826
dWdT = Two/((One + Tsig)**2)
827
dTdR = Two*(0.5d0*P32*rho13*rho13)/tauu
828
dTdTau = -Two*TauUEG/tauu**2
829
dGGAdR = Two*F4o3*rho13*Ax*(fL+fNL*(E-s*dE))
830
dFdR = dFdW*dWdT*dTdR
831
dFdTau=dFdW*dWdT*dTdTau
832
dGGAdG =Four*(fNL*dE*s/(Two*Gamma2))
834
Amat(n,D1_RB) = Amat(n,D1_RB) + (dGGAdR*(One+Fsig)
835
& + (fL+fNL*E)*Ax*rho43*dFdR)*0.5d0
836
Cmat(n,D1_GBB)= Cmat(n,D1_GBB) +
837
& dGGAdG*Ax*rho43*(One+Fsig)*0.5d0
838
Mmat(n,D1_TB)= Mmat(n,D1_TB) +
839
& 0.5d0*0.5d0*rho43*Ax*(fL+fNL*E)*dFdTau
851
Subroutine nwxc_x_dldf_d2()
852
call errquit('xdldf: d2 not coded',0,0)