-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5b2e091
commit 9851010
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |