mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-05 11:00:36 +01:00
Fix merge issue with qmckl_ao.org
This commit is contained in:
parent
c84deac647
commit
3cf86817f4
@ -65,7 +65,6 @@ gradients and Laplacian of the atomic basis functions.
|
|||||||
#include "chbrclf.h"
|
#include "chbrclf.h"
|
||||||
#include "qmckl_ao_private_func.h"
|
#include "qmckl_ao_private_func.h"
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
qmckl_context context;
|
qmckl_context context;
|
||||||
context = qmckl_context_create();
|
context = qmckl_context_create();
|
||||||
@ -119,7 +118,6 @@ int main() {
|
|||||||
|
|
||||||
Computed data:
|
Computed data:
|
||||||
|
|
||||||
|
|
||||||
|--------------------------+----------------------------+-----------------------------------------------------------------------------------------------|
|
|--------------------------+----------------------------+-----------------------------------------------------------------------------------------------|
|
||||||
| ~coefficient_normalized~ | ~[prim_num]~ | Normalized primitive coefficients |
|
| ~coefficient_normalized~ | ~[prim_num]~ | Normalized primitive coefficients |
|
||||||
| ~nucleus_prim_index~ | ~[nucl_num]~ | Index of the first primitive for each nucleus |
|
| ~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 |
|
| ~coeff_norm_sorted~ | ~[prim_num]~ | Array of normalized coefficients for sorted primitives |
|
||||||
| ~prim_factor_sorted~ | ~[prim_num]~ | Normalization factors of the sorted primtives |
|
| ~prim_factor_sorted~ | ~[prim_num]~ | Normalization factors of the sorted primtives |
|
||||||
|
|
||||||
|
|
||||||
For H_2 with the following basis set,
|
For H_2 with the following basis set,
|
||||||
|
|
||||||
#+NAME: basis
|
#+NAME: basis
|
||||||
@ -1747,7 +1744,6 @@ end function qmckl_ao_gaussian_vgl
|
|||||||
# Test
|
# Test
|
||||||
#+begin_src f90 :tangle (eval f_test)
|
#+begin_src f90 :tangle (eval f_test)
|
||||||
integer(c_int32_t) function test_qmckl_ao_gaussian_vgl(context) bind(C)
|
integer(c_int32_t) function test_qmckl_ao_gaussian_vgl(context) bind(C)
|
||||||
|
|
||||||
use qmckl
|
use qmckl
|
||||||
use qmckl_probes_f
|
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))
|
A(i) = 0.0013 * dble(ishft(1,i))
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
|
||||||
test_qmckl_ao_gaussian_vgl = &
|
test_qmckl_ao_gaussian_vgl = &
|
||||||
qmckl_ao_gaussian_vgl(context, X, R, n, A, VGL, ldv)
|
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
|
#endif
|
||||||
|
|
||||||
test_qmckl_ao_gaussian_vgl = 0
|
test_qmckl_ao_gaussian_vgl = 0
|
||||||
deallocate(VGL)
|
|
||||||
|
|
||||||
|
deallocate(VGL)
|
||||||
end function test_qmckl_ao_gaussian_vgl
|
end function test_qmckl_ao_gaussian_vgl
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -1959,7 +1956,6 @@ qmckl_exit_code qmckl_provide_ao_basis_primitive_vgl(qmckl_context context)
|
|||||||
:END:
|
:END:
|
||||||
|
|
||||||
#+NAME: qmckl_ao_basis_primitive_gaussian_vgl_args
|
#+NAME: qmckl_ao_basis_primitive_gaussian_vgl_args
|
||||||
|
|
||||||
| qmckl_context | context | in | Global state |
|
| qmckl_context | context | in | Global state |
|
||||||
| int64_t | prim_num | in | Number of primitives |
|
| int64_t | prim_num | in | Number of primitives |
|
||||||
| int64_t | elec_num | in | Number of electrons |
|
| int64_t | elec_num | in | Number of electrons |
|
||||||
@ -1998,7 +1994,6 @@ integer function qmckl_compute_ao_basis_primitive_gaussian_vgl_f(context, &
|
|||||||
do inucl=1,nucl_num
|
do inucl=1,nucl_num
|
||||||
! C is zero-based, so shift bounds by one
|
! C is zero-based, so shift bounds by one
|
||||||
do iprim = nucleus_prim_index(inucl)+1, nucleus_prim_index(inucl+1)
|
do iprim = nucleus_prim_index(inucl)+1, nucleus_prim_index(inucl+1)
|
||||||
|
|
||||||
do ielec = 1, elec_num
|
do ielec = 1, elec_num
|
||||||
x = elec_coord(ielec,1) - nucl_coord(inucl,1)
|
x = elec_coord(ielec,1) - nucl_coord(inucl,1)
|
||||||
y = elec_coord(ielec,2) - nucl_coord(inucl,2)
|
y = elec_coord(ielec,2) - nucl_coord(inucl,2)
|
||||||
@ -2173,7 +2168,6 @@ assert( fabs(prim_vgl[4][26][7] - ( 2.0392163767356572E-002)) < 1.e-14 );
|
|||||||
// l : primitives
|
// l : primitives
|
||||||
|
|
||||||
k=0;
|
k=0;
|
||||||
|
|
||||||
for (j=0 ; j<elec_num ; ++j) {
|
for (j=0 ; j<elec_num ; ++j) {
|
||||||
for (i=0 ; i<nucl_num ; ++i) {
|
for (i=0 ; i<nucl_num ; ++i) {
|
||||||
|
|
||||||
@ -2332,7 +2326,6 @@ qmckl_exit_code qmckl_provide_ao_basis_shell_vgl(qmckl_context context)
|
|||||||
:END:
|
:END:
|
||||||
|
|
||||||
#+NAME: qmckl_ao_basis_shell_gaussian_vgl_args
|
#+NAME: qmckl_ao_basis_shell_gaussian_vgl_args
|
||||||
|
|
||||||
| ~qmckl_context~ | ~context~ | in | Global state |
|
| ~qmckl_context~ | ~context~ | in | Global state |
|
||||||
| ~int64_t~ | ~prim_num~ | in | Number of primitives |
|
| ~int64_t~ | ~prim_num~ | in | Number of primitives |
|
||||||
| ~int64_t~ | ~shell_num~ | in | Number of shells |
|
| ~int64_t~ | ~shell_num~ | in | Number of shells |
|
||||||
@ -2382,7 +2375,6 @@ integer function qmckl_compute_ao_basis_shell_gaussian_vgl_f(context, &
|
|||||||
|
|
||||||
do inucl=1,nucl_num
|
do inucl=1,nucl_num
|
||||||
|
|
||||||
|
|
||||||
do ielec = 1, elec_num
|
do ielec = 1, elec_num
|
||||||
|
|
||||||
x = elec_coord(ielec,1) - nucl_coord(inucl,1)
|
x = elec_coord(ielec,1) - nucl_coord(inucl,1)
|
||||||
@ -2410,7 +2402,6 @@ integer function qmckl_compute_ao_basis_shell_gaussian_vgl_f(context, &
|
|||||||
v = coef_normalized(iprim) * dexp(-ar2)
|
v = coef_normalized(iprim) * dexp(-ar2)
|
||||||
two_a = -2.d0 * expo(iprim) * v
|
two_a = -2.d0 * expo(iprim) * v
|
||||||
|
|
||||||
|
|
||||||
shell_vgl(ishell, ielec, 1) = &
|
shell_vgl(ishell, ielec, 1) = &
|
||||||
shell_vgl(ishell, ielec, 1) + v
|
shell_vgl(ishell, ielec, 1) + v
|
||||||
|
|
||||||
@ -2429,7 +2420,6 @@ integer function qmckl_compute_ao_basis_shell_gaussian_vgl_f(context, &
|
|||||||
end do
|
end do
|
||||||
|
|
||||||
end do
|
end do
|
||||||
|
|
||||||
end do
|
end do
|
||||||
|
|
||||||
end do
|
end do
|
||||||
@ -2783,7 +2773,6 @@ end function qmckl_ao_power_f
|
|||||||
|
|
||||||
#+begin_src f90 :tangle (eval f_test)
|
#+begin_src f90 :tangle (eval f_test)
|
||||||
integer(c_int32_t) function test_qmckl_ao_power(context) bind(C)
|
integer(c_int32_t) function test_qmckl_ao_power(context) bind(C)
|
||||||
|
|
||||||
use qmckl
|
use qmckl
|
||||||
use qmckl_probes_f
|
use qmckl_probes_f
|
||||||
|
|
||||||
@ -3380,7 +3369,6 @@ qmckl_exit_code qmckl_provide_ao_vgl(qmckl_context context)
|
|||||||
:END:
|
:END:
|
||||||
|
|
||||||
#+NAME: qmckl_ao_vgl_args
|
#+NAME: qmckl_ao_vgl_args
|
||||||
|
|
||||||
| ~qmckl_context~ | ~context~ | in | Global state |
|
| ~qmckl_context~ | ~context~ | in | Global state |
|
||||||
| ~int64_t~ | ~ao_num~ | in | Number of AOs |
|
| ~int64_t~ | ~ao_num~ | in | Number of AOs |
|
||||||
| ~int64_t~ | ~shell_num~ | in | Number of shells |
|
| ~int64_t~ | ~shell_num~ | in | Number of shells |
|
||||||
@ -3447,7 +3435,6 @@ integer function qmckl_compute_ao_vgl_f(context, &
|
|||||||
! TODO : Use numerical precision here
|
! TODO : Use numerical precision here
|
||||||
cutoff = -dlog(1.d-15)
|
cutoff = -dlog(1.d-15)
|
||||||
|
|
||||||
|
|
||||||
do ielec = 1, elec_num
|
do ielec = 1, elec_num
|
||||||
e_coord(1) = elec_coord(ielec,1)
|
e_coord(1) = elec_coord(ielec,1)
|
||||||
e_coord(2) = elec_coord(ielec,2)
|
e_coord(2) = elec_coord(ielec,2)
|
||||||
@ -3725,7 +3712,6 @@ printf(" ao_vgl ao_vgl[0][26][224] %25.15e\n", ao_vgl[0][26][224]);
|
|||||||
printf(" ao_vgl ao_vgl[1][26][224] %25.15e\n", ao_vgl[1][26][224]);
|
printf(" ao_vgl ao_vgl[1][26][224] %25.15e\n", ao_vgl[1][26][224]);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
|
|
||||||
assert( fabs(ao_vgl[0][26][219] - ( 1.020298798341620e-08)) < 1.e-14 );
|
assert( fabs(ao_vgl[0][26][219] - ( 1.020298798341620e-08)) < 1.e-14 );
|
||||||
assert( fabs(ao_vgl[1][26][219] - (-4.928035238010602e-08)) < 1.e-14 );
|
assert( fabs(ao_vgl[1][26][219] - (-4.928035238010602e-08)) < 1.e-14 );
|
||||||
assert( fabs(ao_vgl[0][26][220] - ( 1.516643537739178e-08)) < 1.e-14 );
|
assert( fabs(ao_vgl[0][26][220] - ( 1.516643537739178e-08)) < 1.e-14 );
|
||||||
|
Loading…
Reference in New Issue
Block a user