3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-07 06:33:48 +01:00

Modified ElectronicStructure for new projectors

Some necessary modifications to class ElectronicStructure in order
to conform the modified projector input. In particular, the dimensions
of the projector array are now taken directly from the array,
and the old dictionary 'params' is replaced with a list 'proj_params'
containing information on the character of projectors.
This commit is contained in:
Oleg E. Peil 2015-10-14 17:36:39 +02:00
parent 4cc989fbea
commit f457f5cc7a
2 changed files with 13 additions and 12 deletions

View File

@ -55,26 +55,23 @@ 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.transpose((0, 1, 2, 4, 3)) self.proj_raw = vasp_data.plocar.plo
self.proj_params = vasp_data.plocar.params
# In fact, Fermi weights do not depend on ions
# FIXME: restructure the data in PLOCAR to remove the redundant dependency
# of 'ferw' on ions
self.ferw = vasp_data.eigenval.ferw self.ferw = vasp_data.eigenval.ferw
# Not needed any more since PROJCAR contains projectors only for a subset of sites
# Check that the number of atoms is the same in PLOCAR and POSCAR # Check that the number of atoms is the same in PLOCAR and POSCAR
natom_plo = vasp_data.plocar.params['nion'] # natom_plo = vasp_data.plocar.params['nion']
assert natom_plo == self.natom, "PLOCAR is inconsistent with POSCAR (number of atoms)" # assert natom_plo == self.natom, "PLOCAR is inconsistent with POSCAR (number of atoms)"
# Check that the number of k-points is the same in all files # Check that the number of k-points is the same in all files
nk_plo = vasp_data.plocar.params['nk'] _, ns_plo, nk_plo, nb_plo = vasp_data.plocar.plo.shape
assert nk_plo == self.nktot, "PLOCAR is inconsistent with IBZKPT (number of k-points)" assert nk_plo == self.nktot, "PLOCAR is inconsistent with IBZKPT (number of k-points)"
nk_eig = vasp_data.eigenval.nktot nk_eig = vasp_data.eigenval.nktot
assert nk_eig == self.nktot, "PLOCAR is inconsistent with EIGENVAL (number of k-points)" assert nk_eig == self.nktot, "PLOCAR is inconsistent with EIGENVAL (number of k-points)"
# Check that the number of band is the same in PLOCAR and EIGENVAL # Check that the number of band is the same in PROJCAR and EIGENVAL
nb_plo = vasp_data.plocar.params['nb']
assert nb_plo == self.nband, "PLOCAR is inconsistent with EIGENVAL (number of bands)" assert nb_plo == self.nband, "PLOCAR is inconsistent with EIGENVAL (number of bands)"

View File

@ -469,8 +469,12 @@ class Doscar:
f = read_lines(vasp_dir + dos_filename) f = read_lines(vasp_dir + dos_filename)
# Skip first 5 lines # First line: NION, NION, JOBPAR, NCDIJ
for _ in xrange(5): sline = f.next().split()
self.ncdij = int(sline[3])
# Skip next 4 lines
for _ in xrange(4):
sline = f.next() sline = f.next()
# Sixth line: EMAX, EMIN, NEDOS, EFERMI, 1.0 # Sixth line: EMAX, EMIN, NEDOS, EFERMI, 1.0