mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 03:23:29 +01:00
cleaning in functionals
This commit is contained in:
parent
506f1cb094
commit
b85f60627f
@ -63,11 +63,11 @@ END_PROVIDER
|
||||
do istate = 1, n_states
|
||||
do i = 1, ao_num
|
||||
do j = 1, ao_num
|
||||
potential_x_alpha_ao_pbe(j,i,istate) = pot_sr_scal_x_alpha_ao_pbe(j,i,istate) + pot_sr_grad_x_alpha_ao_pbe(j,i,istate) + pot_sr_grad_x_alpha_ao_pbe(i,j,istate)
|
||||
potential_x_beta_ao_pbe(j,i,istate) = pot_sr_scal_x_beta_ao_pbe(j,i,istate) + pot_sr_grad_x_beta_ao_pbe(j,i,istate) + pot_sr_grad_x_beta_ao_pbe(i,j,istate)
|
||||
potential_x_alpha_ao_pbe(j,i,istate) = pot_scal_x_alpha_ao_pbe(j,i,istate) + pot_grad_x_alpha_ao_pbe(j,i,istate) + pot_grad_x_alpha_ao_pbe(i,j,istate)
|
||||
potential_x_beta_ao_pbe(j,i,istate) = pot_scal_x_beta_ao_pbe(j,i,istate) + pot_grad_x_beta_ao_pbe(j,i,istate) + pot_grad_x_beta_ao_pbe(i,j,istate)
|
||||
|
||||
potential_c_alpha_ao_pbe(j,i,istate) = pot_sr_scal_c_alpha_ao_pbe(j,i,istate) + pot_sr_grad_c_alpha_ao_pbe(j,i,istate) + pot_sr_grad_c_alpha_ao_pbe(i,j,istate)
|
||||
potential_c_beta_ao_pbe(j,i,istate) = pot_sr_scal_c_beta_ao_pbe(j,i,istate) + pot_sr_grad_c_beta_ao_pbe(j,i,istate) + pot_sr_grad_c_beta_ao_pbe(i,j,istate)
|
||||
potential_c_alpha_ao_pbe(j,i,istate) = pot_scal_c_alpha_ao_pbe(j,i,istate) + pot_grad_c_alpha_ao_pbe(j,i,istate) + pot_grad_c_alpha_ao_pbe(i,j,istate)
|
||||
potential_c_beta_ao_pbe(j,i,istate) = pot_scal_c_beta_ao_pbe(j,i,istate) + pot_grad_c_beta_ao_pbe(j,i,istate) + pot_grad_c_beta_ao_pbe(i,j,istate)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
@ -84,8 +84,8 @@ END_PROVIDER
|
||||
do istate = 1, n_states
|
||||
do i = 1, ao_num
|
||||
do j = 1, ao_num
|
||||
potential_xc_alpha_ao_pbe(j,i,istate) = pot_sr_scal_xc_alpha_ao_pbe(j,i,istate) + pot_sr_grad_xc_alpha_ao_pbe(j,i,istate) + pot_sr_grad_xc_alpha_ao_pbe(i,j,istate)
|
||||
potential_xc_beta_ao_pbe(j,i,istate) = pot_sr_scal_xc_beta_ao_pbe(j,i,istate) + pot_sr_grad_xc_beta_ao_pbe(j,i,istate) + pot_sr_grad_xc_beta_ao_pbe(i,j,istate)
|
||||
potential_xc_alpha_ao_pbe(j,i,istate) = pot_scal_xc_alpha_ao_pbe(j,i,istate) + pot_grad_xc_alpha_ao_pbe(j,i,istate) + pot_grad_xc_alpha_ao_pbe(i,j,istate)
|
||||
potential_xc_beta_ao_pbe(j,i,istate) = pot_scal_xc_beta_ao_pbe(j,i,istate) + pot_grad_xc_beta_ao_pbe(j,i,istate) + pot_grad_xc_beta_ao_pbe(i,j,istate)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
@ -94,19 +94,19 @@ END_PROVIDER
|
||||
|
||||
|
||||
|
||||
BEGIN_PROVIDER[double precision, aos_sr_vc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_sr_vc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_sr_vx_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_sr_vx_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_dsr_vc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_dsr_vc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_dsr_vx_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_dsr_vx_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
BEGIN_PROVIDER[double precision, aos_vc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_vc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_vx_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_vx_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_d_vc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_d_vc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_d_vx_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_d_vx_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! intermediates to compute the sr_pbe potentials
|
||||
!
|
||||
! aos_sr_vxc_alpha_pbe_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
|
||||
! aos_vxc_alpha_pbe_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
|
||||
END_DOC
|
||||
integer :: istate,i,j,m
|
||||
double precision :: mu,weight
|
||||
@ -115,10 +115,10 @@ END_PROVIDER
|
||||
double precision :: contrib_grad_xa(3),contrib_grad_xb(3),contrib_grad_ca(3),contrib_grad_cb(3)
|
||||
double precision :: vc_rho_a, vc_rho_b, vx_rho_a, vx_rho_b
|
||||
double precision :: vx_grad_rho_a_2, vx_grad_rho_b_2, vx_grad_rho_a_b, vc_grad_rho_a_2, vc_grad_rho_b_2, vc_grad_rho_a_b
|
||||
aos_dsr_vc_alpha_pbe_w= 0.d0
|
||||
aos_dsr_vc_beta_pbe_w = 0.d0
|
||||
aos_dsr_vx_alpha_pbe_w= 0.d0
|
||||
aos_dsr_vx_beta_pbe_w = 0.d0
|
||||
aos_d_vc_alpha_pbe_w= 0.d0
|
||||
aos_d_vc_beta_pbe_w = 0.d0
|
||||
aos_d_vx_alpha_pbe_w= 0.d0
|
||||
aos_d_vx_beta_pbe_w = 0.d0
|
||||
mu = 0.d0
|
||||
do istate = 1, N_states
|
||||
do i = 1, n_points_final_grid
|
||||
@ -152,17 +152,17 @@ END_PROVIDER
|
||||
contrib_grad_xb(m) = weight * (2.d0 * vx_grad_rho_b_2 * grad_rho_b(m) + vx_grad_rho_a_b * grad_rho_a(m) )
|
||||
enddo
|
||||
do j = 1, ao_num
|
||||
aos_sr_vc_alpha_pbe_w(j,i,istate) = vc_rho_a * aos_in_r_array(j,i)
|
||||
aos_sr_vc_beta_pbe_w (j,i,istate) = vc_rho_b * aos_in_r_array(j,i)
|
||||
aos_sr_vx_alpha_pbe_w(j,i,istate) = vx_rho_a * aos_in_r_array(j,i)
|
||||
aos_sr_vx_beta_pbe_w (j,i,istate) = vx_rho_b * aos_in_r_array(j,i)
|
||||
aos_vc_alpha_pbe_w(j,i,istate) = vc_rho_a * aos_in_r_array(j,i)
|
||||
aos_vc_beta_pbe_w (j,i,istate) = vc_rho_b * aos_in_r_array(j,i)
|
||||
aos_vx_alpha_pbe_w(j,i,istate) = vx_rho_a * aos_in_r_array(j,i)
|
||||
aos_vx_beta_pbe_w (j,i,istate) = vx_rho_b * aos_in_r_array(j,i)
|
||||
enddo
|
||||
do j = 1, ao_num
|
||||
do m = 1,3
|
||||
aos_dsr_vc_alpha_pbe_w(j,i,istate) += contrib_grad_ca(m) * aos_grad_in_r_array_transp_xyz(m,j,i)
|
||||
aos_dsr_vc_beta_pbe_w (j,i,istate) += contrib_grad_cb(m) * aos_grad_in_r_array_transp_xyz(m,j,i)
|
||||
aos_dsr_vx_alpha_pbe_w(j,i,istate) += contrib_grad_xa(m) * aos_grad_in_r_array_transp_xyz(m,j,i)
|
||||
aos_dsr_vx_beta_pbe_w (j,i,istate) += contrib_grad_xb(m) * aos_grad_in_r_array_transp_xyz(m,j,i)
|
||||
aos_d_vc_alpha_pbe_w(j,i,istate) += contrib_grad_ca(m) * aos_grad_in_r_array_transp_xyz(m,j,i)
|
||||
aos_d_vc_beta_pbe_w (j,i,istate) += contrib_grad_cb(m) * aos_grad_in_r_array_transp_xyz(m,j,i)
|
||||
aos_d_vx_alpha_pbe_w(j,i,istate) += contrib_grad_xa(m) * aos_grad_in_r_array_transp_xyz(m,j,i)
|
||||
aos_d_vx_beta_pbe_w (j,i,istate) += contrib_grad_xb(m) * aos_grad_in_r_array_transp_xyz(m,j,i)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
@ -171,10 +171,10 @@ END_PROVIDER
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [double precision, pot_sr_scal_x_alpha_ao_pbe, (ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_sr_scal_c_alpha_ao_pbe, (ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_sr_scal_x_beta_ao_pbe, (ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_sr_scal_c_beta_ao_pbe, (ao_num,ao_num,N_states)]
|
||||
BEGIN_PROVIDER [double precision, pot_scal_x_alpha_ao_pbe, (ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_scal_c_alpha_ao_pbe, (ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_scal_x_beta_ao_pbe, (ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_scal_c_beta_ao_pbe, (ao_num,ao_num,N_states)]
|
||||
implicit none
|
||||
! intermediates to compute the sr_pbe potentials
|
||||
!
|
||||
@ -182,33 +182,33 @@ END_PROVIDER
|
||||
BEGIN_DOC
|
||||
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the scalar part of the potential
|
||||
END_DOC
|
||||
pot_sr_scal_c_alpha_ao_pbe = 0.d0
|
||||
pot_sr_scal_x_alpha_ao_pbe = 0.d0
|
||||
pot_sr_scal_c_beta_ao_pbe = 0.d0
|
||||
pot_sr_scal_x_beta_ao_pbe = 0.d0
|
||||
pot_scal_c_alpha_ao_pbe = 0.d0
|
||||
pot_scal_x_alpha_ao_pbe = 0.d0
|
||||
pot_scal_c_beta_ao_pbe = 0.d0
|
||||
pot_scal_x_beta_ao_pbe = 0.d0
|
||||
double precision :: wall_1,wall_2
|
||||
call wall_time(wall_1)
|
||||
do istate = 1, N_states
|
||||
! correlation alpha
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vc_alpha_pbe_w(1,1,istate),size(aos_sr_vc_alpha_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_sr_scal_c_alpha_ao_pbe(1,1,istate),size(pot_sr_scal_c_alpha_ao_pbe,1))
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_vc_alpha_pbe_w(1,1,istate),size(aos_vc_alpha_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_scal_c_alpha_ao_pbe(1,1,istate),size(pot_scal_c_alpha_ao_pbe,1))
|
||||
! correlation beta
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vc_beta_pbe_w(1,1,istate),size(aos_sr_vc_beta_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_sr_scal_c_beta_ao_pbe(1,1,istate),size(pot_sr_scal_c_beta_ao_pbe,1))
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_vc_beta_pbe_w(1,1,istate),size(aos_vc_beta_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_scal_c_beta_ao_pbe(1,1,istate),size(pot_scal_c_beta_ao_pbe,1))
|
||||
! exchange alpha
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vx_alpha_pbe_w(1,1,istate),size(aos_sr_vx_alpha_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_sr_scal_x_alpha_ao_pbe(1,1,istate),size(pot_sr_scal_x_alpha_ao_pbe,1))
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_vx_alpha_pbe_w(1,1,istate),size(aos_vx_alpha_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_scal_x_alpha_ao_pbe(1,1,istate),size(pot_scal_x_alpha_ao_pbe,1))
|
||||
! exchange beta
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vx_beta_pbe_w(1,1,istate),size(aos_sr_vx_beta_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_sr_scal_x_beta_ao_pbe(1,1,istate), size(pot_sr_scal_x_beta_ao_pbe,1))
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_vx_beta_pbe_w(1,1,istate),size(aos_vx_beta_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_scal_x_beta_ao_pbe(1,1,istate), size(pot_scal_x_beta_ao_pbe,1))
|
||||
|
||||
enddo
|
||||
call wall_time(wall_2)
|
||||
@ -216,10 +216,10 @@ END_PROVIDER
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [double precision, pot_sr_grad_x_alpha_ao_pbe,(ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_sr_grad_x_beta_ao_pbe,(ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_sr_grad_c_alpha_ao_pbe,(ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_sr_grad_c_beta_ao_pbe,(ao_num,ao_num,N_states)]
|
||||
BEGIN_PROVIDER [double precision, pot_grad_x_alpha_ao_pbe,(ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_grad_x_beta_ao_pbe,(ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_grad_c_alpha_ao_pbe,(ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_grad_c_beta_ao_pbe,(ao_num,ao_num,N_states)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the gradienst of the density and orbitals
|
||||
@ -227,31 +227,31 @@ END_PROVIDER
|
||||
integer :: istate
|
||||
double precision :: wall_1,wall_2
|
||||
call wall_time(wall_1)
|
||||
pot_sr_grad_c_alpha_ao_pbe = 0.d0
|
||||
pot_sr_grad_x_alpha_ao_pbe = 0.d0
|
||||
pot_sr_grad_c_beta_ao_pbe = 0.d0
|
||||
pot_sr_grad_x_beta_ao_pbe = 0.d0
|
||||
pot_grad_c_alpha_ao_pbe = 0.d0
|
||||
pot_grad_x_alpha_ao_pbe = 0.d0
|
||||
pot_grad_c_beta_ao_pbe = 0.d0
|
||||
pot_grad_x_beta_ao_pbe = 0.d0
|
||||
do istate = 1, N_states
|
||||
! correlation alpha
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vc_alpha_pbe_w(1,1,istate),size(aos_dsr_vc_alpha_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_sr_grad_c_alpha_ao_pbe(1,1,istate),size(pot_sr_grad_c_alpha_ao_pbe,1))
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_d_vc_alpha_pbe_w(1,1,istate),size(aos_d_vc_alpha_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_grad_c_alpha_ao_pbe(1,1,istate),size(pot_grad_c_alpha_ao_pbe,1))
|
||||
! correlation beta
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vc_beta_pbe_w(1,1,istate),size(aos_dsr_vc_beta_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_sr_grad_c_beta_ao_pbe(1,1,istate),size(pot_sr_grad_c_beta_ao_pbe,1))
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_d_vc_beta_pbe_w(1,1,istate),size(aos_d_vc_beta_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_grad_c_beta_ao_pbe(1,1,istate),size(pot_grad_c_beta_ao_pbe,1))
|
||||
! exchange alpha
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vx_alpha_pbe_w(1,1,istate),size(aos_dsr_vx_alpha_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_sr_grad_x_alpha_ao_pbe(1,1,istate),size(pot_sr_grad_x_alpha_ao_pbe,1))
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_d_vx_alpha_pbe_w(1,1,istate),size(aos_d_vx_alpha_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_grad_x_alpha_ao_pbe(1,1,istate),size(pot_grad_x_alpha_ao_pbe,1))
|
||||
! exchange beta
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vx_beta_pbe_w(1,1,istate),size(aos_dsr_vx_beta_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_sr_grad_x_beta_ao_pbe(1,1,istate),size(pot_sr_grad_x_beta_ao_pbe,1))
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_d_vx_beta_pbe_w(1,1,istate),size(aos_d_vx_beta_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_grad_x_beta_ao_pbe(1,1,istate),size(pot_grad_x_beta_ao_pbe,1))
|
||||
enddo
|
||||
|
||||
call wall_time(wall_2)
|
||||
@ -259,13 +259,13 @@ END_PROVIDER
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER[double precision, aos_sr_vxc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_sr_vxc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_dsr_vxc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_dsr_vxc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
BEGIN_PROVIDER[double precision, aos_vxc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_vxc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_d_vxc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
&BEGIN_PROVIDER[double precision, aos_d_vxc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! aos_sr_vxc_alpha_pbe_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
|
||||
! aos_vxc_alpha_pbe_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
|
||||
END_DOC
|
||||
integer :: istate,i,j,m
|
||||
double precision :: mu,weight
|
||||
@ -276,8 +276,8 @@ END_PROVIDER
|
||||
double precision :: vx_grad_rho_a_2, vx_grad_rho_b_2, vx_grad_rho_a_b, vc_grad_rho_a_2, vc_grad_rho_b_2, vc_grad_rho_a_b
|
||||
|
||||
mu = 0.d0
|
||||
aos_dsr_vxc_alpha_pbe_w = 0.d0
|
||||
aos_dsr_vxc_beta_pbe_w = 0.d0
|
||||
aos_d_vxc_alpha_pbe_w = 0.d0
|
||||
aos_d_vxc_beta_pbe_w = 0.d0
|
||||
|
||||
do istate = 1, N_states
|
||||
do i = 1, n_points_final_grid
|
||||
@ -310,13 +310,13 @@ END_PROVIDER
|
||||
contrib_grad_xb(m) = weight * (2.d0 * vx_grad_rho_b_2 * grad_rho_b(m) + vx_grad_rho_a_b * grad_rho_a(m) )
|
||||
enddo
|
||||
do j = 1, ao_num
|
||||
aos_sr_vxc_alpha_pbe_w(j,i,istate) = ( vc_rho_a + vx_rho_a ) * aos_in_r_array(j,i)
|
||||
aos_sr_vxc_beta_pbe_w (j,i,istate) = ( vc_rho_b + vx_rho_b ) * aos_in_r_array(j,i)
|
||||
aos_vxc_alpha_pbe_w(j,i,istate) = ( vc_rho_a + vx_rho_a ) * aos_in_r_array(j,i)
|
||||
aos_vxc_beta_pbe_w (j,i,istate) = ( vc_rho_b + vx_rho_b ) * aos_in_r_array(j,i)
|
||||
enddo
|
||||
do j = 1, ao_num
|
||||
do m = 1,3
|
||||
aos_dsr_vxc_alpha_pbe_w(j,i,istate) += ( contrib_grad_ca(m) + contrib_grad_xa(m) ) * aos_grad_in_r_array_transp_xyz(m,j,i)
|
||||
aos_dsr_vxc_beta_pbe_w (j,i,istate) += ( contrib_grad_cb(m) + contrib_grad_xb(m) ) * aos_grad_in_r_array_transp_xyz(m,j,i)
|
||||
aos_d_vxc_alpha_pbe_w(j,i,istate) += ( contrib_grad_ca(m) + contrib_grad_xa(m) ) * aos_grad_in_r_array_transp_xyz(m,j,i)
|
||||
aos_d_vxc_beta_pbe_w (j,i,istate) += ( contrib_grad_cb(m) + contrib_grad_xb(m) ) * aos_grad_in_r_array_transp_xyz(m,j,i)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
@ -325,36 +325,36 @@ END_PROVIDER
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [double precision, pot_sr_scal_xc_alpha_ao_pbe, (ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_sr_scal_xc_beta_ao_pbe, (ao_num,ao_num,N_states)]
|
||||
BEGIN_PROVIDER [double precision, pot_scal_xc_alpha_ao_pbe, (ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_scal_xc_beta_ao_pbe, (ao_num,ao_num,N_states)]
|
||||
implicit none
|
||||
integer :: istate
|
||||
BEGIN_DOC
|
||||
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the scalar part of the potential
|
||||
END_DOC
|
||||
pot_sr_scal_xc_alpha_ao_pbe = 0.d0
|
||||
pot_sr_scal_xc_beta_ao_pbe = 0.d0
|
||||
pot_scal_xc_alpha_ao_pbe = 0.d0
|
||||
pot_scal_xc_beta_ao_pbe = 0.d0
|
||||
double precision :: wall_1,wall_2
|
||||
call wall_time(wall_1)
|
||||
do istate = 1, N_states
|
||||
! exchange - correlation alpha
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vxc_alpha_pbe_w(1,1,istate),size(aos_sr_vxc_alpha_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_sr_scal_xc_alpha_ao_pbe(1,1,istate),size(pot_sr_scal_xc_alpha_ao_pbe,1))
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_vxc_alpha_pbe_w(1,1,istate),size(aos_vxc_alpha_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_scal_xc_alpha_ao_pbe(1,1,istate),size(pot_scal_xc_alpha_ao_pbe,1))
|
||||
! exchange - correlation beta
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vxc_beta_pbe_w(1,1,istate),size(aos_sr_vxc_beta_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_sr_scal_xc_beta_ao_pbe(1,1,istate),size(pot_sr_scal_xc_beta_ao_pbe,1))
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_vxc_beta_pbe_w(1,1,istate),size(aos_vxc_beta_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_scal_xc_beta_ao_pbe(1,1,istate),size(pot_scal_xc_beta_ao_pbe,1))
|
||||
enddo
|
||||
call wall_time(wall_2)
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [double precision, pot_sr_grad_xc_alpha_ao_pbe,(ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_sr_grad_xc_beta_ao_pbe,(ao_num,ao_num,N_states)]
|
||||
BEGIN_PROVIDER [double precision, pot_grad_xc_alpha_ao_pbe,(ao_num,ao_num,N_states)]
|
||||
&BEGIN_PROVIDER [double precision, pot_grad_xc_beta_ao_pbe,(ao_num,ao_num,N_states)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the gradienst of the density and orbitals
|
||||
@ -362,19 +362,19 @@ END_PROVIDER
|
||||
integer :: istate
|
||||
double precision :: wall_1,wall_2
|
||||
call wall_time(wall_1)
|
||||
pot_sr_grad_xc_alpha_ao_pbe = 0.d0
|
||||
pot_sr_grad_xc_beta_ao_pbe = 0.d0
|
||||
pot_grad_xc_alpha_ao_pbe = 0.d0
|
||||
pot_grad_xc_beta_ao_pbe = 0.d0
|
||||
do istate = 1, N_states
|
||||
! exchange - correlation alpha
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vxc_alpha_pbe_w(1,1,istate),size(aos_dsr_vxc_alpha_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_sr_grad_xc_alpha_ao_pbe(1,1,istate),size(pot_sr_grad_xc_alpha_ao_pbe,1))
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_d_vxc_alpha_pbe_w(1,1,istate),size(aos_d_vxc_alpha_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_grad_xc_alpha_ao_pbe(1,1,istate),size(pot_grad_xc_alpha_ao_pbe,1))
|
||||
! exchange - correlation beta
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vxc_beta_pbe_w(1,1,istate),size(aos_dsr_vxc_beta_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_sr_grad_xc_beta_ao_pbe(1,1,istate),size(pot_sr_grad_xc_beta_ao_pbe,1))
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_d_vxc_beta_pbe_w(1,1,istate),size(aos_d_vxc_beta_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_grad_xc_beta_ao_pbe(1,1,istate),size(pot_grad_xc_beta_ao_pbe,1))
|
||||
enddo
|
||||
|
||||
call wall_time(wall_2)
|
||||
|
@ -188,24 +188,24 @@ END_PROVIDER
|
||||
call wall_time(wall_1)
|
||||
do istate = 1, N_states
|
||||
! correlation alpha
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vc_alpha_pbe_w(1,1,istate),size(aos_sr_vc_alpha_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vc_alpha_pbe_w(1,1,istate),size(aos_sr_vc_alpha_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_sr_scal_c_alpha_ao_pbe(1,1,istate),size(pot_sr_scal_c_alpha_ao_pbe,1))
|
||||
! correlation beta
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vc_beta_pbe_w(1,1,istate),size(aos_sr_vc_beta_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vc_beta_pbe_w(1,1,istate),size(aos_sr_vc_beta_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_sr_scal_c_beta_ao_pbe(1,1,istate),size(pot_sr_scal_c_beta_ao_pbe,1))
|
||||
! exchange alpha
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vx_alpha_pbe_w(1,1,istate),size(aos_sr_vx_alpha_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vx_alpha_pbe_w(1,1,istate),size(aos_sr_vx_alpha_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_sr_scal_x_alpha_ao_pbe(1,1,istate),size(pot_sr_scal_x_alpha_ao_pbe,1))
|
||||
! exchange beta
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vx_beta_pbe_w(1,1,istate),size(aos_sr_vx_beta_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vx_beta_pbe_w(1,1,istate),size(aos_sr_vx_beta_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_sr_scal_x_beta_ao_pbe(1,1,istate), size(pot_sr_scal_x_beta_ao_pbe,1))
|
||||
|
||||
enddo
|
||||
@ -231,24 +231,24 @@ END_PROVIDER
|
||||
pot_sr_grad_x_beta_ao_pbe = 0.d0
|
||||
do istate = 1, N_states
|
||||
! correlation alpha
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vc_alpha_pbe_w(1,1,istate),size(aos_dsr_vc_alpha_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vc_alpha_pbe_w(1,1,istate),size(aos_dsr_vc_alpha_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_sr_grad_c_alpha_ao_pbe(1,1,istate),size(pot_sr_grad_c_alpha_ao_pbe,1))
|
||||
! correlation beta
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vc_beta_pbe_w(1,1,istate),size(aos_dsr_vc_beta_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vc_beta_pbe_w(1,1,istate),size(aos_dsr_vc_beta_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_sr_grad_c_beta_ao_pbe(1,1,istate),size(pot_sr_grad_c_beta_ao_pbe,1))
|
||||
! exchange alpha
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vx_alpha_pbe_w(1,1,istate),size(aos_dsr_vx_alpha_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vx_alpha_pbe_w(1,1,istate),size(aos_dsr_vx_alpha_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_sr_grad_x_alpha_ao_pbe(1,1,istate),size(pot_sr_grad_x_alpha_ao_pbe,1))
|
||||
! exchange beta
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vx_beta_pbe_w(1,1,istate),size(aos_dsr_vx_beta_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vx_beta_pbe_w(1,1,istate),size(aos_dsr_vx_beta_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_sr_grad_x_beta_ao_pbe(1,1,istate),size(pot_sr_grad_x_beta_ao_pbe,1))
|
||||
enddo
|
||||
|
||||
@ -335,14 +335,14 @@ END_PROVIDER
|
||||
call wall_time(wall_1)
|
||||
do istate = 1, N_states
|
||||
! exchange - correlation alpha
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vxc_alpha_pbe_w(1,1,istate),size(aos_sr_vxc_alpha_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vxc_alpha_pbe_w(1,1,istate),size(aos_sr_vxc_alpha_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_sr_scal_xc_alpha_ao_pbe(1,1,istate),size(pot_sr_scal_xc_alpha_ao_pbe,1))
|
||||
! exchange - correlation beta
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vxc_beta_pbe_w(1,1,istate),size(aos_sr_vxc_beta_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_sr_vxc_beta_pbe_w(1,1,istate),size(aos_sr_vxc_beta_pbe_w,1), &
|
||||
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
|
||||
pot_sr_scal_xc_beta_ao_pbe(1,1,istate),size(pot_sr_scal_xc_beta_ao_pbe,1))
|
||||
enddo
|
||||
call wall_time(wall_2)
|
||||
@ -363,14 +363,14 @@ END_PROVIDER
|
||||
pot_sr_grad_xc_beta_ao_pbe = 0.d0
|
||||
do istate = 1, N_states
|
||||
! exchange - correlation alpha
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vxc_alpha_pbe_w(1,1,istate),size(aos_dsr_vxc_alpha_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vxc_alpha_pbe_w(1,1,istate),size(aos_dsr_vxc_alpha_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_sr_grad_xc_alpha_ao_pbe(1,1,istate),size(pot_sr_grad_xc_alpha_ao_pbe,1))
|
||||
! exchange - correlation beta
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vxc_beta_pbe_w(1,1,istate),size(aos_dsr_vxc_beta_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
|
||||
aos_dsr_vxc_beta_pbe_w(1,1,istate),size(aos_dsr_vxc_beta_pbe_w,1), &
|
||||
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
|
||||
pot_sr_grad_xc_beta_ao_pbe(1,1,istate),size(pot_sr_grad_xc_beta_ao_pbe,1))
|
||||
enddo
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user