9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 11:33:29 +01:00

fixed byte vs str handling in converter

This commit is contained in:
Kevin Gasperich 2020-06-23 13:09:26 -05:00
parent 1b298d083d
commit 008fc4be2b

View File

@ -72,6 +72,8 @@ def convert_kpts(filename,qph5path):
ezfio.set_nuclei_nucl_charge(nucl_charge)
ezfio.set_nuclei_nucl_coord(nucl_coord)
if isinstance(nucl_label[0],bytes):
nucl_label = list(map(lambda x:x.decode(),nucl_label))
ezfio.set_nuclei_nucl_label(nucl_label)
ezfio.set_nuclei_io_nuclear_repulsion('Read')
@ -260,6 +262,8 @@ def convert_cplx(filename,qph5path):
ezfio.set_nuclei_nucl_charge(nucl_charge)
ezfio.set_nuclei_nucl_coord(nucl_coord)
if isinstance(nucl_label[0],bytes):
nucl_label = list(map(lambda x:x.decode(),nucl_label))
ezfio.set_nuclei_nucl_label(nucl_label)
ezfio.set_nuclei_io_nuclear_repulsion('Read')