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_bandcharacter_convert.py
AlynJ ce4aed3551
elk-interface bug fixes (#228)
updated the Elk interface to fix some minor bugs which arose for certain systems with equivalent atoms. I've also included new tests for this interface and collated all of these interface tests in the "test/python/elk" subdirectory.
2022-11-10 11:11:28 -05:00

25 lines
657 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_bandcharacter_convert'
#change to test directory
os.chdir(testdir)
Converter = ElkConverter(filename='SrVO3', repacking=True)
Converter.hdf_file = 'elk_bc_convert.out.h5'
Converter.convert_dft_input()
Converter.dft_band_characters()
if mpi.is_master_node():
h5diff('elk_bc_convert.out.h5','elk_bc_convert.ref.h5')
#return to cwd
os.chdir(cwd)