@@ -626,17 +626,6 @@ def setup(self) -> None: # pylint: disable=inconsistent-return-statements
626
626
"""Initialize context variables."""
627
627
628
628
self .ctx .current_structure = self .inputs .structure
629
-
630
- self .ctx .current_kpoint_path = None
631
- self .ctx .current_bands_kpoints = None
632
-
633
- if "kpoint_path" in self .inputs :
634
- self .ctx .current_kpoint_path = get_path_from_kpoints (
635
- self .inputs .kpoint_path
636
- )
637
-
638
- if "bands_kpoints" in self .inputs :
639
- self .ctx .current_bands_kpoints = self .inputs .bands_kpoints
640
629
641
630
642
631
# Converged mesh from YamboConvergence
@@ -685,6 +674,11 @@ def setup(self) -> None: # pylint: disable=inconsistent-return-statements
685
674
686
675
def should_run_seekpath (self ):
687
676
"""Run seekpath if the `inputs.bands_kpoints` is not provided."""
677
+ if "bands_kpoints" in self .inputs :
678
+ if "kpoint_path" in self .inputs :
679
+ self .ctx .current_kpoint_path = get_path_from_kpoints (
680
+ self .inputs .bands_kpoints
681
+ )
688
682
return "bands_kpoints" not in self .inputs
689
683
690
684
def run_seekpath (self ):
@@ -702,14 +696,6 @@ def run_seekpath(self):
702
696
self .ctx .current_structure = result ["primitive_structure" ]
703
697
704
698
self .ctx .current_bands_kpoints = result ["explicit_kpoints" ]
705
-
706
- # Add `kpoint_path` for Wannier bands
707
- #self.ctx.current_kpoint_path = orm.Dict(
708
- # dict={
709
- # "path": result["parameters"]["path"],
710
- # "point_coords": result["parameters"]["point_coords"],
711
- # }
712
- #)
713
699
714
700
structure_formula = self .inputs .structure .get_formula ()
715
701
primitive_structure_formula = result ["primitive_structure" ].get_formula ()
@@ -1073,16 +1059,11 @@ def prepare_wannier90_pp_inputs(self) -> AttributeDict:
1073
1059
1074
1060
inputs .wannier90 .structure = self .ctx .current_structure
1075
1061
1076
- params = inputs .wannier90 .parameters .get_dict ()
1077
- params ["bands_plot" ] = False
1078
-
1079
- inputs .wannier90 .parameters = orm .Dict (params )
1080
-
1062
+ #params = inputs.wannier90.parameters.get_dict()
1063
+ #params["bands_plot"] = False
1064
+ #inputs.wannier90.parameters = orm.Dict(params)
1081
1065
1082
- '''if self.ctx.current_kpoint_path:
1083
- inputs.wannier90.kpoint_path = self.ctx.current_kpoint_path
1084
- if self.ctx.current_bands_kpoints:
1085
- inputs.wannier90.bands_kpoints = self.ctx.current_bands_kpoints'''
1066
+ inputs .bands_kpoints = self .ctx .current_bands_kpoints
1086
1067
1087
1068
# Use commensurate kmesh
1088
1069
if self .ctx .kpoints_w90_input != self .ctx .kpoints_w90 :
@@ -1194,10 +1175,7 @@ def prepare_wannier90_inputs(self) -> AttributeDict:
1194
1175
)
1195
1176
1196
1177
inputs .structure = self .ctx .current_structure
1197
- if self .ctx .current_kpoint_path :
1198
- inputs .kpoint_path = self .ctx .current_kpoint_path
1199
- if self .ctx .current_bands_kpoints :
1200
- inputs .bands_kpoints = self .ctx .current_bands_kpoints
1178
+ inputs .kpoint_path = self .ctx .current_kpoint_path
1201
1179
1202
1180
# Use commensurate kmesh
1203
1181
if self .ctx .kpoints_w90_input != self .ctx .kpoints_w90 :
@@ -1283,10 +1261,7 @@ def prepare_wannier90_qp_inputs(self) -> AttributeDict:
1283
1261
)
1284
1262
1285
1263
inputs .wannier90 .structure = self .ctx .current_structure
1286
- if self .ctx .current_kpoint_path :
1287
- inputs .wannier90 .kpoint_path = self .ctx .current_kpoint_path
1288
- if self .ctx .current_bands_kpoints :
1289
- inputs .wannier90 .bands_kpoints = self .ctx .current_bands_kpoints
1264
+ inputs .wannier90 .bands_kpoints = self .ctx .current_bands_kpoints
1290
1265
1291
1266
if self .ctx .kpoints_w90_input != self .ctx .kpoints_w90 :
1292
1267
set_kpoints (
0 commit comments