Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find_parent_structure does not work from a KkrimpCalculation node #137

Open
Raff-physics opened this issue Nov 8, 2023 · 3 comments
Open
Assignees
Labels

Comments

@Raff-physics
Copy link
Contributor

Load an example KkrimpCalculation node

$ calc = load_node(...)
$ calc
<CalcJobNode: uuid: a8811c72-1992-4a5f-97fa-c416e2ad03f6 (pk: 495) (aiida.calculations:kkr.kkrimp)>

and run the find_parent_structure function results in the following error

$ find_parent_structure(calc)
Warning: find_parent_structure takes quite long (already searched 200 ancestors). Stop after 1000
Warning: find_parent_structure takes quite long (already searched 400 ancestors). Stop after 1000
Warning: find_parent_structure takes quite long (already searched 600 ancestors). Stop after 1000
Warning: find_parent_structure takes quite long (already searched 800 ancestors). Stop after 1000
Warning: find_parent_structure takes quite long (already searched 1000 ancestors). Stop after 1000

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[25], line 1
----> 1 find_parent_structure(calc)

File /opt/aiida-kkr/aiida_kkr/tools/__init__.py:36, in find_parent_structure(calc_or_remote, return_voro)
     26 """
     27 Traverse the provenance graph upwards to find the input structure
     28 from a KkrCalculation or VoronoiCalculation node or their remote_folder
   (...)
     32 :return struc: parent StructureData node
     33 """
     34 from .find_parent import find_parent_structure
---> 36 struc, voro_calc = find_parent_structure(calc_or_remote)
     38 if return_voro:
     39     return struc, voro_calc

File /opt/aiida-kkr/aiida_kkr/tools/find_parent.py:90, in find_parent_structure(parent_folder)
     88     return struc, parent_folder_tmp
     89 else:
---> 90     raise ValueError('structure not found')

ValueError: structure not found
@Raff-physics
Copy link
Contributor Author

Used code version of aiida-kkr:
-e git+https://github.com/JuDFTteam/aiida-kkr@06e112ca0b7c9c021eba8084a83c8db05bded206#egg=aiida_kkr

@PhilippRue
Copy link
Member

TODO:
add test case in find_parent test

@PhilippRue
Copy link
Member

Fixed find_parent function in pull request #141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants