diff --git a/aiida_quantumespresso/workflows/functions/seekpath_structure_analysis.py b/aiida_quantumespresso/workflows/functions/seekpath_structure_analysis.py index 3d389806b..9d2490a0d 100644 --- a/aiida_quantumespresso/workflows/functions/seekpath_structure_analysis.py +++ b/aiida_quantumespresso/workflows/functions/seekpath_structure_analysis.py @@ -2,15 +2,31 @@ """Calcfunction to primitivize a structure and return high symmetry k-point path through its Brillouin zone.""" from __future__ import absolute_import from aiida.engine import calcfunction +from aiida.orm import Data @calcfunction -def seekpath_structure_analysis(structure, parameters): - """Primitivize the structure with SeeKpath and return high symmetry k-point path through its Brillouin zone. +def seekpath_structure_analysis(structure, **kwargs): + """Primitivize the structure with SeeKpath and generate the high symmetry k-point path through its Brillouin zone. This calcfunction will take a structure and pass it through SeeKpath to get the normalized primitive cell and the path of high symmetry k-points through its Brillouin zone. Note that the returned primitive cell may differ from the original structure in which case the k-points are only congruent with the primitive cell. + + The keyword arguments can be used to specify various Seekpath parameters, such as: + + with_time_reversal: True + reference_distance: 0.025 + recipe: 'hpkot' + threshold: 1e-07 + symprec: 1e-05 + angle_tolerance: -1.0 + + Note that exact parameters that are available and their defaults will depend on your Seekpath version. """ from aiida.tools import get_explicit_kpoints_path - return get_explicit_kpoints_path(structure, **parameters.get_dict()) + + # All keyword arugments should be `Data` node instances of base type and so should have the `.value` attribute + unwrapped_kwargs = {key: node.value for key, node in kwargs.items() if isinstance(node, Data)} + + return get_explicit_kpoints_path(structure, **unwrapped_kwargs)