From 3cf86817f4ec8be09923b8a67dd372f8f7934e26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delval?= <32074290+PurplePachyderm@users.noreply.github.com> Date: Wed, 13 Oct 2021 15:01:23 +0200 Subject: [PATCH] Fix merge issue with qmckl_ao.org --- org/qmckl_ao.org | 66 +++++++++++++++++++----------------------------- 1 file changed, 26 insertions(+), 40 deletions(-) diff --git a/org/qmckl_ao.org b/org/qmckl_ao.org index 377908c..c18d3fa 100644 --- a/org/qmckl_ao.org +++ b/org/qmckl_ao.org @@ -65,7 +65,6 @@ gradients and Laplacian of the atomic basis functions. #include "chbrclf.h" #include "qmckl_ao_private_func.h" - int main() { qmckl_context context; context = qmckl_context_create(); @@ -119,7 +118,6 @@ int main() { Computed data: - |--------------------------+----------------------------+-----------------------------------------------------------------------------------------------| | ~coefficient_normalized~ | ~[prim_num]~ | Normalized primitive coefficients | | ~nucleus_prim_index~ | ~[nucl_num]~ | Index of the first primitive for each nucleus | @@ -138,7 +136,6 @@ int main() { | ~coeff_norm_sorted~ | ~[prim_num]~ | Array of normalized coefficients for sorted primitives | | ~prim_factor_sorted~ | ~[prim_num]~ | Normalization factors of the sorted primtives | - For H_2 with the following basis set, #+NAME: basis @@ -1747,7 +1744,6 @@ end function qmckl_ao_gaussian_vgl # Test #+begin_src f90 :tangle (eval f_test) integer(c_int32_t) function test_qmckl_ao_gaussian_vgl(context) bind(C) - use qmckl use qmckl_probes_f @@ -1783,6 +1779,7 @@ integer(c_int32_t) function test_qmckl_ao_gaussian_vgl(context) bind(C) A(i) = 0.0013 * dble(ishft(1,i)) end do + test_qmckl_ao_gaussian_vgl = & qmckl_ao_gaussian_vgl(context, X, R, n, A, VGL, ldv) @@ -1837,8 +1834,8 @@ integer(c_int32_t) function test_qmckl_ao_gaussian_vgl(context) bind(C) #endif test_qmckl_ao_gaussian_vgl = 0 - deallocate(VGL) + deallocate(VGL) end function test_qmckl_ao_gaussian_vgl #+end_src @@ -1959,7 +1956,6 @@ qmckl_exit_code qmckl_provide_ao_basis_primitive_vgl(qmckl_context context) :END: #+NAME: qmckl_ao_basis_primitive_gaussian_vgl_args - | qmckl_context | context | in | Global state | | int64_t | prim_num | in | Number of primitives | | int64_t | elec_num | in | Number of electrons | @@ -1969,7 +1965,7 @@ qmckl_exit_code qmckl_provide_ao_basis_primitive_vgl(qmckl_context context) | double | nucl_coord[3][elec_num] | in | Nuclear coordinates | | double | expo[prim_num] | in | Exponents of the primitives | | double | primitive_vgl[5][elec_num][prim_num] | out | Value, gradients and Laplacian of the primitives | - + #+begin_src f90 :comments org :tangle (eval f) :noweb yes integer function qmckl_compute_ao_basis_primitive_gaussian_vgl_f(context, & prim_num, elec_num, nucl_num, & @@ -1998,11 +1994,10 @@ integer function qmckl_compute_ao_basis_primitive_gaussian_vgl_f(context, & do inucl=1,nucl_num ! C is zero-based, so shift bounds by one do iprim = nucleus_prim_index(inucl)+1, nucleus_prim_index(inucl+1) - do ielec = 1, elec_num - x = elec_coord(ielec,1) - nucl_coord(inucl,1) - y = elec_coord(ielec,2) - nucl_coord(inucl,2) - z = elec_coord(ielec,3) - nucl_coord(inucl,3) + x = elec_coord(ielec,1) - nucl_coord(inucl,1) + y = elec_coord(ielec,2) - nucl_coord(inucl,2) + z = elec_coord(ielec,3) - nucl_coord(inucl,3) r2 = x*x + y*y + z*z ar2 = expo(iprim)*r2 @@ -2012,7 +2007,7 @@ integer function qmckl_compute_ao_basis_primitive_gaussian_vgl_f(context, & two_a = -2.d0 * expo(iprim) * v primitive_vgl(iprim, ielec, 1) = v - primitive_vgl(iprim, ielec, 2) = two_a * x + primitive_vgl(iprim, ielec, 2) = two_a * x primitive_vgl(iprim, ielec, 3) = two_a * y primitive_vgl(iprim, ielec, 4) = two_a * z primitive_vgl(iprim, ielec, 5) = two_a * (3.d0 - 2.d0*ar2) @@ -2160,7 +2155,7 @@ assert( fabs(prim_vgl[1][26][7] - (-7.5014974095310560E-004)) < 1.e-14 ); assert( fabs(prim_vgl[2][26][7] - (-3.8250692897610380E-003)) < 1.e-14 ); assert( fabs(prim_vgl[3][26][7] - ( 3.4950559194080275E-003)) < 1.e-14 ); assert( fabs(prim_vgl[4][26][7] - ( 2.0392163767356572E-002)) < 1.e-14 ); - + } @@ -2173,14 +2168,13 @@ assert( fabs(prim_vgl[4][26][7] - ( 2.0392163767356572E-002)) < 1.e-14 ); // l : primitives k=0; - for (j=0 ; j