10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 12:23:43 +01:00

Added Jastrow parameters in EZFIO

This commit is contained in:
Anthony Scemama 2023-09-19 15:19:33 +02:00
parent 1e12eba42b
commit c44d624ceb
7 changed files with 96 additions and 50 deletions

View File

@ -829,4 +829,8 @@ if __name__ == "__main__":
# _| # _|
for (m, dict_ezfio_cfg) in l_dict_ezfio_cfg: for (m, dict_ezfio_cfg) in l_dict_ezfio_cfg:
if dict_ezfio_cfg == {}:
print("Error: Empty EZFIO.cfg in ", arguments["--path_module"])
sys.exit(-1)
code_generation(arguments, dict_ezfio_cfg, m) code_generation(arguments, dict_ezfio_cfg, m)

69
src/jastrow/EZFIO.cfg Normal file
View File

@ -0,0 +1,69 @@
[jast_type]
doc: Type of Jastrow [None| Mu | Qmckl]
type: character*(32)
interface: ezfio, provider, ocaml
default: None
[jast_qmckl_type_nucl_num]
doc: Number of different nuclei types in QMCkl jastrow
type: integer
interface: ezfio, provider
[jast_qmckl_type_nucl_vector]
doc: Nucleus type in QMCkl jastrow
type: integer
size: (nuclei.nucl_num)
interface: ezfio, provider
[jast_qmckl_rescale_ee]
doc: Rescaling factor for electron-electron in QMCkl Jastrow
type: double precision
interface: ezfio, provider
[jast_qmckl_rescale_en]
doc: Rescaling factor for electron-nucleus in QMCkl Jastrow
type: double precision
size: (jastrow.jast_qmckl_type_nucl_num)
interface: ezfio, provider
[jast_qmckl_aord_num]
doc: Order of polynomials in e-n parameters of QMCkl jastrow
type: integer
interface: ezfio, provider
[jast_qmckl_bord_num]
doc: Order of polynomials in e-e parameters of QMCkl jastrow
type: integer
interface: ezfio, provider
[jast_qmckl_cord_num]
doc: Order of polynomials in e-e-n parameters of QMCkl jastrow
type: integer
interface: ezfio, provider
[jast_qmckl_c_vector_size]
doc: Number of parameters for c_vector
type: integer
interface: ezfio, provider
[jast_qmckl_a_vector]
doc: electron-nucleus parameters in QMCkl Jastrow
type: double precision
size: (jastrow.jast_qmckl_type_nucl_num*jastrow.jast_qmckl_aord_num+jastrow.jast_qmckl_type_nucl_num)
interface: ezfio, provider
[jast_qmckl_b_vector]
doc: electron-electron parameters in QMCkl Jastrow
type: double precision
size: (jastrow.jast_qmckl_bord_num+1)
interface: ezfio, provider
[jast_qmckl_c_vector]
doc: electron-electron-nucleus parameters in QMCkl Jastrow
type: double precision
size: (jastrow.jast_qmckl_c_vector_size)
interface: ezfio, provider

2
src/jastrow/NEED Normal file
View File

@ -0,0 +1,2 @@
nuclei
electrons

3
src/jastrow/README.md Normal file
View File

@ -0,0 +1,3 @@
# Jastrow
Information relative to the Jastrow factor in trans-correlated calculations.

View File

@ -1,3 +1,4 @@
qmckl qmckl
jastrow
ao_tc_eff_map ao_tc_eff_map
bi_ortho_mos bi_ortho_mos

View File

@ -26,77 +26,43 @@ BEGIN_PROVIDER [ integer*8, qmckl_ctx_jastrow ]
! Jastrow parameters ! Jastrow parameters
rc = qmckl_set_jastrow_champ_type_nucl_num (qmckl_ctx_jastrow, 2_8) rc = qmckl_set_jastrow_champ_type_nucl_num(qmckl_ctx_jastrow, 1_8*jast_qmckl_type_nucl_num)
rc = qmckl_check(qmckl_ctx_jastrow, rc) rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1 if (rc /= QMCKL_SUCCESS) stop -1
rc = qmckl_set_jastrow_champ_type_nucl_vector (qmckl_ctx_jastrow, (/0_8,1_8,1_8/), 1_8*nucl_num) rc = qmckl_set_jastrow_champ_type_nucl_vector(qmckl_ctx_jastrow, 1_8*jast_qmckl_type_nucl_vector-1_8, 1_8*nucl_num)
rc = qmckl_check(qmckl_ctx_jastrow, rc) rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1 if (rc /= QMCKL_SUCCESS) stop -1
rc = qmckl_set_jastrow_champ_rescale_factor_ee (qmckl_ctx_jastrow, 0.6d0) rc = qmckl_set_jastrow_champ_rescale_factor_ee(qmckl_ctx_jastrow, jast_qmckl_rescale_ee)
rc = qmckl_check(qmckl_ctx_jastrow, rc) rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1 if (rc /= QMCKL_SUCCESS) stop -1
rc = qmckl_set_jastrow_champ_rescale_factor_en (qmckl_ctx_jastrow, (/0.6d0, 0.6d0 /), 2_8 ) rc = qmckl_set_jastrow_champ_rescale_factor_en(qmckl_ctx_jastrow, jast_qmckl_rescale_en, 1_8*jast_qmckl_type_nucl_num)
rc = qmckl_check(qmckl_ctx_jastrow, rc) rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1 if (rc /= QMCKL_SUCCESS) stop -1
rc = qmckl_set_jastrow_champ_aord_num (qmckl_ctx_jastrow, 5_8) rc = qmckl_set_jastrow_champ_aord_num(qmckl_ctx_jastrow, jast_qmckl_aord_num*1_8)
rc = qmckl_check(qmckl_ctx_jastrow, rc) rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1 if (rc /= QMCKL_SUCCESS) stop -1
rc = qmckl_set_jastrow_champ_bord_num (qmckl_ctx_jastrow, 5_8) rc = qmckl_set_jastrow_champ_a_vector(qmckl_ctx_jastrow, jast_qmckl_a_vector, 1_8*size(jast_qmckl_a_vector))
rc = qmckl_check(qmckl_ctx_jastrow, rc) rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1 if (rc /= QMCKL_SUCCESS) stop -1
rc = qmckl_set_jastrow_champ_cord_num (qmckl_ctx_jastrow, 0_8) rc = qmckl_set_jastrow_champ_bord_num(qmckl_ctx_jastrow, jast_qmckl_bord_num*1_8)
rc = qmckl_check(qmckl_ctx_jastrow, rc) rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1 if (rc /= QMCKL_SUCCESS) stop -1
! double precision :: a_vector(12) = dble(& rc = qmckl_set_jastrow_champ_b_vector(qmckl_ctx_jastrow, jast_qmckl_b_vector, 1_8*size(jast_qmckl_b_vector))
! (/ 0.00000000, 0.00000000, -0.71168405, -0.44415699, -0.13865109, 0.07002267 , &
! 0.00000000, 0.00000000, -0.11379992, 0.04542846, 0.01696997, -0.01809299 /) )
! double precision :: b_vector(6) = dble(&
! (/ 0.00000000, 0.65603311, 0.14581988, 0.03138163, 0.00153156, -0.00447302 /) )
! double precision :: c_vector(46) = &
! (/ 1.06384279d0, -1.44303973d0, -0.92409833d0, 0.11845356d0, -0.02980776d0, &
! 1.07048863d0, 0.06009623d0, -0.01854872d0, -0.00915398d0, 0.01324198d0, &
! -0.00504959d0, -0.01202497d0, -0.00531644d0, 0.15101629d0, -0.00723831d0, &
! -0.00384182d0, -0.00295036d0, -0.00114583d0, 0.00158107d0, -0.00078107d0, &
! -0.00080000d0, -0.14140576d0, -0.00237271d0, -0.03006706d0, 0.01537009d0, &
! -0.02327226d0, 0.16502789d0, -0.01458259d0, -0.09946065d0, 0.00850029d0, &
! -0.02969361d0, -0.01159547d0, 0.00516313d0, 0.00405247d0, -0.02200886d0, &
! 0.03376709d0, 0.01277767d0, -0.01523013d0, -0.00739224d0, -0.00463953d0, &
! 0.00003174d0, -0.01421128d0, 0.00808140d0, 0.00612988d0, -0.00610632d0, &
! 0.01926215d0 /)
! a_vector = 0.d0
! b_vector = 0.d0
! c_vector = 0.d0
double precision :: a_vector(12) = dble(&
(/ 0.00000000 , 0.00000000, -0.45105821, -0.23519218, -0.03825391, 0.10072866, &
0.00000000 , 0.00000000, -0.06930592, -0.02909224, -0.00134650, 0.01477242 /) )
double precision :: b_vector(6) = dble(&
(/ 0.00000000, 0.00000000, 0.29217862, -0.00450671, -0.02925982, -0.01381532 /) )
double precision :: c_vector(46)
c_vector = 0.d0
rc = qmckl_set_jastrow_champ_a_vector(qmckl_ctx_jastrow, a_vector, 12_8)
rc = qmckl_check(qmckl_ctx_jastrow, rc) rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1 if (rc /= QMCKL_SUCCESS) stop -1
rc = qmckl_set_jastrow_champ_b_vector(qmckl_ctx_jastrow, b_vector, 6_8)
rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
! rc = qmckl_set_jastrow_champ_c_vector(qmckl_ctx_jastrow, c_vector, 46_8) if (jast_qmckl_cord_num > 0) then
! rc = qmckl_check(qmckl_ctx_jastrow, rc) rc = qmckl_set_jastrow_champ_c_vector(qmckl_ctx_jastrow, jast_qmckl_c_vector, 1_8*jast_qmckl_c_vector_size)
! if (rc /= QMCKL_SUCCESS) stop -1 rc = qmckl_check(qmckl_ctx_jastrow, rc)
if (rc /= QMCKL_SUCCESS) stop -1
endif
END_PROVIDER END_PROVIDER

View File

@ -5,7 +5,7 @@ interface: ezfio, provider
[nucl_label] [nucl_label]
doc: Nuclear labels doc: Nuclear labels
type: character*(32) type: character*(32)
size: (nuclei.nucl_num) size: (nuclei.nucl_num)
interface: ezfio, provider interface: ezfio, provider
@ -17,7 +17,7 @@ interface: ezfio, provider
[nucl_coord] [nucl_coord]
doc: Nuclear coordinates in the format (:, {x,y,z}) doc: Nuclear coordinates in the format (:, {x,y,z})
type: double precision type: double precision
size: (nuclei.nucl_num,3) size: (nuclei.nucl_num,3)
interface: ezfio interface: ezfio
@ -37,11 +37,12 @@ type: logical
doc: If true, the calculation uses periodic boundary conditions doc: If true, the calculation uses periodic boundary conditions
interface: ezfio, provider, ocaml interface: ezfio, provider, ocaml
default: false default: false
[n_pts_charge] [n_pts_charge]
type: integer type: integer
doc: Number of point charges to be added to the potential doc: Number of point charges to be added to the potential
interface: ezfio interface: ezfio
default: 0 default: 0
[pts_charge_z] [pts_charge_z]
type: double precision type: double precision