Skip to content

Commit e11d1a9

Browse files
committed
GIC functional working
1 parent 614bf19 commit e11d1a9

File tree

6 files changed

+96
-62
lines changed

6 files changed

+96
-62
lines changed

input/basis

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,43 @@
1-
1 6
2-
S 8
3-
1 17880.0000000 0.0007380
4-
2 2683.0000000 0.0056770
5-
3 611.5000000 0.0288830
6-
4 173.5000000 0.1085400
7-
5 56.6400000 0.2909070
8-
6 20.4200000 0.4483240
9-
7 7.8100000 0.2580260
10-
8 1.6530000 0.0150630
11-
S 8
12-
1 17880.0000000 -0.0001720
13-
2 2683.0000000 -0.0013570
14-
3 611.5000000 -0.0067370
15-
4 173.5000000 -0.0276630
16-
5 56.6400000 -0.0762080
17-
6 20.4200000 -0.1752270
18-
7 7.8100000 -0.1070380
19-
8 1.6530000 0.5670500
1+
1 9
2+
S 3
3+
1 33.8700000 0.0060680
4+
2 5.0950000 0.0453080
5+
3 1.1590000 0.2028220
206
S 1
21-
1 0.4869000 1.0000000
22-
P 3
23-
1 28.3900000 0.0460870
24-
2 6.2700000 0.2401810
25-
3 1.6950000 0.5087440
7+
1 0.3258000 1.0000000
8+
S 1
9+
1 0.1027000 1.0000000
10+
S 1
11+
1 0.0252600 1.0000000
12+
P 1
13+
1 1.4070000 1.0000000
14+
P 1
15+
1 0.3880000 1.0000000
2616
P 1
27-
1 0.4317000 1.0000000
17+
1 0.1020000 1.0000000
18+
D 1
19+
1 1.0570000 1.0000000
20+
D 1
21+
1 0.2470000 1.0000000
22+
2 9
23+
S 3
24+
1 33.8700000 0.0060680
25+
2 5.0950000 0.0453080
26+
3 1.1590000 0.2028220
27+
S 1
28+
1 0.3258000 1.0000000
29+
S 1
30+
1 0.1027000 1.0000000
31+
S 1
32+
1 0.0252600 1.0000000
33+
P 1
34+
1 1.4070000 1.0000000
35+
P 1
36+
1 0.3880000 1.0000000
37+
P 1
38+
1 0.1020000 1.0000000
39+
D 1
40+
1 1.0570000 1.0000000
2841
D 1
29-
1 2.2020000 1.0000000
42+
1 0.2470000 1.0000000
3043

input/dft

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
GOK-RKS
33
# exchange rung:
44
# Hartree = 0
5-
# LDA = 1: RS51,RMFL20,RGIC
5+
# LDA = 1: RS51,RMFL20
66
# GGA = 2: RB88
77
# Hybrid = 4
88
# Hartree-Fock = 666
9-
2 RB88
9+
1 RGIC
1010
# correlation rung:
1111
# Hartree = 0
1212
# LDA = 1: RVWN5,RMFL20
1313
# GGA = 2:
1414
# Hybrid = 4:
1515
# Hartree-Fock = 666
16-
1 RVWN5
16+
0 H
1717
# quadrature grid SG-n
1818
1
1919
# Number of states in ensemble (nEns)
2020
2
2121
# Ensemble weights: wEns(1),...,wEns(nEns-1)
22-
0.0
22+
0.625
2323
# GOK-DFT: maxSCF thresh DIIS n_diis guess_type ortho_type
2424
32 0.00001 T 5 1 1

input/molecule

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# nAt nEla nElb nCore nRyd
2-
1 5 5 0 0
2+
2 1 1 0 0
33
# Znuc x y z
4-
Ne 0.0 0.0 0.0
4+
H 0.0 0.0 0.0
5+
H 0.0 0.0 1.4

input/molecule.xyz

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
1
1+
2
22

3-
Ne 0.0000000000 0.0000000000 0.0000000000
3+
H 0.0000000000 0.0000000000 0.0000000000
4+
H 0.0000000000 0.0000000000 0.7408481486

input/weight

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,43 @@
1-
1 6
2-
S 8
3-
1 17880.0000000 0.0007380
4-
2 2683.0000000 0.0056770
5-
3 611.5000000 0.0288830
6-
4 173.5000000 0.1085400
7-
5 56.6400000 0.2909070
8-
6 20.4200000 0.4483240
9-
7 7.8100000 0.2580260
10-
8 1.6530000 0.0150630
11-
S 8
12-
1 17880.0000000 -0.0001720
13-
2 2683.0000000 -0.0013570
14-
3 611.5000000 -0.0067370
15-
4 173.5000000 -0.0276630
16-
5 56.6400000 -0.0762080
17-
6 20.4200000 -0.1752270
18-
7 7.8100000 -0.1070380
19-
8 1.6530000 0.5670500
1+
1 9
2+
S 3
3+
1 33.8700000 0.0060680
4+
2 5.0950000 0.0453080
5+
3 1.1590000 0.2028220
206
S 1
21-
1 0.4869000 1.0000000
22-
P 3
23-
1 28.3900000 0.0460870
24-
2 6.2700000 0.2401810
25-
3 1.6950000 0.5087440
7+
1 0.3258000 1.0000000
8+
S 1
9+
1 0.1027000 1.0000000
10+
S 1
11+
1 0.0252600 1.0000000
12+
P 1
13+
1 1.4070000 1.0000000
14+
P 1
15+
1 0.3880000 1.0000000
2616
P 1
27-
1 0.4317000 1.0000000
17+
1 0.1020000 1.0000000
18+
D 1
19+
1 1.0570000 1.0000000
20+
D 1
21+
1 0.2470000 1.0000000
22+
2 9
23+
S 3
24+
1 33.8700000 0.0060680
25+
2 5.0950000 0.0453080
26+
3 1.1590000 0.2028220
27+
S 1
28+
1 0.3258000 1.0000000
29+
S 1
30+
1 0.1027000 1.0000000
31+
S 1
32+
1 0.0252600 1.0000000
33+
P 1
34+
1 1.4070000 1.0000000
35+
P 1
36+
1 0.3880000 1.0000000
37+
P 1
38+
1 0.1020000 1.0000000
39+
D 1
40+
1 1.0570000 1.0000000
2841
D 1
29-
1 2.2020000 1.0000000
42+
1 0.2470000 1.0000000
3043

src/eDFT/RGIC_lda_exchange_derivative_discontinuity.f90

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ subroutine RGIC_lda_exchange_derivative_discontinuity(nEns,wEns,nGrid,weight,rho
1818
integer :: iEns,jEns
1919
integer :: iG
2020
double precision :: r
21-
double precision :: dExdw(nEns)
21+
double precision,allocatable :: dExdw(:)
2222
double precision,external :: Kronecker_delta
2323

2424
double precision :: a,b,c,w
@@ -28,14 +28,18 @@ subroutine RGIC_lda_exchange_derivative_discontinuity(nEns,wEns,nGrid,weight,rho
2828

2929
double precision,intent(out) :: ExDD(nEns)
3030

31+
! Memory allocation
32+
33+
allocate(dExdw(nEns))
34+
3135
! Compute correlation energy for ground- and doubly-excited states
3236

3337
a = + 0.5751782560799208d0
3438
b = - 0.021108186591137282d0
3539
c = - 0.36718902716347124d0
3640

3741
w = wEns(2)
38-
dCxGICdw = (0.5d0*b + (2d0*a + 0.5d0*c)*(w - 0.5d0) - (1d0 - w)*w*(3d0*b + 4d0*c*(w - 0.5d0)))
42+
dCxGICdw = - (0.5d0*b + (2d0*a + 0.5d0*c)*(w - 0.5d0) - (1d0 - w)*w*(3d0*b + 4d0*c*(w - 0.5d0)))
3943
dCxGICdw = CxLDA*dCxGICdw
4044

4145
dExdw(:) = 0d0
@@ -53,6 +57,8 @@ subroutine RGIC_lda_exchange_derivative_discontinuity(nEns,wEns,nGrid,weight,rho
5357

5458
end do
5559

60+
ExDD(:) = 0d0
61+
5662
do iEns=1,nEns
5763
do jEns=2,nEns
5864

0 commit comments

Comments
 (0)