mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-08-17 10:51:44 +02:00
Fixed bug in type_nucl_vector dim. #22
This commit is contained in:
parent
672f0e771c
commit
2cd5a31cba
@ -2267,7 +2267,7 @@ qmckl_exit_code qmckl_provide_factor_en(qmckl_context context)
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | nucl_num | in | Number of nucleii |
|
||||
| int64_t | type_nucl_num | in | Number of unique nuclei |
|
||||
| int64_t | type_nucl_vector[type_nucl_num] | in | IDs of unique nucleii |
|
||||
| int64_t | type_nucl_vector[nucl_num] | in | IDs of unique nucleii |
|
||||
| int64_t | aord_num | in | Number of coefficients |
|
||||
| double | aord_vector[aord_num + 1][type_nucl_num] | in | List of coefficients |
|
||||
| double | en_distance_rescaled[walk_num][nucl_num][elec_num] | in | Electron-nucleus distances |
|
||||
@ -2282,9 +2282,9 @@ integer function qmckl_compute_factor_en_f(context, walk_num, elec_num, nucl_num
|
||||
implicit none
|
||||
integer(qmckl_context), intent(in) :: context
|
||||
integer*8 , intent(in) :: walk_num, elec_num, aord_num, nucl_num, type_nucl_num
|
||||
integer*8 , intent(in) :: type_nucl_vector(type_nucl_num)
|
||||
integer*8 , intent(in) :: type_nucl_vector(nucl_num)
|
||||
double precision , intent(in) :: aord_vector(aord_num + 1, type_nucl_num)
|
||||
double precision , intent(in) :: en_distance_rescaled(elec_num, nucl_num, walk_num)
|
||||
double precision , intent(in) :: en_distance_rescaled(walk_num, nucl_num, elec_num)
|
||||
double precision , intent(out) :: factor_en(walk_num)
|
||||
|
||||
integer*8 :: i, a, p, ipar, nw
|
||||
@ -2322,18 +2322,18 @@ integer function qmckl_compute_factor_en_f(context, walk_num, elec_num, nucl_num
|
||||
do nw =1, walk_num
|
||||
do a = 1, nucl_num
|
||||
do i = 1, elec_num
|
||||
x = en_distance_rescaled(i, a, nw)
|
||||
x = en_distance_rescaled(nw, a, i)
|
||||
power_ser = 0.0d0
|
||||
|
||||
do p = 2, aord_num
|
||||
x = x * en_distance_rescaled(i, a, nw)
|
||||
x = x * en_distance_rescaled(nw, a, i)
|
||||
power_ser = power_ser + aord_vector(p + 1, type_nucl_vector(a)) * x
|
||||
end do
|
||||
|
||||
factor_en(nw) = factor_en(nw) + aord_vector(1, type_nucl_vector(a)) * &
|
||||
en_distance_rescaled(i, a, nw) / &
|
||||
en_distance_rescaled(nw, a, i) / &
|
||||
(1.0d0 + aord_vector(2, type_nucl_vector(a)) * &
|
||||
en_distance_rescaled(i, a, nw)) &
|
||||
en_distance_rescaled(nw, a, i)) &
|
||||
+ power_ser
|
||||
|
||||
end do
|
||||
@ -2386,10 +2386,10 @@ end function qmckl_compute_factor_en_f
|
||||
integer (c_int64_t) , intent(in) , value :: elec_num
|
||||
integer (c_int64_t) , intent(in) , value :: nucl_num
|
||||
integer (c_int64_t) , intent(in) , value :: type_nucl_num
|
||||
integer (c_int64_t) , intent(in) :: type_nucl_vector(type_nucl_num)
|
||||
integer (c_int64_t) , intent(in) :: type_nucl_vector(nucl_num)
|
||||
integer (c_int64_t) , intent(in) , value :: aord_num
|
||||
real (c_double ) , intent(in) :: aord_vector(aord_num + 1, type_nucl_num)
|
||||
real (c_double ) , intent(in) :: en_distance_rescaled(elec_num,nucl_num,walk_num)
|
||||
real (c_double ) , intent(in) :: en_distance_rescaled(walk_num, nucl_num, elec_num)
|
||||
real (c_double ) , intent(out) :: factor_en(walk_num)
|
||||
|
||||
integer(c_int32_t), external :: qmckl_compute_factor_en_f
|
||||
@ -2562,7 +2562,7 @@ qmckl_exit_code qmckl_provide_factor_en_deriv_e(qmckl_context context)
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | nucl_num | in | Number of nucleii |
|
||||
| int64_t | type_nucl_num | in | Number of unique nuclei |
|
||||
| int64_t | type_nucl_vector[type_nucl_num] | in | IDs of unique nucleii |
|
||||
| int64_t | type_nucl_vector[nucl_num] | in | IDs of unique nucleii |
|
||||
| int64_t | aord_num | in | Number of coefficients |
|
||||
| double | aord_vector[aord_num + 1][type_nucl_num] | in | List of coefficients |
|
||||
| double | en_distance_rescaled[walk_num][nucl_num][elec_num] | in | Electron-nucleus distances |
|
||||
@ -2578,7 +2578,7 @@ integer function qmckl_compute_factor_en_deriv_e_f(context, walk_num, elec_num,
|
||||
implicit none
|
||||
integer(qmckl_context), intent(in) :: context
|
||||
integer*8 , intent(in) :: walk_num, elec_num, aord_num, nucl_num, type_nucl_num
|
||||
integer*8 , intent(in) :: type_nucl_vector(type_nucl_num)
|
||||
integer*8 , intent(in) :: type_nucl_vector(nucl_num)
|
||||
double precision , intent(in) :: aord_vector(aord_num + 1, type_nucl_num)
|
||||
double precision , intent(in) :: en_distance_rescaled(walk_num, elec_num, nucl_num)
|
||||
double precision , intent(in) :: en_distance_rescaled_deriv_e(walk_num, 4, elec_num, nucl_num)
|
||||
@ -2715,7 +2715,7 @@ end function qmckl_compute_factor_en_deriv_e_f
|
||||
integer (c_int64_t) , intent(in) , value :: elec_num
|
||||
integer (c_int64_t) , intent(in) , value :: nucl_num
|
||||
integer (c_int64_t) , intent(in) , value :: type_nucl_num
|
||||
integer (c_int64_t) , intent(in) :: type_nucl_vector(type_nucl_num)
|
||||
integer (c_int64_t) , intent(in) :: type_nucl_vector(nucl_num)
|
||||
integer (c_int64_t) , intent(in) , value :: aord_num
|
||||
real (c_double ) , intent(in) :: aord_vector(aord_num + 1, type_nucl_num)
|
||||
real (c_double ) , intent(in) :: en_distance_rescaled(elec_num,nucl_num,walk_num)
|
||||
|
Loading…
Reference in New Issue
Block a user