Skip to content

Commit

Permalink
[vasp] change normion default to False
Browse files Browse the repository at this point in the history
In coordination with M. Aichorn and O. Peil we decided to change the
default of the normion to False. This is closed to the behavior of the
other converters w90, elk, and wien2k, which will always orthonormalize
all projectors in a unit cell together (normion=False) and not per ion
site (normion=True). Changed tests accordingly.
  • Loading branch information
the-hampel committed Jul 24, 2023
1 parent 999cbb1 commit 23723bc
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/guide/conv_vasp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ Optional group parameters:
a per-site (per-ion) basis. That is, if `NORMION = True`, the orthogonality
condition will be enforced on each site separately but the Wannier functions
on different sites will not be orthogonal. If `NORMION = False`, the Wannier functions
on different sites included in the group will be orthogonal to each other. The default value is **True**
on different sites included in the group will be orthogonal to each other. The default value is **False**
* **BANDS** (int int): the energy window specified by two ints: band index of
lowest band and band index of highest band. Using this overrides the selection
in `EWINDOW`.
Expand Down
2 changes: 1 addition & 1 deletion python/triqs_dft_tools/converters/plovasp/inpconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self, input_filename, verbosity=1):

self.gr_optional = {
'normalize' : ('normalize', self.parse_string_logical, True),
'normion' : ('normion', self.parse_string_logical, True),
'normion' : ('normion', self.parse_string_logical, False),
'complement' : ('complement', self.parse_string_logical, False),
'bands': ('bands', self.parse_band_window)}

Expand Down
1 change: 1 addition & 0 deletions test/python/plovasp/converter/example.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ BASENAME = converter/one_site
LSHELL = 2
IONS = 2
EWINDOW = -15.0 5.0
NORMION = True


1 change: 1 addition & 0 deletions test/python/plovasp/converter/lunio3.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ IONS = [5, 6] [7, 8]
EWINDOW = -0.6 2.7
TRANSFILE = converter/lunio3/rot_dz2_dx2
NORMALIZE = True
NORMION = True

4 changes: 2 additions & 2 deletions test/python/plovasp/inpconf/test_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def test_example(self):
conf_pars.parse_groups()
res = conf_pars.groups
expected = [{'index': 1, 'shells': [1, 2], 'ewindow': (-7.6, 3.0),
'normalize': True, 'normion': True,'complement': False},
'normalize': True, 'normion': False,'complement': False},
{'index': 2, 'shells': [3], 'ewindow': (-1.6, 2.0),
'normalize': True, 'normion': True,'complement': False}]
'normalize': True, 'normion': False,'complement': False}]
print(res)
print(expected)
self.assertListEqual(res, expected)
Expand Down
4 changes: 2 additions & 2 deletions test/python/plovasp/inpconf/test_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_example(self):
[0.,0.,1.]]),'ion_sort':None,'corr':True},{'user_index':3,'ions':{'ion_list':[[0],[1],[2],[3]],'nion':4},'lshell':3,'ion_sort':None,'corr':True}]
Groups:
[{'index':1,'shells':[0,1],'ewindow':(-7.6,3.0),'normalize':True,'normion':True,'complement':False},{'index':2,'shells':[2],'ewindow':(-1.6,2.0),'normalize':True,'normion':True,'complement':False}]"""
[{'index':1,'shells':[0,1],'ewindow':(-7.6,3.0),'normalize':True,'normion':False,'complement':False},{'index':2,'shells':[2],'ewindow':(-1.6,2.0),'normalize':True,'normion':False,'complement':False}]"""

self.assertEqual(res, expected)

Expand All @@ -106,7 +106,7 @@ def test_example_no_groups(self):
[{'user_index':1,'ions':{'ion_list':[[4],[5],[6],[7]],'nion':4},'lshell':2,'ion_sort':None,'corr':True}]
Groups:
[{'index':'1','ewindow':(-7.6,3.0),'normalize':True,'normion':True,'complement':False,'shells':[0]}]"""
[{'index':'1','ewindow':(-7.6,3.0),'normalize':True,'normion':False,'complement':False,'shells':[0]}]"""

self.assertEqual(res, expected)

Expand Down

0 comments on commit 23723bc

Please sign in to comment.