9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-09-01 05:33:40 +02:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Emmanuel Giner LCT
a035f42c76 modified scan 2019-06-17 11:59:19 +02:00
Emmanuel Giner LCT
5d4a51d287 Merge branch 'dev-lct' of https://github.com/QuantumPackage/qp2 into dev-lct 2019-06-17 11:37:28 +02:00
Emmanuel Giner LCT
7bb0f7d963 working on scan 2019-06-17 11:37:15 +02:00

View File

@ -37,7 +37,8 @@ double precision function ec_scan(rho_a,rho_b,tau,grad_rho_2)
gama = 0.031091d0 gama = 0.031091d0
! correlation energy lsda1 ! correlation energy lsda1
call ec_only_lda_sr(0.d0,nup,ndo,e_c_lsda1) call ec_only_lda_sr(0.d0,nup,ndo,e_c_lsda1)
! correlation energy per particle
e_c_lsda1 = e_c_lsda1/rho
xi = spin_d/rho xi = spin_d/rho
rs = (cst_43 * pi * rho)**(-cst_13) rs = (cst_43 * pi * rho)**(-cst_13)
s = drho/( 2.d0 * cst_3pi2**(cst_13) * rho**cst_43 ) s = drho/( 2.d0 * cst_3pi2**(cst_13) * rho**cst_43 )
@ -61,7 +62,11 @@ double precision function ec_scan(rho_a,rho_b,tau,grad_rho_2)
g_at2 = 1.d0/(1.d0 + 4.d0 * a*t*t)**0.25d0 g_at2 = 1.d0/(1.d0 + 4.d0 * a*t*t)**0.25d0
h1 = gama * phi_3 * dlog(1.d0 + w_1 * (1.d0 - g_at2)) h1 = gama * phi_3 * dlog(1.d0 + w_1 * (1.d0 - g_at2))
! interpolation function ! interpolation function
fc_alpha = dexp(-c_1c * alpha * inv_1alph) * step_f(cst_1alph) - d_c * dexp(c_2c * inv_1alph) * step_f(-cst_1alph) if(cst_1alph.gt.0.d0)then
fc_alpha = dexp(-c_1c * alpha * inv_1alph)
else
fc_alpha = - d_c * dexp(c_2c * inv_1alph)
endif
! first part of the correlation energy ! first part of the correlation energy
e_c_1 = e_c_lsda1 + h1 e_c_1 = e_c_lsda1 + h1
@ -82,19 +87,10 @@ double precision function ec_scan(rho_a,rho_b,tau,grad_rho_2)
ec_scan = e_c_1 + fc_alpha * (e_c_0 - e_c_1) ec_scan = e_c_1 + fc_alpha * (e_c_0 - e_c_1)
end end
double precision function step_f(x)
implicit none
double precision, intent(in) :: x
if(x.lt.0.d0)then
step_f = 0.d0
else
step_f = 1.d0
endif
end
double precision function beta_rs(rs) double precision function beta_rs(rs)
implicit none implicit none
double precision, intent(in) ::rs double precision, intent(in) ::rs
beta_rs(rs) = 0.066725d0 * (1.d0 + 0.1d0 * rs)/(1.d0 + 0.1778d0 * rs) beta_rs = 0.066725d0 * (1.d0 + 0.1d0 * rs)/(1.d0 + 0.1778d0 * rs)
end end