diff --git a/mushroom/aims/gw.py b/mushroom/aims/gw.py index 9a500e1..6b6e763 100644 --- a/mushroom/aims/gw.py +++ b/mushroom/aims/gw.py @@ -249,7 +249,10 @@ def set_sigc(n, s, kp, k, sigc): data_bands.append(data_band) if merge_band_kpoints: - data_bands = np.concatenate(data_bands, axis=2) + if len(data_bands) > 0: + data_bands = np.concatenate(data_bands, axis=2) + else: + data_bands = np.zeros((nomegas, nspins, 0, nstates)) return omegas, state_low, data_kgrid, data_bands diff --git a/scripts/m_aims_append_basis b/scripts/m_aims_append_basis index 8a84e00..2a5f373 100755 --- a/scripts/m_aims_append_basis +++ b/scripts/m_aims_append_basis @@ -30,8 +30,9 @@ def m_aims_apppend_basis(control_file, directory, *elem, species_defaults=None): if len(regions) > 1: print("Replacing existing basis information in control file {}".format(control_file)) sl = readlines_species_defaults(directory, *elem, species_defaults=species_defaults) + ctrl_new = "".join(gl) + sl with open(control_file, 'w') as h: - print("".join(gl + sl), file=h) + print(ctrl_new, file=h) if __name__ == '__main__':