Skip to content

Commit

Permalink
avoiding current_kpoint_path
Browse files Browse the repository at this point in the history
  • Loading branch information
Miki Bonacci committed Feb 13, 2024
1 parent f41434d commit 2c807c2
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions aiida_yambo_wannier90/workflows/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ 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`."
"a primitive cell and a bands_kpoints. Specify either this or `bands_kpoints_distance`.
),
)
spec.input(
Expand Down Expand Up @@ -630,8 +630,14 @@ def setup(self) -> None: # pylint: disable=inconsistent-return-statements
self.ctx.current_kpoint_path = None
self.ctx.current_bands_kpoints = None

if "kpoint_path" in self.inputs:
self.ctx.current_kpoint_path = get_path_from_kpoints(
self.inputs.kpoint_path
)

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


# Converged mesh from YamboConvergence
self.ctx.kpoints_gw_conv = None
Expand Down Expand Up @@ -694,15 +700,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"],
}
)
#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()
Expand Down

0 comments on commit 2c807c2

Please sign in to comment.