From 91a040fa81a26215cb67fb7d159baaa70d4b12a6 Mon Sep 17 00:00:00 2001 From: Kevin Gasperich Date: Fri, 15 Sep 2023 15:52:15 -0500 Subject: [PATCH] keep madelung const separate from enuc in converter --- bin/qp_convert_h5_to_ezfio | 2 ++ src/utils_complex/MolPyscfToQPkpts.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/qp_convert_h5_to_ezfio b/bin/qp_convert_h5_to_ezfio index aa85303c..c2fde5b1 100755 --- a/bin/qp_convert_h5_to_ezfio +++ b/bin/qp_convert_h5_to_ezfio @@ -936,6 +936,7 @@ def convert_kpts(filename,qph5path,qmcpack=True): nucl_coord=qph5['nuclei/nucl_coord'][()].T.tolist() nucl_label=qph5['nuclei/nucl_label'][()].tolist() nuclear_repulsion = qph5['nuclei'].attrs['nuclear_repulsion'] + madconst = qph5['nuclei'].attrs.get('madelung_const',default=0) ezfio.set_nuclei_nucl_charge(nucl_charge) ezfio.set_nuclei_nucl_coord(nucl_coord) @@ -945,6 +946,7 @@ def convert_kpts(filename,qph5path,qmcpack=True): ezfio.set_nuclei_io_nuclear_repulsion('Read') ezfio.set_nuclei_nuclear_repulsion(nuclear_repulsion) + ezfio.set_nuclei_madelung_constant(madconst) ########################################## diff --git a/src/utils_complex/MolPyscfToQPkpts.py b/src/utils_complex/MolPyscfToQPkpts.py index 26964da3..ebd676f0 100644 --- a/src/utils_complex/MolPyscfToQPkpts.py +++ b/src/utils_complex/MolPyscfToQPkpts.py @@ -858,7 +858,7 @@ def pyscf2QP2(cell,mf, kpts, kmesh=None, cas_idx=None, int_threshold = 1E-8, with h5py.File(qph5path,'a') as qph5: qph5['nuclei'].attrs['nuclear_repulsion']=e_nuc - qph5['nuclei'].attrs['madelung_pyscf']=madelung + qph5['nuclei'].attrs['madelung_const']=madelung ########################################## # #