9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-27 05:43:31 +01:00
qp2/src/mo_basis/mos_in_r.irp.f

59 lines
2.0 KiB
Fortran
Raw Normal View History

2019-01-25 11:39:31 +01:00
subroutine give_all_mos_at_r(r,mos_array)
implicit none
2021-09-28 00:30:10 +02:00
BEGIN_DOC
! mos_array(i) = ith MO function evaluated at "r"
END_DOC
2019-01-25 11:39:31 +01:00
double precision, intent(in) :: r(3)
double precision, intent(out) :: mos_array(mo_num)
double precision :: aos_array(ao_num)
call give_all_aos_at_r(r,aos_array)
call dgemv('N',mo_num,ao_num,1.d0,mo_coef_transp,mo_num,aos_array,1,0.d0,mos_array,1)
end
subroutine give_all_mos_and_grad_at_r(r,mos_array,mos_grad_array)
implicit none
double precision, intent(in) :: r(3)
double precision, intent(out) :: mos_array(mo_num)
2020-09-21 15:38:26 +02:00
double precision, intent(out) :: mos_grad_array(3,mo_num)
2019-01-25 11:39:31 +01:00
integer :: i,j,k
2020-09-21 15:38:26 +02:00
double precision :: aos_array(ao_num),aos_grad_array(3,ao_num)
2019-01-25 11:39:31 +01:00
call give_all_aos_and_grad_at_r(r,aos_array,aos_grad_array)
mos_array=0d0
mos_grad_array=0d0
do j = 1, mo_num
do k=1, ao_num
mos_array(j) += mo_coef(k,j)*aos_array(k)
2020-09-21 15:38:26 +02:00
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)
2019-01-25 11:39:31 +01:00
enddo
enddo
end
subroutine give_all_mos_and_grad_and_lapl_at_r(r,mos_array,mos_grad_array,mos_lapl_array)
implicit none
double precision, intent(in) :: r(3)
double precision, intent(out) :: mos_array(mo_num)
2020-10-07 11:03:23 +02:00
double precision, intent(out) :: mos_grad_array(3,mo_num),mos_lapl_array(3,mo_num)
2019-01-25 11:39:31 +01:00
integer :: i,j,k
2020-10-07 11:03:23 +02:00
double precision :: aos_array(ao_num),aos_grad_array(3,ao_num),aos_lapl_array(3,ao_num)
2019-01-25 11:39:31 +01:00
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
mos_lapl_array = 0.d0
2019-01-25 11:39:31 +01:00
do j = 1, mo_num
do k=1, ao_num
mos_array(j) += mo_coef(k,j) * aos_array(k)
2020-10-07 11:03:23 +02:00
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)
2019-01-25 11:39:31 +01:00
enddo
enddo
end