File tree Expand file tree Collapse file tree 4 files changed +58
-0
lines changed
test/python/plovasp/converter Expand file tree Collapse file tree 4 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ [General]
2+ BASENAME = converter/svo
3+
4+ [Group 1]
5+ SHELLS = 1
6+ NORMALIZE = True
7+ EWINDOW = -1.4 2.0
8+
9+ [Shell 1]
10+ LSHELL = 2
11+ IONS = 2
12+
13+ TRANSFORM = 1.0 0.0 0.0 0.0 0.0
14+ 0.0 1.0 0.0 0.0 0.0
15+ 0.0 0.0 0.0 1.0 0.0
16+
Original file line number Diff line number Diff line change 1+
2+ import os
3+ import rpath
4+ _rpath = os .path .dirname (rpath .__file__ ) + '/'
5+
6+ from triqs_dft_tools .converters .plovasp .converter import generate_and_output_as_text
7+ from triqs_dft_tools .converters import VaspConverter
8+ import mytest
9+
10+ ################################################################################
11+ #
12+ # TestConverterOneSite
13+ #
14+ ################################################################################
15+ class TestConverterSVO (mytest .MyTestCase ):
16+ """
17+ Function:
18+
19+ def generate_and_output_as_text(pars, el_struct)
20+ and
21+ VaspConverter
22+
23+ Scenarios:
24+
25+ - Parse config file and produce a correct converted h5-file
26+ """
27+ # Scenario 1
28+ def test_convert_svo (self ):
29+ generate_and_output_as_text (_rpath + 'svo.cfg' , _rpath + 'svo/' )
30+
31+ test_file = _rpath + 'svo.test.h5'
32+ converter = VaspConverter (filename = _rpath + 'svo' ,
33+ hdf_filename = test_file )
34+
35+ converter .convert_dft_input ()
36+
37+ expected_file = _rpath + 'svo.ref.h5'
38+ self .assertH5FileEqual (test_file , expected_file )
39+
40+ if __name__ == '__main__' :
41+ import unittest
42+ unittest .main (verbosity = 2 , buffer = False )
You can’t perform that action at this time.
0 commit comments