Skip to content

Commit

Permalink
pseudo_type return lowcase and compared in if-else (#152)
Browse files Browse the repository at this point in the history
In #140, the pseudo_type return from pseudo parser is lowcase ie nc rather than NC for norm-conserving.
Forget to change in _base work chain when setting dual_scan_list.
  • Loading branch information
unkcpz authored May 29, 2022
1 parent ab0de84 commit aad1f6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aiida_sssp_workflow/workflows/convergence/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def init_setup(self):

# set the ecutrho according to the type of pseudopotential
# dual 4 for NC and 10 for all other type of PP.
if self.ctx.pseudo_type in ['NC', 'SL']:
if self.ctx.pseudo_type == 'nc':
self.ctx.dual = 4.0
self.ctx.dual_scan_list = cutoff_control['nc_dual_scan']
else:
Expand Down
2 changes: 1 addition & 1 deletion pseudo_parser/upf_parser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def parse_pseudo_type(content: str) -> str:
raw_type = match.group("pseudo_type")
if "US" in raw_type:
return "us"
elif "NC" in raw_type:
elif "NC" in raw_type or "SL" in raw_type:
return "nc"
elif "PAW" in raw_type:
return "paw"
Expand Down

0 comments on commit aad1f6f

Please sign in to comment.