From 3620784798e8dc1f834b1aed1cc1f8ac77814af9 Mon Sep 17 00:00:00 2001 From: "Oleg E. Peil" Date: Mon, 30 Nov 2015 20:24:34 +0100 Subject: [PATCH] Replaced R- and C-TRANSFORM with TRANSFORM option Also, some tests were modified accordingly. --- python/converters/plovasp/inpconf.py | 3 +-- python/converters/plovasp/test/_inpconf/parse_shells_4.cfg | 6 +++--- python/converters/plovasp/test/_inpconf/runtest.sh | 2 +- python/converters/plovasp/test/_inpconf/test_input.py | 4 +++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/python/converters/plovasp/inpconf.py b/python/converters/plovasp/inpconf.py index 7a40b852..7b69e322 100644 --- a/python/converters/plovasp/inpconf.py +++ b/python/converters/plovasp/inpconf.py @@ -58,8 +58,7 @@ class ConfigParameters: 'lshell': ('lshell', int)} self.sh_optional = { - 'rtransform': ('tmatrix', lambda s: self.parse_string_tmatrix(s, real=True)), - 'ctransform': ('tmatrix', lambda s: self.parse_string_tmatrix(s, real=False)), + 'transform': ('tmatrix', lambda s: self.parse_string_tmatrix(s, real=True)), 'transfile': ('tmatrices', self.parse_file_tmatrix)} self.gr_required = { diff --git a/python/converters/plovasp/test/_inpconf/parse_shells_4.cfg b/python/converters/plovasp/test/_inpconf/parse_shells_4.cfg index d8d32970..3d682892 100644 --- a/python/converters/plovasp/test/_inpconf/parse_shells_4.cfg +++ b/python/converters/plovasp/test/_inpconf/parse_shells_4.cfg @@ -11,7 +11,7 @@ IONS = 5..8 LSHELL = 1 IONS = 1..4 -RTRANSFORM = 0.0 1.0 0.0 - 1.0 0.0 0.0 - 0.0 0.0 1.0 +TRANSFORM = 0.0 1.0 0.0 + 1.0 0.0 0.0 + 0.0 0.0 1.0 diff --git a/python/converters/plovasp/test/_inpconf/runtest.sh b/python/converters/plovasp/test/_inpconf/runtest.sh index 4537817b..10b8ee04 100755 --- a/python/converters/plovasp/test/_inpconf/runtest.sh +++ b/python/converters/plovasp/test/_inpconf/runtest.sh @@ -1 +1 @@ -PYTHONPATH=../..:../../../../c:$PYTHONPATH python $1 +PYTHONPATH=../..:../../../../../c:$PYTHONPATH python $1 diff --git a/python/converters/plovasp/test/_inpconf/test_input.py b/python/converters/plovasp/test/_inpconf/test_input.py index a0b91e36..d648f23d 100644 --- a/python/converters/plovasp/test/_inpconf/test_input.py +++ b/python/converters/plovasp/test/_inpconf/test_input.py @@ -77,7 +77,9 @@ class TestParseInput(arraytest.ArrayTestCase): res += conf_pars.groups.__repr__() expected = r"""Shells: -[{'ion_list': array([4, 5, 6, 7]), 'user_index': 1, 'lshell': 2}, {'ion_list': array([0, 1, 2, 3]), 'user_index': 2, 'lshell': 1}, {'ion_list': array([0, 1, 2, 3]), 'user_index': 3, 'lshell': 3}] +[{'ion_list': array([4, 5, 6, 7]), 'user_index': 1, 'lshell': 2}, {'tmatrix': array([[ 0., 1., 0.], + [ 1., 0., 0.], + [ 0., 0., 1.]]), 'ion_list': array([0, 1, 2, 3]), 'user_index': 2, 'lshell': 1}, {'ion_list': array([0, 1, 2, 3]), 'user_index': 3, 'lshell': 3}] Groups: [{'normalize': True, 'index': 1, 'ewindow': (-7.6, 3.0), 'normion': True, 'shells': [0, 1]}, {'normalize': True, 'index': 2, 'ewindow': (-1.6, 2.0), 'normion': True, 'shells': [2]}]"""