Skip to content

Commit

Permalink
maybe fixed the seekpath update
Browse files Browse the repository at this point in the history
missing:

specify the kpoint path in the inputs... only the bands_kpoints.
  • Loading branch information
Miki Bonacci committed Feb 13, 2024
1 parent badb9f1 commit f41434d
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions aiida_yambo_wannier90/workflows/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@ def setup(self) -> None: # pylint: disable=inconsistent-return-statements

self.ctx.current_structure = self.inputs.structure

self.ctx.current_kpoint_path = None
self.ctx.current_bands_kpoints = None

if "bands_kpoints" in self.inputs:
self.ctx.current_bands_kpoints = self.inputs.bands_kpoints

Expand Down Expand Up @@ -691,8 +694,16 @@ def run_seekpath(self):
result = seekpath_structure_analysis(**args)

self.ctx.current_structure = result["primitive_structure"]
self.ctx.current_bands_kpoints = result["explicit_kpoints"]

#self.ctx.current_bands_kpoints = result["explicit_kpoints"]

# Add `kpoint_path` for Wannier bands
self.ctx.current_kpoint_path = orm.Dict(
dict={
"path": result["parameters"]["path"],
"point_coords": result["parameters"]["point_coords"],
}
)

structure_formula = self.inputs.structure.get_formula()
primitive_structure_formula = result["primitive_structure"].get_formula()
self.report(
Expand Down Expand Up @@ -1054,7 +1065,11 @@ def prepare_wannier90_pp_inputs(self) -> AttributeDict:
)["wannier90"]

inputs.wannier90.structure = self.ctx.current_structure
inputs.wannier90.bands_kpoints = self.ctx.current_bands_kpoints

if self.ctx.current_kpoint_path:
inputs.wannier90.kpoint_path = self.ctx.current_kpoint_path
if self.ctx.current_bands_kpoints:
inputs.wannier90.bands_kpoints = self.ctx.current_bands_kpoints

# Use commensurate kmesh
if self.ctx.kpoints_w90_input != self.ctx.kpoints_w90:
Expand Down Expand Up @@ -1166,7 +1181,10 @@ def prepare_wannier90_inputs(self) -> AttributeDict:
)

inputs.structure = self.ctx.current_structure
inputs.bands_kpoints = self.ctx.current_bands_kpoints
if self.ctx.current_kpoint_path:
inputs.kpoint_path = self.ctx.current_kpoint_path
if self.ctx.current_bands_kpoints:
inputs.bands_kpoints = self.ctx.current_bands_kpoints

# Use commensurate kmesh
if self.ctx.kpoints_w90_input != self.ctx.kpoints_w90:
Expand Down Expand Up @@ -1252,7 +1270,10 @@ def prepare_wannier90_qp_inputs(self) -> AttributeDict:
)

inputs.wannier90.structure = self.ctx.current_structure
inputs.wannier90.bands_kpoints = self.ctx.current_bands_kpoints
if self.ctx.current_kpoint_path:
inputs.wannier90.kpoint_path = self.ctx.current_kpoint_path
if self.ctx.current_bands_kpoints:
inputs.wannier90.bands_kpoints = self.ctx.current_bands_kpoints

if self.ctx.kpoints_w90_input != self.ctx.kpoints_w90:
set_kpoints(
Expand Down

0 comments on commit f41434d

Please sign in to comment.