mirror of
https://github.com/triqs/dft_tools
synced 2024-12-22 12:23:41 +01:00
Renamed 'params' to 'proj_params' in class Plocar
This commit is contained in:
parent
f457f5cc7a
commit
89b7a95a8b
@ -56,7 +56,7 @@ class ElectronicStructure:
|
|||||||
# For later use it is more convenient to use a different order of indices
|
# For later use it is more convenient to use a different order of indices
|
||||||
# [see ProjectorGroup.orthogonalization()]
|
# [see ProjectorGroup.orthogonalization()]
|
||||||
self.proj_raw = vasp_data.plocar.plo
|
self.proj_raw = vasp_data.plocar.plo
|
||||||
self.proj_params = vasp_data.plocar.params
|
self.proj_params = vasp_data.plocar.proj_params
|
||||||
|
|
||||||
self.ferw = vasp_data.eigenval.ferw
|
self.ferw = vasp_data.eigenval.ferw
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ class Plocar:
|
|||||||
vasp_dir += '/'
|
vasp_dir += '/'
|
||||||
|
|
||||||
# self.params, self.plo, self.ferw = c_plocar_io.read_plocar(vasp_dir + plocar_filename)
|
# self.params, self.plo, self.ferw = c_plocar_io.read_plocar(vasp_dir + plocar_filename)
|
||||||
self.params, self.plo = self.temp_parser(projcar_filename=vasp_dir + "PROJCAR", locproj_filename=vasp_dir + "LOCPROJ")
|
self.proj_params, self.plo = self.temp_parser(projcar_filename=vasp_dir + "PROJCAR", locproj_filename=vasp_dir + "LOCPROJ")
|
||||||
|
|
||||||
def temp_parser(self, projcar_filename='PROJCAR', locproj_filename='LOCPROJ'):
|
def temp_parser(self, projcar_filename='PROJCAR', locproj_filename='LOCPROJ'):
|
||||||
r"""
|
r"""
|
||||||
@ -105,7 +105,7 @@ class Plocar:
|
|||||||
nproj, nspin, nk, nband = map(int, line.split())
|
nproj, nspin, nk, nband = map(int, line.split())
|
||||||
|
|
||||||
plo = np.zeros((nproj, nspin, nk, nband), dtype=np.complex128)
|
plo = np.zeros((nproj, nspin, nk, nband), dtype=np.complex128)
|
||||||
params = [{} for i in xrange(nproj)]
|
proj_params = [{} for i in xrange(nproj)]
|
||||||
|
|
||||||
iproj_site = 0
|
iproj_site = 0
|
||||||
is_first_read = True
|
is_first_read = True
|
||||||
@ -115,9 +115,11 @@ class Plocar:
|
|||||||
isite = int(line.split()[1])
|
isite = int(line.split()[1])
|
||||||
if not is_first_read:
|
if not is_first_read:
|
||||||
for il in xrange(norb):
|
for il in xrange(norb):
|
||||||
params[iproj_site * norb + il]['isite'] = isite
|
ip_new = iproj_site * norb + il
|
||||||
params[iproj_site * norb + il]['l'] = params[(iproj_site - 1) * norb + il]['l']
|
ip_prev = (iproj_site - 1) * norb + il
|
||||||
params[iproj_site * norb + il]['m'] = params[(iproj_site - 1) * norb + il]['m']
|
proj_params[ip_new]['isite'] = isite
|
||||||
|
proj_params[ip_new]['l'] = proj_params[ip_prev]['l']
|
||||||
|
proj_params[ip_new]['m'] = proj_params[ip_prev]['m']
|
||||||
|
|
||||||
for ispin in xrange(nspin):
|
for ispin in xrange(nspin):
|
||||||
for ik in xrange(nk):
|
for ik in xrange(nk):
|
||||||
@ -132,9 +134,9 @@ class Plocar:
|
|||||||
l, m = lm_to_l_m(lm)
|
l, m = lm_to_l_m(lm)
|
||||||
|
|
||||||
# For the first read 'iproj_site = 0' and only orbital index 'il' is used
|
# For the first read 'iproj_site = 0' and only orbital index 'il' is used
|
||||||
params[il]['isite'] = isite
|
proj_params[il]['isite'] = isite
|
||||||
params[il]['l'] = l
|
proj_params[il]['l'] = l
|
||||||
params[il]['m'] = m
|
proj_params[il]['m'] = m
|
||||||
|
|
||||||
is_first_read = False
|
is_first_read = False
|
||||||
|
|
||||||
@ -151,10 +153,10 @@ class Plocar:
|
|||||||
line = self.search_for(f, "^ *ISITE")
|
line = self.search_for(f, "^ *ISITE")
|
||||||
|
|
||||||
print "Read parameters:"
|
print "Read parameters:"
|
||||||
for il, par in enumerate(params):
|
for il, par in enumerate(proj_params):
|
||||||
print il, " -> ", par
|
print il, " -> ", par
|
||||||
|
|
||||||
return params, plo
|
return proj_params, plo
|
||||||
|
|
||||||
|
|
||||||
def search_for(self, f, patt):
|
def search_for(self, f, patt):
|
||||||
|
Loading…
Reference in New Issue
Block a user