Skip to content

Commit

Permalink
Restoring the logic in the old flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Miki Bonacci committed Feb 13, 2024
1 parent b82aa83 commit 37598ca
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions aiida_yambo_wannier90/workflows/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,9 @@ def setup(self) -> None: # pylint: disable=inconsistent-return-statements
"""Initialize context variables."""

self.ctx.current_structure = self.inputs.structure


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

# Converged mesh from YamboConvergence
self.ctx.kpoints_gw_conv = None
Expand Down Expand Up @@ -674,11 +676,6 @@ def setup(self) -> None: # pylint: disable=inconsistent-return-statements

def should_run_seekpath(self):
"""Run seekpath if the `inputs.bands_kpoints` is not provided."""
if "bands_kpoints" in self.inputs:
if "kpoint_path" in self.inputs:
self.ctx.current_kpoint_path = get_path_from_kpoints(
self.inputs.bands_kpoints
)
return "bands_kpoints" not in self.inputs

def run_seekpath(self):
Expand Down Expand Up @@ -1054,7 +1051,7 @@ def should_run_wannier90_pp(self) -> bool:
def prepare_wannier90_pp_inputs(self) -> AttributeDict:
"""Prepare inputs for wannier90_pp, only for generating nnkp file."""
inputs = AttributeDict(
self.exposed_inputs(Wannier90BaseWorkChain, namespace="wannier90_pp")
self.exposed_inputs(Wannier90OptimizeWorkChain, namespace="wannier90")
)["wannier90"]

inputs.wannier90.structure = self.ctx.current_structure
Expand Down Expand Up @@ -1175,7 +1172,7 @@ def prepare_wannier90_inputs(self) -> AttributeDict:
)

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

# Use commensurate kmesh
if self.ctx.kpoints_w90_input != self.ctx.kpoints_w90:
Expand Down

0 comments on commit 37598ca

Please sign in to comment.