10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-24 14:12:24 +02: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')