From d91631f73f875abdf4cb868f7d3c47b8fe856055 Mon Sep 17 00:00:00 2001 From: Pierre-Francois Loos Date: Mon, 27 Apr 2020 23:04:00 +0200 Subject: [PATCH] Done with 3st ensemble --- input/basis | 17 ++++++++--- input/dft | 6 ++-- input/weight | 17 ++++++++--- src/eDFT/LIM_RKS.f90 | 4 +-- ..._lda_exchange_derivative_discontinuity.f90 | 27 +++++++----------- src/eDFT/RGIC_lda_exchange_energy.f90 | 26 ++++++++--------- .../RGIC_lda_exchange_individual_energy.f90 | 26 ++++++----------- src/eDFT/RGIC_lda_exchange_potential.f90 | 28 +++++++------------ 8 files changed, 71 insertions(+), 80 deletions(-) diff --git a/input/basis b/input/basis index fb05e68..a1f7a8d 100644 --- a/input/basis +++ b/input/basis @@ -1,18 +1,27 @@ -1 3 +1 5 S 3 1 13.0100000 0.0196850 2 1.9620000 0.1379770 3 0.4446000 0.4781480 S 1 1 0.1220000 1.0000000 +S 1 + 1 0.0297400 1.0000000 P 1 - 1 0.7270000 1.0000000 -2 3 + 1 0.7270000 1.0000000 +P 1 + 1 0.1410000 1.0000000 +2 5 S 3 1 13.0100000 0.0196850 2 1.9620000 0.1379770 3 0.4446000 0.4781480 S 1 1 0.1220000 1.0000000 +S 1 + 1 0.0297400 1.0000000 P 1 - 1 0.7270000 1.0000000 + 1 0.7270000 1.0000000 +P 1 + 1 0.1410000 1.0000000 + diff --git a/input/dft b/input/dft index 3dda946..79fc2fe 100644 --- a/input/dft +++ b/input/dft @@ -6,19 +6,19 @@ # GGA = 2: RB88 # Hybrid = 4 # Hartree-Fock = 666 - 1 RS51 + 1 RGIC # correlation rung: # Hartree = 0 # LDA = 1: RVWN5,RMFL20 # GGA = 2: # Hybrid = 4: # Hartree-Fock = 666 - 1 RVWN5 + 1 RMFL20 # quadrature grid SG-n 1 # Number of states in ensemble (nEns) 3 # Ensemble weights: wEns(1),...,wEns(nEns-1) - 0.0000000 0.0000000 + 0.33333 0.33333 # GOK-DFT: maxSCF thresh DIIS n_diis guess_type ortho_type 32 0.00001 T 5 1 1 diff --git a/input/weight b/input/weight index fb05e68..a1f7a8d 100644 --- a/input/weight +++ b/input/weight @@ -1,18 +1,27 @@ -1 3 +1 5 S 3 1 13.0100000 0.0196850 2 1.9620000 0.1379770 3 0.4446000 0.4781480 S 1 1 0.1220000 1.0000000 +S 1 + 1 0.0297400 1.0000000 P 1 - 1 0.7270000 1.0000000 -2 3 + 1 0.7270000 1.0000000 +P 1 + 1 0.1410000 1.0000000 +2 5 S 3 1 13.0100000 0.0196850 2 1.9620000 0.1379770 3 0.4446000 0.4781480 S 1 1 0.1220000 1.0000000 +S 1 + 1 0.0297400 1.0000000 P 1 - 1 0.7270000 1.0000000 + 1 0.7270000 1.0000000 +P 1 + 1 0.1410000 1.0000000 + diff --git a/src/eDFT/LIM_RKS.f90 b/src/eDFT/LIM_RKS.f90 index e81a09f..73ef3ef 100644 --- a/src/eDFT/LIM_RKS.f90 +++ b/src/eDFT/LIM_RKS.f90 @@ -120,8 +120,8 @@ subroutine LIM_RKS(x_rung,x_DFA,c_rung,c_DFA,LDA_centered,nEns,nGrid,weight, & ! LIM excitation energies !------------------------------------------------------------------------ - Om(2) = (Ew(2) - Ew(1))/2d0 - Om(3) = (Ew(3) - Ew(1))/3d0 + 0.5d0*Om(2) + Om(2) = 2d0*(Ew(2) - Ew(1)) + Om(3) = 3d0*(Ew(3) - Ew(2)) + 0.5d0*Om(2) write(*,'(A60)') '-------------------------------------------------' write(*,'(A60)') ' LINEAR INTERPOLATION METHOD EXCITATION ENERGIES ' diff --git a/src/eDFT/RGIC_lda_exchange_derivative_discontinuity.f90 b/src/eDFT/RGIC_lda_exchange_derivative_discontinuity.f90 index 11b2f4a..9437c10 100644 --- a/src/eDFT/RGIC_lda_exchange_derivative_discontinuity.f90 +++ b/src/eDFT/RGIC_lda_exchange_derivative_discontinuity.f90 @@ -32,32 +32,25 @@ subroutine RGIC_lda_exchange_derivative_discontinuity(nEns,wEns,nGrid,weight,rho allocate(dExdw(nEns)) -! Compute correlation energy for ground- and doubly-excited states - +! Weight-dependent Cx coefficient for RMFL20 exchange functional ! Parameters for H2 at equilibrium - a = + 0.5751782560799208d0 - b = - 0.021108186591137282d0 - c = - 0.36718902716347124d0 + a = + 0.5739189000851961d0 + b = - 0.0003469882157336496d0 + c = - 0.2676338054343272d0 ! Parameters for stretch H2 -! a = + 0.01922622507087411d0 -! b = - 0.01799647558018601d0 -! c = - 0.022945430666782573d0 +! a = + 0.01918229168254928d0 +! b = - 0.01545313842512261d0 +! c = - 0.012720073519142448d0 ! Parameters for He -! a = 1.9125735895875828d0 -! b = 2.715266992840757d0 -! c = 2.1634223380633086d0 - -! Parameters for HNO - -! a = 0.0061158387543040335d0 -! b = -0.00005968703047293955d0 -! c = -0.00001692245714408755d0 +! a = 1.9015719148496788d0 +! b = 2.5236598782764412d0 +! c = 1.6652282199359842d0 w = 0.5d0*wEns(2) + wEns(3) dCxGICdw = (0.5d0*b + (2d0*a + 0.5d0*c)*(w - 0.5d0) - (1d0 - w)*w*(3d0*b + 4d0*c*(w - 0.5d0))) diff --git a/src/eDFT/RGIC_lda_exchange_energy.f90 b/src/eDFT/RGIC_lda_exchange_energy.f90 index 901210a..d8a5844 100644 --- a/src/eDFT/RGIC_lda_exchange_energy.f90 +++ b/src/eDFT/RGIC_lda_exchange_energy.f90 @@ -27,29 +27,25 @@ subroutine RGIC_lda_exchange_energy(nEns,wEns,nGrid,weight,rho,Ex) ! Weight-dependent Cx coefficient +! Weight-dependent Cx coefficient for RMFL20 exchange functional + ! Parameters for H2 at equilibrium - a = + 0.5751782560799208d0 - b = - 0.021108186591137282d0 - c = - 0.36718902716347124d0 + a = + 0.5739189000851961d0 + b = - 0.0003469882157336496d0 + c = - 0.2676338054343272d0 ! Parameters for stretch H2 -! a = + 0.01922622507087411d0 -! b = - 0.01799647558018601d0 -! c = - 0.022945430666782573d0 +! a = + 0.01918229168254928d0 +! b = - 0.01545313842512261d0 +! c = - 0.012720073519142448d0 ! Parameters for He -! a = 1.9125735895875828d0 -! b = 2.715266992840757d0 -! c = 2.1634223380633086d0 - -! Parameters for HNO - -! a = 0.0061158387543040335d0 -! b = -0.00005968703047293955d0 -! c = -0.00001692245714408755d0 +! a = 1.9015719148496788d0 +! b = 2.5236598782764412d0 +! c = 1.6652282199359842d0 w = 0.5d0*wEns(2) + wEns(3) CxGIC = 1d0 - w*(1d0 - w)*(a + b*(w - 0.5d0) + c*(w - 0.5d0)**2) diff --git a/src/eDFT/RGIC_lda_exchange_individual_energy.f90 b/src/eDFT/RGIC_lda_exchange_individual_energy.f90 index 3788c6d..42a53f4 100644 --- a/src/eDFT/RGIC_lda_exchange_individual_energy.f90 +++ b/src/eDFT/RGIC_lda_exchange_individual_energy.f90 @@ -29,31 +29,23 @@ subroutine RGIC_lda_exchange_individual_energy(nEns,wEns,nGrid,weight,rhow,rho,E ! Weight-dependent Cx coefficient for RMFL20 exchange functional - ! Parameters for H2 at equilibrium - a = + 0.5751782560799208d0 - b = - 0.021108186591137282d0 - c = - 0.36718902716347124d0 + a = + 0.5739189000851961d0 + b = - 0.0003469882157336496d0 + c = - 0.2676338054343272d0 ! Parameters for stretch H2 -! a = + 0.01922622507087411d0 -! b = - 0.01799647558018601d0 -! c = - 0.022945430666782573d0 +! a = + 0.01918229168254928d0 +! b = - 0.01545313842512261d0 +! c = - 0.012720073519142448d0 ! Parameters for He -! a = 1.9125735895875828d0 -! b = 2.715266992840757d0 -! c = 2.1634223380633086d0 - - -! Parameters for HNO - -! a = 0.0061158387543040335d0 -! b = -0.00005968703047293955d0 -! c = -0.00001692245714408755d0 +! a = 1.9015719148496788d0 +! b = 2.5236598782764412d0 +! c = 1.6652282199359842d0 w = 0.5d0*wEns(2) + wEns(3) CxGIC = 1d0 - w*(1d0 - w)*(a + b*(w - 0.5d0) + c*(w - 0.5d0)**2) diff --git a/src/eDFT/RGIC_lda_exchange_potential.f90 b/src/eDFT/RGIC_lda_exchange_potential.f90 index d27ec2d..f8f0426 100644 --- a/src/eDFT/RGIC_lda_exchange_potential.f90 +++ b/src/eDFT/RGIC_lda_exchange_potential.f90 @@ -29,36 +29,28 @@ subroutine RGIC_lda_exchange_potential(nEns,wEns,nGrid,weight,nBas,AO,rho,Fx) ! Weight-dependent Cx coefficient for RMFL20 exchange functional - ! Parameters for H2 at equilibrium - a = + 0.5751782560799208d0 - b = - 0.021108186591137282d0 - c = - 0.36718902716347124d0 + a = + 0.5739189000851961d0 + b = - 0.0003469882157336496d0 + c = - 0.2676338054343272d0 ! Parameters for stretch H2 -! a = + 0.01922622507087411d0 -! b = - 0.01799647558018601d0 -! c = - 0.022945430666782573d0 +! a = + 0.01918229168254928d0 +! b = - 0.01545313842512261d0 +! c = - 0.012720073519142448d0 ! Parameters for He -! a = 1.9125735895875828d0 -! b = 2.715266992840757d0 -! c = 2.1634223380633086d0 - - -! Parameters for HNO - -! a = 0.0061158387543040335d0 -! b = -0.00005968703047293955d0 -! c = -0.00001692245714408755d0 +! a = 1.9015719148496788d0 +! b = 2.5236598782764412d0 +! c = 1.6652282199359842d0 w = 0.5d0*wEns(2) + wEns(3) CxGIC = 1d0 - w*(1d0 - w)*(a + b*(w - 0.5d0) + c*(w - 0.5d0)**2) CxGIC = CxLDA*CxGIC - + ! Compute LDA exchange matrix in the AO basis Fx(:,:) = 0d0