mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-08-29 04:12:00 +02:00
added mu(rsc)
This commit is contained in:
parent
0c7c8513b1
commit
2125cd69ab
@ -12,11 +12,54 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [double precision, mu_of_r_dft, (n_points_final_grid)]
|
||||
implicit none
|
||||
integer :: i
|
||||
if(mu_dft_type == "Read")then
|
||||
call ezfio_get_mu_of_r_mu_of_r_disk(mu_of_r_dft)
|
||||
else
|
||||
do i = 1, n_points_final_grid
|
||||
if(mu_dft_type == "cst")then
|
||||
mu_of_r_dft(i) = mu_erf_dft
|
||||
else
|
||||
else if(mu_dft_type == "hf")then
|
||||
mu_of_r_dft(i) = mu_of_r_hf(i)
|
||||
else if(mu_dft_type == "rsc")then
|
||||
mu_of_r_dft(i) = mu_rsc_of_r(i)
|
||||
else
|
||||
print*,'mu_dft_type is not of good type = ',mu_dft_type
|
||||
print*,'it must be of type Read, cst, hf, rsc'
|
||||
print*,'Stopping ...'
|
||||
stop
|
||||
endif
|
||||
enddo
|
||||
endif
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, mu_rsc_of_r, (n_points_final_grid)]
|
||||
implicit none
|
||||
integer :: i
|
||||
double precision :: mu_rs_c,rho,r(3), dm_a, dm_b
|
||||
do i = 1, n_points_final_grid
|
||||
r(1) = final_grid_points(1,i)
|
||||
r(2) = final_grid_points(2,i)
|
||||
r(3) = final_grid_points(3,i)
|
||||
call dm_dft_alpha_beta_at_r(r,dm_a,dm_b)
|
||||
rho = dm_a + dm_b
|
||||
mu_rsc_of_r(i) = mu_rs_c(rho)
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, mu_of_r_dft_average]
|
||||
implicit none
|
||||
integer :: i
|
||||
double precision :: mu_rs_c,rho,r(3), dm_a, dm_b
|
||||
mu_of_r_dft_average = 0.d0
|
||||
do i = 1, n_points_final_grid
|
||||
r(1) = final_grid_points(1,i)
|
||||
r(2) = final_grid_points(2,i)
|
||||
r(3) = final_grid_points(3,i)
|
||||
call dm_dft_alpha_beta_at_r(r,dm_a,dm_b)
|
||||
rho = dm_a + dm_b
|
||||
mu_of_r_dft_average += rho * mu_of_r_dft(i) * final_weight_at_r_vector(i)
|
||||
enddo
|
||||
mu_of_r_dft_average = mu_of_r_dft_average / dble(elec_alpha_num + elec_beta_num)
|
||||
print*,'mu_of_r_dft_average = ',mu_of_r_dft_average
|
||||
END_PROVIDER
|
||||
|
13
src/dft_utils_func/mu_rsc.irp.f
Normal file
13
src/dft_utils_func/mu_rsc.irp.f
Normal file
@ -0,0 +1,13 @@
|
||||
double precision function mu_rs_c(rho)
|
||||
implicit none
|
||||
double precision, intent(in) :: rho
|
||||
include 'constants.include.F'
|
||||
double precision :: cst_rs,alpha_rs,rs
|
||||
cst_rs = (4.d0 * dacos(-1.d0)/3.d0)**(-1.d0/3.d0)
|
||||
alpha_rs = 2.d0 * dsqrt((9.d0 * dacos(-1.d0)/4.d0)**(-1.d0/3.d0)) / sqpi
|
||||
|
||||
rs = cst_rs * rho**(-1.d0/3.d0)
|
||||
mu_rs_c = alpha_rs/dsqrt(rs)
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user