3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-22 04:13:47 +01:00

Fix default value of filename in calc_density_correction

This commit is contained in:
Gernot J. Kraberger 2017-10-24 09:49:54 +02:00 committed by Gernot Kraberger
parent d181378115
commit 78b8b1d0ee

View File

@ -1362,15 +1362,15 @@ class SumkDFT(object):
""" """
assert dm_type in ('vasp', 'wien2k'), "'dm_type' must be either 'vasp' or 'wienk'" assert dm_type in ('vasp', 'wien2k'), "'dm_type' must be either 'vasp' or 'wienk'"
assert type(filename) == StringType, ("calc_density_correction: "
"filename has to be a string!")
if filename is None: if filename is None:
if dm_type == 'wien2k': if dm_type == 'wien2k':
filename = 'dens_mat.dat' filename = 'dens_mat.dat'
elif dm_type == 'vasp': elif dm_type == 'vasp':
filename = 'GAMMA' filename = 'GAMMA'
assert type(filename) == StringType, ("calc_density_correction: "
"filename has to be a string!")
ntoi = self.spin_names_to_ind[self.SO] ntoi = self.spin_names_to_ind[self.SO]
spn = self.spin_block_names[self.SO] spn = self.spin_block_names[self.SO]
dens = {sp: 0.0 for sp in spn} dens = {sp: 0.0 for sp in spn}