3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-23 12:55:17 +01:00
dft_tools/test/python/elk/elk_transport_convert.py
AlynJ c202286341
Elk Transport code and subsequent updates (#229)
* elk-transport
* minor updates
* specify explicitly fortran compiler and python exe in CMAKE

Co-authored-by: Alexander Hampel <ahampel@flatironinstitute.org>
2023-01-04 17:16:57 -05:00

25 lines
678 B
Python

import os
from h5 import *
from triqs.utility.comparison_tests import *
from triqs.utility.h5diff import h5diff
import triqs.utility.mpi as mpi
from triqs_dft_tools.converters import ElkConverter
#get current working directory path
cwd = format(os.getcwd())
#location of test directory
testdir = cwd+'/elk_transport_convert'
#change to test directory
os.chdir(testdir)
Converter = ElkConverter(filename='SrVO3', repacking=True)
Converter.hdf_file = 'elk_transport_convert.out.h5'
Converter.convert_dft_input()
Converter.convert_transport_input()
if mpi.is_master_node():
h5diff('elk_transport_convert.out.h5','elk_transport_convert.ref.h5')
#return to cwd
os.chdir(cwd)