mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 11:03:29 +01:00
fixed bug in laplacians
This commit is contained in:
parent
ee267e27e9
commit
01b1ee3273
@ -121,42 +121,3 @@
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER[double precision, aos_lapl_in_r_array_transp, (n_points_final_grid,ao_num,3)]
|
||||
implicit none
|
||||
!
|
||||
! aos_lapl_in_r_array_transp(i,j,k) = value of the kth component of the laplacian of jth ao on the ith grid point
|
||||
!
|
||||
! k = 1 : x, k= 2, y, k 3, z
|
||||
integer :: i,j,m
|
||||
do m = 1, 3
|
||||
do i = 1, n_points_final_grid
|
||||
do j = 1, ao_num
|
||||
aos_lapl_in_r_array_transp(i,j,m) = aos_lapl_in_r_array(j,i,m)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER[double precision, aos_in_r_array_per_atom, (ao_num,n_pts_max_per_atom,nucl_num)]
|
||||
&BEGIN_PROVIDER[double precision, aos_in_r_array_per_atom_transp, (n_pts_max_per_atom,ao_num,nucl_num)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! aos_in_r_array_per_atom(i,j,k) = value of the ith ao on the jth grid point attached on the kth atom
|
||||
END_DOC
|
||||
integer :: i,j,k
|
||||
double precision :: aos_array(ao_num), r(3)
|
||||
do k = 1, nucl_num
|
||||
do i = 1, n_pts_per_atom(k)
|
||||
r(1) = final_grid_points_per_atom(1,i,k)
|
||||
r(2) = final_grid_points_per_atom(2,i,k)
|
||||
r(3) = final_grid_points_per_atom(3,i,k)
|
||||
call give_all_aos_at_r(r,aos_array)
|
||||
do j = 1, ao_num
|
||||
aos_in_r_array_per_atom(j,i,k) = aos_array(j)
|
||||
aos_in_r_array_per_atom_transp(i,j,k) = aos_array(j)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
|
@ -115,8 +115,6 @@
|
||||
BEGIN_DOC
|
||||
! mos_lapl_in_r_array(i,j,k) = value of the kth component of the laplacian of ith mo on the jth grid point
|
||||
!
|
||||
! mos_lapl_in_r_array_transp(i,j,k) = value of the kth component of the laplacian of jth mo on the ith grid point
|
||||
!
|
||||
! k = 1 : x, k= 2, y, k 3, z
|
||||
END_DOC
|
||||
integer :: m
|
||||
@ -126,3 +124,22 @@
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER[double precision, mos_lapl_in_r_array_tranp,(3,mo_num,n_points_final_grid)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! mos_lapl_in_r_array_transp(i,j,k) = value of the kth component of the laplient of jth mo on the ith grid point
|
||||
!
|
||||
! k = 1 : x, k= 2, y, k 3, z
|
||||
END_DOC
|
||||
integer :: m
|
||||
integer :: i,j
|
||||
mos_lapl_in_r_array_tranp = 0.d0
|
||||
do i = 1, n_points_final_grid
|
||||
do j = 1, mo_num
|
||||
do m = 1, 3
|
||||
mos_lapl_in_r_array_tranp(m,j,i) = mos_lapl_in_r_array(j,i,m)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
@ -33,9 +33,9 @@ subroutine give_all_mos_and_grad_and_lapl_at_r(r,mos_array,mos_grad_array,mos_la
|
||||
implicit none
|
||||
double precision, intent(in) :: r(3)
|
||||
double precision, intent(out) :: mos_array(mo_num)
|
||||
double precision, intent(out) :: mos_grad_array(mo_num,3),mos_lapl_array(mo_num,3)
|
||||
double precision, intent(out) :: mos_grad_array(3,mo_num),mos_lapl_array(3,mo_num)
|
||||
integer :: i,j,k
|
||||
double precision :: aos_array(ao_num),aos_grad_array(ao_num,3),aos_lapl_array(ao_num,3)
|
||||
double precision :: aos_array(ao_num),aos_grad_array(3,ao_num),aos_lapl_array(3,ao_num)
|
||||
call give_all_aos_and_grad_and_lapl_at_r(r,aos_array,aos_grad_array,aos_lapl_array)
|
||||
mos_array = 0.d0
|
||||
mos_grad_array = 0.d0
|
||||
@ -43,12 +43,12 @@ subroutine give_all_mos_and_grad_and_lapl_at_r(r,mos_array,mos_grad_array,mos_la
|
||||
do j = 1, mo_num
|
||||
do k=1, ao_num
|
||||
mos_array(j) += mo_coef(k,j) * aos_array(k)
|
||||
mos_grad_array(j,1) += mo_coef(k,j) * aos_grad_array(k,1)
|
||||
mos_grad_array(j,2) += mo_coef(k,j) * aos_grad_array(k,2)
|
||||
mos_grad_array(j,3) += mo_coef(k,j) * aos_grad_array(k,3)
|
||||
mos_lapl_array(j,1) += mo_coef(k,j) * aos_lapl_array(k,1)
|
||||
mos_lapl_array(j,2) += mo_coef(k,j) * aos_lapl_array(k,2)
|
||||
mos_lapl_array(j,3) += mo_coef(k,j) * aos_lapl_array(k,3)
|
||||
mos_grad_array(1,j) += mo_coef(k,j) * aos_grad_array(1,k)
|
||||
mos_grad_array(2,j) += mo_coef(k,j) * aos_grad_array(2,k)
|
||||
mos_grad_array(3,j) += mo_coef(k,j) * aos_grad_array(3,k)
|
||||
mos_lapl_array(1,j) += mo_coef(k,j) * aos_lapl_array(1,k)
|
||||
mos_lapl_array(2,j) += mo_coef(k,j) * aos_lapl_array(2,k)
|
||||
mos_lapl_array(3,j) += mo_coef(k,j) * aos_lapl_array(3,k)
|
||||
enddo
|
||||
enddo
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user