Skip to content

Commit

Permalink
reverting commits
Browse files Browse the repository at this point in the history
  • Loading branch information
Miki Bonacci committed Feb 14, 2024
1 parent badb9f1 commit f4fd5d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions aiida_yambo_wannier90/workflows/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def define(cls, spec):
valid_type=orm.KpointsData,
required=False,
help=(
"Explicit kpoints to use for the band structure. "
"Explicit kpoints to use for the band structure. (specify also the labels) "
"If not specified, the workchain will run seekpath to generate "
"a primitive cell and a bands_kpoints. Specify either this or `bands_kpoints_distance`."
),
Expand Down Expand Up @@ -626,9 +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.current_bands_kpoints = self.inputs.bands_kpoints
self.ctx.bands_kpoints = self.inputs.bands_kpoints

# Converged mesh from YamboConvergence
self.ctx.kpoints_gw_conv = None
Expand Down Expand Up @@ -691,8 +691,9 @@ def run_seekpath(self):
result = seekpath_structure_analysis(**args)

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

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

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

inputs.wannier90.structure = self.ctx.current_structure

#params = inputs.wannier90.parameters.get_dict()
#params["bands_plot"] = False
#inputs.wannier90.parameters = orm.Dict(params)

inputs.wannier90.bands_kpoints = self.ctx.current_bands_kpoints

# Use commensurate kmesh
Expand Down
2 changes: 1 addition & 1 deletion examples/example_01.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from aiida_wannier90_workflows.cli.params import RUN
from aiida_wannier90_workflows.utils.workflows.builder.serializer import print_builder
from aiida_wannier90_workflows.utils.kpoints import get_explicit_kpoints_from_mesh
from aiida_wannier90_workflows.utils.workflows.builder.setter import set_parallelization, set_num_bands, set_kpoints
from aiida_wannier90_workflows.utils.workflows.builder.setter import set_parallelization, set_num_bands
from aiida_wannier90_workflows.utils.workflows.builder.submit import submit_and_add_group
from aiida_wannier90_workflows.common.types import WannierProjectionType
from aiida_wannier90_workflows.workflows import Wannier90BandsWorkChain
Expand Down

0 comments on commit f4fd5d6

Please sign in to comment.