Immigration of existing (VASP) calculations

We have a lot of VASP calculations done by several generations of PhD students and PostDocs which we would like to immigrate into AiiDA. The idea is to make the calculations more easily searchable and accessible. The calculations are stored on the several clusters.

In the documentation of aiida-vasp it is stated that Remote <computer> can not be used currently. and one would have to setup a local computer.
https://aiida-vasp.readthedocs.io/en/latest/concepts/immigrations.html
Does this limitation still apply?
I have setup the cluster as a second computer with the direct scheduler and the immigration seems to work properly. Do I miss a caveat or is this fine?
This is how I accomplish it:

computer = load_computer(<computer_label>)
transport = computer.get_transport()
transport.open()
folder_name = "<base_folder_name>"
# return all folders containing vasprun.xml
vasp_folders = transport.exec_command_wait(f"""find {folder_name} -type f -name "vasprun.xml" | sed -r 's|/[^/]+$||' |sort |uniq""")
vasp_calcs = []
for folder in vasp_folders:
    _, builder = CalculationFactory('vasp.vasp').immigrant(
        code, calculation_folder,
        metadata={'options': {'resources': resources}}
    )
    vasp_calcs.append(submit(builder))

What do you think about this procedure?

As I understand, only two plugins currently have the option to immigrate existing calculations: aiida-quantumespresso and aiida-vasp
Are there significant differences in these two approaches/implementations and which one to adapt when writing Immigrations for other plugins?

Thank you.

I am not too intimitely familiar with the aiida-vasp plugin and certainly not the immigrator. I just had a look at its implementation and it seems that it is a custom implementation specifically for VASP.

Historically, aiida-quantumespresso also provided such a custom implementation for the PwCalculation. This was still based on AiiDA v0.x however and wasn’t maintained, so it fell by the wayside.

I then drew up this AEP (an AiiDA Enhancement Proposal) to provide a generic import (or immigration, as it used to be called) process for existing calculations that were run outside of AiiDA. This proposal was accepted and I implemented it in AiiDA v2.0. This is the generic interface that aiida-quantumespresso implements.

The advantage of such a generic approach is that if all plguins use that instead of a custom solution, the procedure for calculation importing will be identical for all plugins.

That being said, If aiida-vasp doesn’t have the generic solution yet and their custom solution works for the time being, then I would definitely use that for now. Again, I cannot comment on the correctness of your approach, but you can simply inspect the results to see if data that you expect is there. You could do something like the following. Take the pk of one of the imported calculations:

verdi node repo dump <PK> input_files
# this should dump the raw input files to the local directory `input_files`

verdi process show <PK>
# This should show all the input and output nodes

verdi node repo dump <PK> output_files
# Replace the pk with value of the `retrieved` output node shown in `verdi process show` output
# This should dump output files that were retrieved to local dir

You can inspect the contents of all other inputs and output nodes using the Python API if you want. If the contents look reasonable, I think the import can be considered successful.

Thank you for your quick answer.