Skip to content

Commit

Permalink
mend
Browse files Browse the repository at this point in the history
  • Loading branch information
the-hampel committed Nov 19, 2024
1 parent 5b2e091 commit 9851010
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/python/plovasp/converter/svo.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[General]
BASENAME = converter/svo

[Group 1]
SHELLS = 1
NORMALIZE = True
EWINDOW = -1.4 2.0

[Shell 1]
LSHELL = 2
IONS = 2

TRANSFORM = 1.0 0.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0 0.0
0.0 0.0 0.0 1.0 0.0

Binary file added test/python/plovasp/converter/svo.ref.h5
Binary file not shown.
Binary file added test/python/plovasp/converter/svo/vaspout.h5
Binary file not shown.
42 changes: 42 additions & 0 deletions test/python/plovasp/converter/test_converter_svo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

import os
import rpath
_rpath = os.path.dirname(rpath.__file__) + '/'

from triqs_dft_tools.converters.plovasp.converter import generate_and_output_as_text
from triqs_dft_tools.converters import VaspConverter
import mytest

################################################################################
#
# TestConverterOneSite
#
################################################################################
class TestConverterSVO(mytest.MyTestCase):
"""
Function:
def generate_and_output_as_text(pars, el_struct)
and
VaspConverter
Scenarios:
- Parse config file and produce a correct converted h5-file
"""
# Scenario 1
def test_convert_svo(self):
generate_and_output_as_text(_rpath + 'svo.cfg', _rpath + 'svo/')

test_file = _rpath + 'svo.test.h5'
converter = VaspConverter(filename=_rpath + 'svo',
hdf_filename=test_file)

converter.convert_dft_input()

expected_file = _rpath + 'svo.ref.h5'
self.assertH5FileEqual(test_file, expected_file)

if __name__ == '__main__':
import unittest
unittest.main(verbosity=2, buffer=False)

0 comments on commit 9851010

Please sign in to comment.