mirror of
https://github.com/triqs/dft_tools
synced 2024-12-23 12:55:17 +01:00
fixed bug in band selection and output to .pg files. ewindow is not read by vasp_converter anymore.
This commit is contained in:
parent
a882ffa575
commit
90b331c5a8
@ -331,9 +331,14 @@ def plo_output(conf_pars, el_struct, pshells, pgroups):
|
|||||||
print " Storing PLO-group file '%s'..."%(plo_fname)
|
print " Storing PLO-group file '%s'..."%(plo_fname)
|
||||||
head_dict = {}
|
head_dict = {}
|
||||||
|
|
||||||
head_dict['ewindow'] = (pgroup.emin, pgroup.emax)
|
|
||||||
head_dict['nb_max'] = pgroup.nb_max
|
head_dict['nb_max'] = pgroup.nb_max
|
||||||
|
|
||||||
|
if 'bands' in conf_pars.groups[ig]:
|
||||||
|
head_dict['bandwindow'] = (pgroup.ib_min, pgroup.ib_max)
|
||||||
|
else:
|
||||||
|
head_dict['ewindow'] = (pgroup.emin, pgroup.emax)
|
||||||
|
|
||||||
# Number of electrons within the window
|
# Number of electrons within the window
|
||||||
head_dict['nelect'] = pgroup.nelect_window(el_struct)
|
head_dict['nelect'] = pgroup.nelect_window(el_struct)
|
||||||
print " Density within window:", head_dict['nelect']
|
print " Density within window:", head_dict['nelect']
|
||||||
@ -366,7 +371,11 @@ def plo_output(conf_pars, el_struct, pshells, pgroups):
|
|||||||
f.write("#END OF HEADER\n")
|
f.write("#END OF HEADER\n")
|
||||||
|
|
||||||
# Eigenvalues within the window
|
# Eigenvalues within the window
|
||||||
|
if 'bands' in conf_pars.groups[ig]:
|
||||||
|
f.write("# Eigenvalues within the band window: %s, %s\n"%(pgroup.ib_min+1, pgroup.ib_max+1))
|
||||||
|
else:
|
||||||
f.write("# Eigenvalues within the energy window: %s, %s\n"%(pgroup.emin, pgroup.emax))
|
f.write("# Eigenvalues within the energy window: %s, %s\n"%(pgroup.emin, pgroup.emax))
|
||||||
|
|
||||||
nk, nband, ns_band = el_struct.eigvals.shape
|
nk, nband, ns_band = el_struct.eigvals.shape
|
||||||
for isp in xrange(ns_band):
|
for isp in xrange(ns_band):
|
||||||
f.write("# is = %i\n"%(isp + 1))
|
f.write("# is = %i\n"%(isp + 1))
|
||||||
|
@ -72,8 +72,8 @@ class ProjectorGroup:
|
|||||||
ib_win = np.zeros((nk, ns_band, 2), dtype=np.int32)
|
ib_win = np.zeros((nk, ns_band, 2), dtype=np.int32)
|
||||||
ib_win[:,:,0] = gr_pars['bands'][0]-1
|
ib_win[:,:,0] = gr_pars['bands'][0]-1
|
||||||
ib_win[:,:,1] = gr_pars['bands'][1]-1
|
ib_win[:,:,1] = gr_pars['bands'][1]-1
|
||||||
ib_min = gr_pars['bands'][0]
|
ib_min = gr_pars['bands'][0] - 1
|
||||||
ib_max = gr_pars['bands'][1]
|
ib_max = gr_pars['bands'][1] - 1
|
||||||
|
|
||||||
else:
|
else:
|
||||||
ib_win, ib_min, ib_max = self.select_bands(eigvals)
|
ib_win, ib_min, ib_max = self.select_bands(eigvals)
|
||||||
@ -82,6 +82,11 @@ class ProjectorGroup:
|
|||||||
self.ib_max = ib_max
|
self.ib_max = ib_max
|
||||||
self.nb_max = ib_max - ib_min + 1
|
self.nb_max = ib_max - ib_min + 1
|
||||||
|
|
||||||
|
print self.ib_win
|
||||||
|
print self.ib_min
|
||||||
|
print self.ib_max
|
||||||
|
print self.nb_max
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if gr_pars['complement']:
|
if gr_pars['complement']:
|
||||||
|
@ -188,7 +188,6 @@ class VaspConverter(ConverterTools):
|
|||||||
gr_head = json.loads(jheader)
|
gr_head = json.loads(jheader)
|
||||||
|
|
||||||
|
|
||||||
e_win = gr_head['ewindow']
|
|
||||||
nb_max = gr_head['nb_max']
|
nb_max = gr_head['nb_max']
|
||||||
p_shells = gr_head['shells']
|
p_shells = gr_head['shells']
|
||||||
density_required = gr_head['nelect']
|
density_required = gr_head['nelect']
|
||||||
|
Loading…
Reference in New Issue
Block a user