@@ -74,11 +74,11 @@ class VaspData:
74
74
def __init__ (self , vasp_dir , read_all = True , efermi_required = True ):
75
75
self .vasp_dir = vasp_dir
76
76
77
- # NEW vasptriqs .h5
78
- vasptriqs = os .path .isfile (os .path .join (vasp_dir , 'vasptriqs .h5' ))
79
- if vasptriqs :
80
- log .warning ("Reading from vasptriqs .h5" )
81
- h5path = os .path .join (vasp_dir , 'vasptriqs .h5' )
77
+ # read from vaspout .h5 if possible
78
+ vasph5 = os .path .isfile (os .path .join (vasp_dir , 'vaspout .h5' ))
79
+ if vasph5 :
80
+ log .warning ("Reading from vaspout .h5" )
81
+ h5path = os .path .join (vasp_dir , 'vaspout .h5' )
82
82
self .plocar = h5Plocar (h5path )
83
83
self .poscar = h5Poscar (h5path )
84
84
self .kpoints = h5Kpoints (h5path )
@@ -669,7 +669,7 @@ def __init__(self, h5path):
669
669
# self.q_cart = None
670
670
671
671
with HDFArchive (h5path , 'a' ) as archive :
672
- struct = archive ['triqs' ][ 'structure ' ]
672
+ struct = archive ['results/positions ' ]
673
673
ascale = struct ['scale' ]
674
674
self .a_brav = struct ['lattice_vectors' ]
675
675
self .nions = struct ['number_ion_types' ]
@@ -715,8 +715,8 @@ def __init__(self, h5path):
715
715
716
716
# h5path = './vasptriqs.h5'
717
717
with HDFArchive (h5path , 'a' ) as archive :
718
- kpoints = archive ['triqs' ][ 'kpoints ' ]
719
- self .nktot = kpoints ['num_kpoints ' ]
718
+ kpoints = archive ['results/electron_eigenvalues ' ]
719
+ self .nktot = kpoints ['kpoints ' ]
720
720
self .kpts = kpoints ['kpoint_coords' ]
721
721
self .kwghts = kpoints ['kpoints_symmetry_weight' ]
722
722
try :
@@ -736,8 +736,8 @@ class h5Eigenval:
736
736
737
737
def __init__ (self , h5path ):
738
738
with HDFArchive (h5path , 'a' ) as archive :
739
- self .eigs = archive ['triqs ' ]['eigenvalues' ]
740
- self .ferw = archive ['triqs ' ]['fermi_weights ' ]
739
+ self .eigs = archive ['results/electron_eigenvalues ' ]['eigenvalues' ]
740
+ self .ferw = archive ['results/electron_eigenvalues ' ]['fermiweights ' ]
741
741
# TODO Change the format in VASP to have [kpoints, bands, spin]
742
742
self .eigs = np .transpose (self .eigs , (1 , 2 , 0 ))
743
743
self .ferw = np .transpose (self .ferw , (1 , 2 , 0 ))
@@ -747,15 +747,15 @@ class h5Doscar:
747
747
748
748
def __init__ (self , h5path ):
749
749
with HDFArchive (h5path , 'a' ) as archive :
750
- self .efermi = archive ['triqs ' ]['efermi' ]
750
+ self .efermi = archive ['results/electron_dos ' ]['efermi' ]
751
751
752
752
753
753
class h5Plocar ():
754
754
755
755
def __init__ (self , h5path ):
756
756
with HDFArchive (h5path , 'a' ) as archive :
757
- plo = np .array (archive ['triqs ' ]['plo ' ])
758
- self .nc_flag = int (archive ['triqs ' ]['noncoll ' ])
757
+ plo = np .array (archive ['results/locproj ' ]['data ' ])
758
+ self .nc_flag = int (archive ['results/locproj/parameters ' ]['lnoncollinear ' ])
759
759
760
760
self .nproj = plo .shape [0 ]
761
761
self .ncdij = plo .shape [1 ]
@@ -791,13 +791,13 @@ def lm_to_l_m(lm):
791
791
self .proj_params = [{} for i in range (self .nproj )]
792
792
with HDFArchive (h5path , 'a' ) as archive :
793
793
for it in range (self .nproj ):
794
- projectors = archive ['triqs ' ]['plo_parameters' ][ str ( it + 1 ) ]
795
- self .proj_params [it ]['label' ] = projectors ['ang_type' ]
796
- self .proj_params [it ]['isite' ] = projectors ['site' ]
797
- self .proj_params [it ]['coord' ] = projectors ['coordinates' ]
794
+ projectors = archive ['results/locproj ' ]['parameters' ]
795
+ self .proj_params [it ]['label' ] = projectors ['ang_type' ][ it ]
796
+ self .proj_params [it ]['isite' ] = projectors ['site' ][ it ]
797
+ self .proj_params [it ]['coord' ] = projectors ['coordinates' ][ it ]
798
798
799
799
for it in range (self .nproj ):
800
- lm = orb_labels .index (self .proj_params [it ]['label' ])
800
+ lm = orb_labels .index (self .proj_params [it ]['label' ]. strip () )
801
801
l , m = lm_to_l_m (lm )
802
802
self .proj_params [it ]['l' ] = l
803
803
if self .nc_flag == True :
0 commit comments