10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-15 10:33:50 +01:00
QuantumPackage/plugins/local/non_h_ints_mu/qmckl.irp.f

78 lines
2.8 KiB
Fortran
Raw Normal View History

2023-09-15 11:30:10 +02:00
BEGIN_PROVIDER [ integer*8, qmckl_ctx_jastrow ]
use qmckl
2023-09-26 18:39:13 +02:00
use iso_c_binding
2023-09-15 11:30:10 +02:00
implicit none
BEGIN_DOC
! Context for the QMCKL library
END_DOC
integer(qmckl_exit_code) :: rc
qmckl_ctx_jastrow = qmckl_context_create()
2023-09-27 16:02:08 +02:00
rc = qmckl_set_jastrow_champ_spin_independent(qmckl_ctx_jastrow, 1)
2023-09-26 18:39:13 +02:00
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
2023-09-15 11:30:10 +02:00
rc = qmckl_set_nucleus_num(qmckl_ctx_jastrow, nucl_num*1_8)
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
rc = qmckl_set_nucleus_charge(qmckl_ctx_jastrow, nucl_charge, nucl_num*1_8)
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
rc = qmckl_set_nucleus_coord(qmckl_ctx_jastrow, 'T', nucl_coord, nucl_num*3_8)
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
rc = qmckl_set_electron_num(qmckl_ctx_jastrow, 1_8, 1_8)
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
! Jastrow parameters
2023-09-19 15:19:33 +02:00
rc = qmckl_set_jastrow_champ_type_nucl_num(qmckl_ctx_jastrow, 1_8*jast_qmckl_type_nucl_num)
2023-09-15 11:30:10 +02:00
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
2023-09-19 15:19:33 +02:00
rc = qmckl_set_jastrow_champ_type_nucl_vector(qmckl_ctx_jastrow, 1_8*jast_qmckl_type_nucl_vector-1_8, 1_8*nucl_num)
2023-09-15 11:30:10 +02:00
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
2023-09-19 15:19:33 +02:00
rc = qmckl_set_jastrow_champ_rescale_factor_ee(qmckl_ctx_jastrow, jast_qmckl_rescale_ee)
2023-09-15 11:30:10 +02:00
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
2023-09-19 15:19:33 +02:00
rc = qmckl_set_jastrow_champ_rescale_factor_en(qmckl_ctx_jastrow, jast_qmckl_rescale_en, 1_8*jast_qmckl_type_nucl_num)
2023-09-15 11:30:10 +02:00
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
2023-09-19 15:19:33 +02:00
rc = qmckl_set_jastrow_champ_aord_num(qmckl_ctx_jastrow, jast_qmckl_aord_num*1_8)
2023-09-15 11:30:10 +02:00
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
2023-09-19 15:19:33 +02:00
rc = qmckl_set_jastrow_champ_a_vector(qmckl_ctx_jastrow, jast_qmckl_a_vector, 1_8*size(jast_qmckl_a_vector))
2023-09-15 11:30:10 +02:00
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
2023-09-19 15:19:33 +02:00
rc = qmckl_set_jastrow_champ_bord_num(qmckl_ctx_jastrow, jast_qmckl_bord_num*1_8)
2023-09-15 11:30:10 +02:00
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
2023-09-19 15:19:33 +02:00
rc = qmckl_set_jastrow_champ_b_vector(qmckl_ctx_jastrow, jast_qmckl_b_vector, 1_8*size(jast_qmckl_b_vector))
2023-09-15 11:30:10 +02:00
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
2023-09-22 16:26:58 +02:00
rc = qmckl_set_jastrow_champ_cord_num(qmckl_ctx_jastrow, jast_qmckl_cord_num*1_8)
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
2023-09-19 15:19:33 +02:00
if (jast_qmckl_cord_num > 0) then
rc = qmckl_set_jastrow_champ_c_vector(qmckl_ctx_jastrow, jast_qmckl_c_vector, 1_8*jast_qmckl_c_vector_size)
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
endif
2023-09-15 11:30:10 +02:00
END_PROVIDER