Hello AiiDA community,
I have been working on developing a workflow that needs to download and parse files that can be quite large such as cube files. I came across the retrieve_temporary_list feature that seems to solve my issue as the information can be taken during parsing of a task. I have set the file that I want to have parsed and can find that it is correctly set when I load the node and call the get_retrieved_temporary_list() command. But when it gets to that part of the parser it only lists the default files that AiiDA downloads after finishing. Does the temporary list get set to a different variable? I am retrieving the files with retrieved.list_object_names() and would then attempt to open with rerieved.open but it doesn’t pass my check to make sure it’s in the list_object_names().
Is there perhaps a working example of this feature that someone could point me to? Currently, I have been looking at the documentation on this page which does not necessarily show all the options that need to possibly be enabled for it to work.
Thank you for your future feedback. Please let me know if I can make any of my points more clear.
Nathan
-----------------------------------------------------------------------------------
Nathan Keilbart, PhD
Postdoctoral Research Scientist, Quantum Simulations Group
Lawrence Livermore National Laboratory
-----------------------------------------------------------------------------------
import pathlib
def SomeParser(Parser):
def parse(self, **kwargs):
retrieved_temporary_folder = kwargs.get('retrieved_temporary_folder', None)
if retrieved_temporary_folder is not None:
retrieved_temporary_folder = pathlib.Path(retrieved_temporary_folder) # Optional to use the modern `pathlib` module instead of `os`.
for subpath in retrieved_temporary_folder.iterdir():
if subpath.is_file():
subpath.read_bytes()
# or
with subpath(open) as handle:
data = handle.read()
--
AiiDA is supported by the NCCR MARVEL (http://nccr-marvel.ch/), funded by the Swiss National Science Foundation, and by the European H2020 MaX Centre of Excellence (http://www.max-centre.eu/).
Before posting your first question, please see the posting guidelines at http://www.aiida.net/?page_id=356 .
---
You received this message because you are subscribed to the Google Groups "aiidausers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aiidausers+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aiidausers/9B575579-6354-4DA5-B072-8512E72E26CF%40llnl.gov.
Thank you for the description Sebastiaan. I was able to piece together a workfunction with this capability and it is proving to be advantageous. Thank you for your time and effort.
To view this discussion on the web visit
https://groups.google.com/d/msgid/aiidausers/a57b2ec5-c1d5-10b2-17fe-6f15fd8a1e24%40epfl.ch.