Skip to content

Commit

Permalink
GIC functional working
Browse files Browse the repository at this point in the history
  • Loading branch information
pfloos committed Apr 6, 2020
1 parent 614bf19 commit e11d1a9
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 62 deletions.
65 changes: 39 additions & 26 deletions input/basis
Original file line number Diff line number Diff line change
@@ -1,30 +1,43 @@
1 6
S 8
1 17880.0000000 0.0007380
2 2683.0000000 0.0056770
3 611.5000000 0.0288830
4 173.5000000 0.1085400
5 56.6400000 0.2909070
6 20.4200000 0.4483240
7 7.8100000 0.2580260
8 1.6530000 0.0150630
S 8
1 17880.0000000 -0.0001720
2 2683.0000000 -0.0013570
3 611.5000000 -0.0067370
4 173.5000000 -0.0276630
5 56.6400000 -0.0762080
6 20.4200000 -0.1752270
7 7.8100000 -0.1070380
8 1.6530000 0.5670500
1 9
S 3
1 33.8700000 0.0060680
2 5.0950000 0.0453080
3 1.1590000 0.2028220
S 1
1 0.4869000 1.0000000
P 3
1 28.3900000 0.0460870
2 6.2700000 0.2401810
3 1.6950000 0.5087440
1 0.3258000 1.0000000
S 1
1 0.1027000 1.0000000
S 1
1 0.0252600 1.0000000
P 1
1 1.4070000 1.0000000
P 1
1 0.3880000 1.0000000
P 1
1 0.4317000 1.0000000
1 0.1020000 1.0000000
D 1
1 1.0570000 1.0000000
D 1
1 0.2470000 1.0000000
2 9
S 3
1 33.8700000 0.0060680
2 5.0950000 0.0453080
3 1.1590000 0.2028220
S 1
1 0.3258000 1.0000000
S 1
1 0.1027000 1.0000000
S 1
1 0.0252600 1.0000000
P 1
1 1.4070000 1.0000000
P 1
1 0.3880000 1.0000000
P 1
1 0.1020000 1.0000000
D 1
1 1.0570000 1.0000000
D 1
1 2.2020000 1.0000000
1 0.2470000 1.0000000

8 changes: 4 additions & 4 deletions input/dft
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
GOK-RKS
# exchange rung:
# Hartree = 0
# LDA = 1: RS51,RMFL20,RGIC
# LDA = 1: RS51,RMFL20
# GGA = 2: RB88
# Hybrid = 4
# Hartree-Fock = 666
2 RB88
1 RGIC
# correlation rung:
# Hartree = 0
# LDA = 1: RVWN5,RMFL20
# GGA = 2:
# Hybrid = 4:
# Hartree-Fock = 666
1 RVWN5
0 H
# quadrature grid SG-n
1
# Number of states in ensemble (nEns)
2
# Ensemble weights: wEns(1),...,wEns(nEns-1)
0.0
0.625
# GOK-DFT: maxSCF thresh DIIS n_diis guess_type ortho_type
32 0.00001 T 5 1 1
5 changes: 3 additions & 2 deletions input/molecule
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# nAt nEla nElb nCore nRyd
1 5 5 0 0
2 1 1 0 0
# Znuc x y z
Ne 0.0 0.0 0.0
H 0.0 0.0 0.0
H 0.0 0.0 1.4
5 changes: 3 additions & 2 deletions input/molecule.xyz
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
1
2

Ne 0.0000000000 0.0000000000 0.0000000000
H 0.0000000000 0.0000000000 0.0000000000
H 0.0000000000 0.0000000000 0.7408481486
65 changes: 39 additions & 26 deletions input/weight
Original file line number Diff line number Diff line change
@@ -1,30 +1,43 @@
1 6
S 8
1 17880.0000000 0.0007380
2 2683.0000000 0.0056770
3 611.5000000 0.0288830
4 173.5000000 0.1085400
5 56.6400000 0.2909070
6 20.4200000 0.4483240
7 7.8100000 0.2580260
8 1.6530000 0.0150630
S 8
1 17880.0000000 -0.0001720
2 2683.0000000 -0.0013570
3 611.5000000 -0.0067370
4 173.5000000 -0.0276630
5 56.6400000 -0.0762080
6 20.4200000 -0.1752270
7 7.8100000 -0.1070380
8 1.6530000 0.5670500
1 9
S 3
1 33.8700000 0.0060680
2 5.0950000 0.0453080
3 1.1590000 0.2028220
S 1
1 0.4869000 1.0000000
P 3
1 28.3900000 0.0460870
2 6.2700000 0.2401810
3 1.6950000 0.5087440
1 0.3258000 1.0000000
S 1
1 0.1027000 1.0000000
S 1
1 0.0252600 1.0000000
P 1
1 1.4070000 1.0000000
P 1
1 0.3880000 1.0000000
P 1
1 0.4317000 1.0000000
1 0.1020000 1.0000000
D 1
1 1.0570000 1.0000000
D 1
1 0.2470000 1.0000000
2 9
S 3
1 33.8700000 0.0060680
2 5.0950000 0.0453080
3 1.1590000 0.2028220
S 1
1 0.3258000 1.0000000
S 1
1 0.1027000 1.0000000
S 1
1 0.0252600 1.0000000
P 1
1 1.4070000 1.0000000
P 1
1 0.3880000 1.0000000
P 1
1 0.1020000 1.0000000
D 1
1 1.0570000 1.0000000
D 1
1 2.2020000 1.0000000
1 0.2470000 1.0000000

10 changes: 8 additions & 2 deletions src/eDFT/RGIC_lda_exchange_derivative_discontinuity.f90
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ subroutine RGIC_lda_exchange_derivative_discontinuity(nEns,wEns,nGrid,weight,rho
integer :: iEns,jEns
integer :: iG
double precision :: r
double precision :: dExdw(nEns)
double precision,allocatable :: dExdw(:)
double precision,external :: Kronecker_delta

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

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

! Memory allocation

allocate(dExdw(nEns))

! Compute correlation energy for ground- and doubly-excited states

a = + 0.5751782560799208d0
b = - 0.021108186591137282d0
c = - 0.36718902716347124d0

w = wEns(2)
dCxGICdw = (0.5d0*b + (2d0*a + 0.5d0*c)*(w - 0.5d0) - (1d0 - w)*w*(3d0*b + 4d0*c*(w - 0.5d0)))
dCxGICdw = - (0.5d0*b + (2d0*a + 0.5d0*c)*(w - 0.5d0) - (1d0 - w)*w*(3d0*b + 4d0*c*(w - 0.5d0)))
dCxGICdw = CxLDA*dCxGICdw

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

end do

ExDD(:) = 0d0

do iEns=1,nEns
do jEns=2,nEns

Expand Down

0 comments on commit e11d1a9

Please sign in to comment.