diff --git a/devel/trexio/qp_import_trexio.py b/devel/trexio/qp_import_trexio.py index a713330..3258e6b 100755 --- a/devel/trexio/qp_import_trexio.py +++ b/devel/trexio/qp_import_trexio.py @@ -154,7 +154,6 @@ def write_ezfio(trexio_filename, filename): prev = i shell_prim_num.append(count) - print(shell_prim_num) assert (len(shell_prim_num) == shell_num) ezfio.set_basis_shell_prim_num(shell_prim_num) @@ -170,6 +169,8 @@ def write_ezfio(trexio_filename, filename): print("AOS\t\t...\t", end=' ') cartesian = trexio.read_ao_cartesian(trexio_file) + if not cartesian: + raise TypeError('Only cartesian TREXIO files can be converted') ao_num = trexio.read_ao_num(trexio_file) ezfio.set_ao_basis_ao_num(ao_num) @@ -242,8 +243,6 @@ def write_ezfio(trexio_filename, filename): print("MOS\t\t...\t", end=' ') - mo_num = trexio.read_mo_num(trexio_file) - label = trexio.read_mo_type(trexio_file) ezfio.set_mo_basis_mo_label(label) @@ -258,6 +257,7 @@ def write_ezfio(trexio_filename, filename): pass MoMatrix = trexio.read_mo_coefficient(trexio_file) + mo_num = trexio.read_mo_num(trexio_file) ezfio.set_mo_basis_mo_num(mo_num) ezfio.set_mo_basis_mo_coef(MoMatrix) @@ -338,9 +338,9 @@ def write_ezfio(trexio_filename, filename): ezfio.set_pseudo_pseudo_dz_k(pseudo_dz_k) for center in ecp_nl: - for k in range( len(ecp_nl[center]) ): - for l in range( len(ecp_nl[center][k]) ): - v, n, dz = ecp_nl[center][k][l] + for l in range( len(ecp_nl[center]) ): + for k in range( len(ecp_nl[center][l]) ): + v, n, dz = ecp_nl[center][l][k] pseudo_n_kl[l][k][center] = n pseudo_v_kl[l][k][center] = v pseudo_dz_kl[l][k][center] = dz