diff --git a/org/qmckl_mo.org b/org/qmckl_mo.org index 88fe69c..bb6037d 100644 --- a/org/qmckl_mo.org +++ b/org/qmckl_mo.org @@ -639,7 +639,7 @@ qmckl_exit_code qmckl_provide_mo_vgl(qmckl_context context) | ~ao_num~ | ~int64_t~ | in | Number of AOs | | ~mo_num~ | ~int64_t~ | in | Number of MOs | | ~point_num~ | ~int64_t~ | in | Number of points | - | ~coef_normalized_t~ | ~double[mo_num][ao_num]~ | in | Transpose of the AO to MO transformation matrix | + | ~coefficient_t~ | ~double[mo_num][ao_num]~ | in | Transpose of the AO to MO transformation matrix | | ~ao_vgl~ | ~double[point_num][5][ao_num]~ | in | Value, gradients and Laplacian of the AOs | | ~mo_vgl~ | ~double[point_num][5][mo_num]~ | out | Value, gradients and Laplacian of the MOs | @@ -653,7 +653,7 @@ qmckl_exit_code qmckl_provide_mo_vgl(qmckl_context context) #+begin_src f90 :comments org :tangle (eval f) :noweb yes integer function qmckl_compute_mo_basis_mo_vgl_doc_f(context, & ao_num, mo_num, point_num, & - coef_normalized_t, ao_vgl, mo_vgl) & + coefficient_t, ao_vgl, mo_vgl) & result(info) use qmckl implicit none @@ -661,7 +661,7 @@ integer function qmckl_compute_mo_basis_mo_vgl_doc_f(context, & integer*8 , intent(in) :: ao_num, mo_num integer*8 , intent(in) :: point_num double precision , intent(in) :: ao_vgl(ao_num,5,point_num) - double precision , intent(in) :: coef_normalized_t(mo_num,ao_num) + double precision , intent(in) :: coefficient_t(mo_num,ao_num) double precision , intent(out) :: mo_vgl(mo_num,5,point_num) integer*8 :: i,j,k double precision :: c1, c2, c3, c4, c5 @@ -676,15 +676,22 @@ integer function qmckl_compute_mo_basis_mo_vgl_doc_f(context, & c4 = ao_vgl(k,4,j) c5 = ao_vgl(k,5,j) do i=1,mo_num - mo_vgl(i,1,j) = mo_vgl(i,1,j) + coef_normalized_t(i,k) * c1 - mo_vgl(i,2,j) = mo_vgl(i,2,j) + coef_normalized_t(i,k) * c2 - mo_vgl(i,3,j) = mo_vgl(i,3,j) + coef_normalized_t(i,k) * c3 - mo_vgl(i,4,j) = mo_vgl(i,4,j) + coef_normalized_t(i,k) * c4 - mo_vgl(i,5,j) = mo_vgl(i,5,j) + coef_normalized_t(i,k) * c5 + mo_vgl(i,1,j) = mo_vgl(i,1,j) + coefficient_t(i,k) * c1 + mo_vgl(i,2,j) = mo_vgl(i,2,j) + coefficient_t(i,k) * c2 + mo_vgl(i,3,j) = mo_vgl(i,3,j) + coefficient_t(i,k) * c3 + mo_vgl(i,4,j) = mo_vgl(i,4,j) + coefficient_t(i,k) * c4 + mo_vgl(i,5,j) = mo_vgl(i,5,j) + coefficient_t(i,k) * c5 end do end if end do end do + info = QMCKL_SUCCESS + +! info = qmckl_dgemm(context,'N', 'N', mo_num, point_num, ao_num, 1.d0, & +! coefficient_t, int(size(coefficient_t,1),8), & +! ao_vgl, int(size(ao_vgl,1),8), 0.d0, & +! mo_vgl, int(size(mo_vgl,1),8)) + end function qmckl_compute_mo_basis_mo_vgl_doc_f #+end_src @@ -698,7 +705,7 @@ end function qmckl_compute_mo_basis_mo_vgl_doc_f const int64_t ao_num, const int64_t mo_num, const int64_t point_num, - const double* coef_normalized_t, + const double* coefficient_t, const double* ao_vgl, double* const mo_vgl ); #+end_src @@ -712,7 +719,7 @@ end function qmckl_compute_mo_basis_mo_vgl_doc_f const int64_t ao_num, const int64_t mo_num, const int64_t point_num, - const double* coef_normalized_t, + const double* coefficient_t, const double* ao_vgl, double* const mo_vgl ); #+end_src @@ -722,7 +729,7 @@ end function qmckl_compute_mo_basis_mo_vgl_doc_f #+RESULTS: #+begin_src f90 :tangle (eval f) :comments org :exports none integer(c_int32_t) function qmckl_compute_mo_basis_mo_vgl_doc & - (context, ao_num, mo_num, point_num, coef_normalized_t, ao_vgl, mo_vgl) & + (context, ao_num, mo_num, point_num, coefficient_t, ao_vgl, mo_vgl) & bind(C) result(info) use, intrinsic :: iso_c_binding @@ -732,13 +739,13 @@ end function qmckl_compute_mo_basis_mo_vgl_doc_f integer (c_int64_t) , intent(in) , value :: ao_num integer (c_int64_t) , intent(in) , value :: mo_num integer (c_int64_t) , intent(in) , value :: point_num - real (c_double ) , intent(in) :: coef_normalized_t(ao_num,mo_num) + real (c_double ) , intent(in) :: coefficient_t(ao_num,mo_num) real (c_double ) , intent(in) :: ao_vgl(ao_num,5,point_num) real (c_double ) , intent(out) :: mo_vgl(mo_num,5,point_num) integer(c_int32_t), external :: qmckl_compute_mo_basis_mo_vgl_doc_f info = qmckl_compute_mo_basis_mo_vgl_doc_f & - (context, ao_num, mo_num, point_num, coef_normalized_t, ao_vgl, mo_vgl) + (context, ao_num, mo_num, point_num, coefficient_t, ao_vgl, mo_vgl) end function qmckl_compute_mo_basis_mo_vgl_doc #+end_src @@ -749,14 +756,14 @@ qmckl_compute_mo_basis_mo_vgl (const qmckl_context context, const int64_t ao_num, const int64_t mo_num, const int64_t point_num, - const double* coef_normalized_t, + const double* coefficient_t, const double* ao_vgl, double* const mo_vgl ) { #ifdef HAVE_HPC - return qmckl_compute_mo_basis_mo_vgl_hpc (context, ao_num, mo_num, point_num, coef_normalized_t, ao_vgl, mo_vgl); + return qmckl_compute_mo_basis_mo_vgl_hpc (context, ao_num, mo_num, point_num, coefficient_t, ao_vgl, mo_vgl); #else - return qmckl_compute_mo_basis_mo_vgl_doc (context, ao_num, mo_num, point_num, coef_normalized_t, ao_vgl, mo_vgl); + return qmckl_compute_mo_basis_mo_vgl_doc (context, ao_num, mo_num, point_num, coefficient_t, ao_vgl, mo_vgl); #endif } #+end_src @@ -772,7 +779,7 @@ qmckl_compute_mo_basis_mo_vgl_hpc (const qmckl_context context, const int64_t ao_num, const int64_t mo_num, const int64_t point_num, - const double* coef_normalized_t, + const double* coefficient_t, const double* ao_vgl, double* const mo_vgl ); #endif @@ -785,7 +792,7 @@ qmckl_compute_mo_basis_mo_vgl_hpc (const qmckl_context context, const int64_t ao_num, const int64_t mo_num, const int64_t point_num, - const double* restrict coef_normalized_t, + const double* restrict coefficient_t, const double* restrict ao_vgl, double* restrict const mo_vgl ) { @@ -820,7 +827,7 @@ qmckl_compute_mo_basis_mo_vgl_hpc (const qmckl_context context, double av4[ao_num]; double av5[ao_num]; for (int64_t k=0 ; k