@@ -627,6 +627,9 @@ def setup(self) -> None: # pylint: disable=inconsistent-return-statements
627
627
628
628
self .ctx .current_structure = self .inputs .structure
629
629
630
+ self .ctx .current_kpoint_path = None
631
+ self .ctx .current_bands_kpoints = None
632
+
630
633
if "bands_kpoints" in self .inputs :
631
634
self .ctx .current_bands_kpoints = self .inputs .bands_kpoints
632
635
@@ -691,8 +694,16 @@ def run_seekpath(self):
691
694
result = seekpath_structure_analysis (** args )
692
695
693
696
self .ctx .current_structure = result ["primitive_structure" ]
694
- self .ctx .current_bands_kpoints = result ["explicit_kpoints" ]
695
-
697
+ #self.ctx.current_bands_kpoints = result["explicit_kpoints"]
698
+
699
+ # Add `kpoint_path` for Wannier bands
700
+ self .ctx .current_kpoint_path = orm .Dict (
701
+ dict = {
702
+ "path" : result ["parameters" ]["path" ],
703
+ "point_coords" : result ["parameters" ]["point_coords" ],
704
+ }
705
+ )
706
+
696
707
structure_formula = self .inputs .structure .get_formula ()
697
708
primitive_structure_formula = result ["primitive_structure" ].get_formula ()
698
709
self .report (
@@ -1054,7 +1065,11 @@ def prepare_wannier90_pp_inputs(self) -> AttributeDict:
1054
1065
)["wannier90" ]
1055
1066
1056
1067
inputs .wannier90 .structure = self .ctx .current_structure
1057
- inputs .wannier90 .bands_kpoints = self .ctx .current_bands_kpoints
1068
+
1069
+ if self .ctx .current_kpoint_path :
1070
+ inputs .wannier90 .kpoint_path = self .ctx .current_kpoint_path
1071
+ if self .ctx .current_bands_kpoints :
1072
+ inputs .wannier90 .bands_kpoints = self .ctx .current_bands_kpoints
1058
1073
1059
1074
# Use commensurate kmesh
1060
1075
if self .ctx .kpoints_w90_input != self .ctx .kpoints_w90 :
@@ -1166,7 +1181,10 @@ def prepare_wannier90_inputs(self) -> AttributeDict:
1166
1181
)
1167
1182
1168
1183
inputs .structure = self .ctx .current_structure
1169
- inputs .bands_kpoints = self .ctx .current_bands_kpoints
1184
+ if self .ctx .current_kpoint_path :
1185
+ inputs .kpoint_path = self .ctx .current_kpoint_path
1186
+ if self .ctx .current_bands_kpoints :
1187
+ inputs .bands_kpoints = self .ctx .current_bands_kpoints
1170
1188
1171
1189
# Use commensurate kmesh
1172
1190
if self .ctx .kpoints_w90_input != self .ctx .kpoints_w90 :
@@ -1252,7 +1270,10 @@ def prepare_wannier90_qp_inputs(self) -> AttributeDict:
1252
1270
)
1253
1271
1254
1272
inputs .wannier90 .structure = self .ctx .current_structure
1255
- inputs .wannier90 .bands_kpoints = self .ctx .current_bands_kpoints
1273
+ if self .ctx .current_kpoint_path :
1274
+ inputs .wannier90 .kpoint_path = self .ctx .current_kpoint_path
1275
+ if self .ctx .current_bands_kpoints :
1276
+ inputs .wannier90 .bands_kpoints = self .ctx .current_bands_kpoints
1256
1277
1257
1278
if self .ctx .kpoints_w90_input != self .ctx .kpoints_w90 :
1258
1279
set_kpoints (
0 commit comments