Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/aiida_epw/workflows/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from aiida import orm
from aiida.common import AttributeDict

from aiida.engine import WorkChain, ToContext, if_
from aiida.engine import WorkChain, if_
from aiida_quantumespresso.workflows.ph.base import PhBaseWorkChain
from aiida_quantumespresso.workflows.protocols.utils import ProtocolMixin

Expand Down Expand Up @@ -327,7 +327,7 @@ def run_wannier90(self):
workchain_node = self.submit(w90_class, **inputs)
self.report(f"launching {w90_class.get_name()}<{workchain_node.pk}>")

return ToContext(workchain_w90_bands=workchain_node)
return {'workchain_w90_bands': workchain_node}

def inspect_wannier90(self):
"""Verify that the wannier90 workflow finished successfully."""
Expand Down Expand Up @@ -360,7 +360,7 @@ def run_ph(self):
workchain_node = self.submit(PhBaseWorkChain, **inputs)
self.report(f"launching PhBaseWorkChain<{workchain_node.pk}>")

return ToContext(workchain_ph=workchain_node)
return {'workchain_ph': workchain_node}

def inspect_ph(self):
"""Verify that the `PhBaseWorkChain` finished successfully."""
Expand Down Expand Up @@ -412,7 +412,7 @@ def run_epw(self):
f"launching EpwBaseWorkChain<{workchain_node.pk}> in transformation mode"
)

return ToContext(workchain_epw=workchain_node)
return {'workchain_epw': workchain_node}

def inspect_epw(self):
"""Verify that the `EpwBaseWorkChain` finished successfully."""
Expand Down
8 changes: 4 additions & 4 deletions src/aiida_epw/workflows/supercon.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from aiida import orm
from aiida.common import AttributeDict
from aiida.engine import WorkChain, ToContext, while_, if_, append_
from aiida.engine import WorkChain, while_, if_, append_

from aiida_quantumespresso.workflows.protocols.utils import ProtocolMixin

Expand Down Expand Up @@ -333,7 +333,7 @@ def run_conv(self):
f"launching EpwBaseWorkChain<{workchain_node.pk}> in a2f mode: convergence #{self.ctx.iteration}"
)

return ToContext(epw_interp=append_(workchain_node))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you give this a try to see if it works as expected?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it works normally, just as good as ToContext.

return {'epw_interp': append_(workchain_node)}

def inspect_conv(self):
"""Verify that the EpwBaseWorkChain in interpolation mode finished successfully."""
Expand Down Expand Up @@ -389,7 +389,7 @@ def run_final_epw_iso(self):
f"launching EpwBaseWorkChain<{workchain_node.pk}> in isotropic mode"
)

return ToContext(final_epw_iso=workchain_node)
return {'final_epw_iso': workchain_node}

def inspect_final_epw_iso(self):
"""Verify that the final EpwBaseWorkChain in isotropic mode finished successfully."""
Expand Down Expand Up @@ -418,7 +418,7 @@ def run_final_epw_aniso(self):
f"launching EpwBaseWorkChain<{workchain_node.pk}> in anisotropic mode"
)

return ToContext(final_epw_aniso=workchain_node)
return {'final_epw_aniso': workchain_node}

def inspect_final_epw_aniso(self):
"""Verify that the final EpwBaseWorkChain in anisotropic mode finished successfully."""
Expand Down