3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-22 20:34:38 +01:00
dft_tools/test/plovasp/converter/test_converter_lunio3.py

43 lines
1.2 KiB
Python
Raw Normal View History

import os
import rpath
_rpath = os.path.dirname(rpath.__file__) + '/'
2018-12-04 18:59:02 +01:00
from triqs_dft_tools.converters.plovasp.converter import generate_and_output_as_text
from triqs_dft_tools.converters import VaspConverter
import mytest
################################################################################
#
# TestConverterLuNiO3
#
################################################################################
class TestConverterLuNiO3(mytest.MyTestCase):
"""
Function:
def generate_and_output_as_text(pars, el_struct)
and
VaspConverter
Scenarios:
- Parse the config file and produce a correct h5-file for DFTTools.
"""
# Scenario 1
def test_convert_lunio3(self):
generate_and_output_as_text(_rpath + 'lunio3.cfg', _rpath + 'lunio3/')
test_file = _rpath + 'lunio3.test.h5'
2018-05-04 17:18:31 +02:00
converter = VaspConverter(filename=_rpath + 'lunio3',
hdf_filename=test_file)
converter.convert_dft_input()
expected_file = _rpath + 'lunio3.out.h5'
self.assertH5FileEqual(test_file, expected_file)
if __name__ == '__main__':
import unittest
unittest.main(verbosity=2, buffer=False)