mirror of
https://github.com/triqs/dft_tools
synced 2024-11-07 06:33:48 +01:00
[transport] Change names, correct some issues in merge
Simplify writing/reading from h5
This commit is contained in:
parent
cc82ba2d5a
commit
9283702fc1
@ -59,7 +59,6 @@ class Wien2kConverter(ConverterTools):
|
||||
self.oubwin_file = filename+'.oubwin'
|
||||
|
||||
# Checks if h5 file is there and repacks it if wanted:
|
||||
import os.path
|
||||
if (os.path.exists(self.hdf_file) and repacking):
|
||||
ConverterTools.repack(self)
|
||||
|
||||
@ -535,28 +534,13 @@ class Wien2kConverter(ConverterTools):
|
||||
|
||||
print "Read in %s files done!" %self.oubwin_file
|
||||
|
||||
|
||||
# Put data to HDF5 file
|
||||
ar = HDFArchive(self.hdf_file, 'a')
|
||||
if not (self.transp_subgrp in ar): ar.create_group(self.transp_subgrp)
|
||||
# The subgroup containing the data. If it does not exist, it is created.
|
||||
# If it exists, the data is overwritten!!!
|
||||
|
||||
# Data from .pmat file
|
||||
ar[self.transp_subgrp]['bandwin_opt'] = bandwin_opt
|
||||
ar[self.transp_subgrp]['kp'] = kp
|
||||
ar[self.transp_subgrp]['vk'] = vk
|
||||
# Data from .struct file
|
||||
ar[self.transp_subgrp]['latticetype'] = latticetype
|
||||
ar[self.transp_subgrp]['latticeconstants'] = latticeconstants
|
||||
ar[self.transp_subgrp]['latticeangles'] = latticeangles
|
||||
# Data from .outputs file
|
||||
ar[self.transp_subgrp]['nsymm'] = nsymm
|
||||
ar[self.transp_subgrp]['symmcartesian'] = symmcartesian
|
||||
ar[self.transp_subgrp]['taucartesian'] = taucartesian
|
||||
# Data from .oubwin files
|
||||
ar[self.transp_subgrp]['bandwin'] = bandwin
|
||||
|
||||
# The subgroup containing the data. If it does not exist, it is created. If it exists, the data is overwritten!!!
|
||||
things_to_save = ['bandwin_opt', 'kp', 'vk', 'latticetype', 'latticeconstants', 'latticeangles', 'nsymm', 'symmcartesian',
|
||||
'taucartesian', 'bandwin']
|
||||
for it in things_to_save: ar[self.transp_subgrp][it] = locals()[it]
|
||||
del ar
|
||||
|
||||
def convert_symmetry_input(self, orbits, symm_file, symm_subgrp, SO, SP):
|
||||
|
Loading…
Reference in New Issue
Block a user