materialscloud-org / aiida-explorer

Explore AiiDA databases through an interactive provenance browser
MIT License
7 stars 3 forks source link

CalcJobs: provide link to download all input files in zip format #23

Open ltalirz opened 4 years ago

ltalirz commented 4 years ago

This came up during the tutorial - it would be super useful, if when looking at a CalcJobNode, you had a link to download a zip file of all input files (essentially the folder that was prepared for submission).

This would make re-running a calculation from the Materials Cloud very easy.

@giovannipizzi It would be good to discuss what is the best way to implement this. It might need a corresponding endpoint in the REST API.

I think this is a key feature and a low hanging fruit.

giovannipizzi commented 4 years ago

That's not super trivial in a general way - we can definitely have them download all the files in the node repository, but they might not be enough.

I don't know if I'm forgetting something. Also, I don't remember if we changed between 0.x and 1.x so we'll need to check if this is enough when using migrated calculations.

I think this could be anyway a simple function to write in AiiDA, so we maintain it there, and then have it called from Materials Cloud?

ltalirz commented 4 years ago

Just to mention that we are already creating the list of input files, so a first step can be just to provide a link to download them all in one go (we'll need to decide which ones, and we need to make sure that those are taken from the correct copy list).

image

https://www.materialscloud.org/explore/curated-cofs/details/1725e81f-db5a-4fdc-8281-a162533f4f5c?nodeType=NODE

giovannipizzi commented 4 years ago

What we see is just the one created by the plugins, nothing from the copy lists (impossible to do for the remote-copy-list, possible but requires coding for the local_copy_list, that I would avoid as it would be a copy-paste of the code in the AiiDA engine and this might change and eventually will have a slightly wrong behaviour).

However, let me stress that I think the best approach here is, again, to provide a rich and raw view, and allow this and more options (file download, all files download as zip, showing all attributes, extras, comments, ...) in the raw view, so it's done only once and for all for all nodes.

We can, of course, add specific shortcuts in the "rich" view for calcjobs, e.g. like now to get the files from the retrieved outputs (that are actually in a different output retrieved node).