9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-30 15:15:38 +01:00

fixed bug for dummy atoms X

This commit is contained in:
Emmanuel Giner 2019-03-27 12:56:32 +01:00
parent 24acfa6938
commit 02968f569e
3 changed files with 25 additions and 3 deletions

View File

@ -195,6 +195,20 @@ BEGIN_PROVIDER [double precision, weight_at_r, (n_points_integration_angular,n_p
enddo
accu = 1.d0/accu
weight_at_r(l,k,j) = tmp_array(j) * accu
if(isnan(weight_at_r(l,k,j)))then
print*,'isnan(weight_at_r(l,k,j))'
print*,l,k,j
accu = 0.d0
do i = 1, nucl_num
! function defined for each atom "i" by equation (13) and (21) with k == 3
tmp_array(i) = cell_function_becke(r,i) ! P_n(r)
print*,i,tmp_array(i)
! Then you compute the summ the P_n(r) function for each of the "r" points
accu += tmp_array(i)
enddo
write(*,'(100(F16.10,X))')tmp_array(j) , accu
stop
endif
enddo
enddo
enddo
@ -221,6 +235,12 @@ BEGIN_PROVIDER [double precision, final_weight_at_r, (n_points_integration_angul
contrib_integration = derivative_knowles_function(alpha_knowles(int(nucl_charge(j))),m_knowles,x)&
*knowles_function(alpha_knowles(int(nucl_charge(j))),m_knowles,x)**2
final_weight_at_r(k,i,j) = weights_angular_points(k) * weight_at_r(k,i,j) * contrib_integration * dr_radial_integral
if(isnan(final_weight_at_r(k,i,j)))then
print*,'isnan(final_weight_at_r(k,i,j))'
print*,k,i,j
write(*,'(100(F16.10,X))')weights_angular_points(k) , weight_at_r(k,i,j) , contrib_integration , dr_radial_integral
stop
endif
enddo
enddo
enddo

View File

@ -227,6 +227,8 @@ END_PROVIDER
BEGIN_PROVIDER [double precision, one_e_dm_alpha_at_r, (n_points_final_grid,N_states) ]
&BEGIN_PROVIDER [double precision, one_e_dm_beta_at_r, (n_points_final_grid,N_states) ]
&BEGIN_PROVIDER [double precision, elec_beta_num_grid_becke , (N_states) ]
&BEGIN_PROVIDER [double precision, elec_alpha_num_grid_becke , (N_states) ]
implicit none
BEGIN_DOC
! one_e_dm_alpha_at_r(i,istate) = n_alpha(r_i,istate)

View File

@ -1,4 +1,4 @@
BEGIN_PROVIDER [ double precision, slater_bragg_radii, (100)]
BEGIN_PROVIDER [ double precision, slater_bragg_radii, (0:100)]
implicit none
BEGIN_DOC
! atomic radii in Angstrom defined in table I of JCP 41, 3199 (1964) Slater
@ -54,10 +54,10 @@ BEGIN_PROVIDER [ double precision, slater_bragg_radii, (100)]
END_PROVIDER
BEGIN_PROVIDER [double precision, slater_bragg_radii_ua, (100)]
BEGIN_PROVIDER [double precision, slater_bragg_radii_ua, (0:100)]
implicit none
integer :: i
do i = 1, 100
do i = 0, 100
slater_bragg_radii_ua(i) = slater_bragg_radii(i) * 1.889725989d0
enddo
END_PROVIDER