Skip to content

Commit

Permalink
Tweak seekpath for Hubbard
Browse files Browse the repository at this point in the history
  • Loading branch information
bastonero committed Mar 27, 2024
1 parent 88347db commit 2199f45
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
from aiida.engine import calcfunction
from aiida.orm import Data

from aiida_quantumespresso.data.hubbard_structure import HubbardStructureData
from aiida_quantumespresso.utils.hubbard import HubbardUtils


@calcfunction
def seekpath_structure_analysis(structure, **kwargs):
Expand All @@ -28,4 +31,14 @@ def seekpath_structure_analysis(structure, **kwargs):
# 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)
result = get_explicit_kpoints_path(structure, **unwrapped_kwargs)

if not isinstance(structure, HubbardStructureData):
return result

primitive = result['primitive_structure']
hutils = HubbardUtils(structure)
primitive_hubbard = hutils.get_hubbard_for_supercell(primitive)

result['primitive_structure'] = primitive_hubbard
return result

0 comments on commit 2199f45

Please sign in to comment.