Answered by email, posting answer here for the benefit of other users.
Indeed as you note, you don’t want to rerun the calculation just to do post-processing and fortunately it’s very easy to do that in QuantumATK. It can easily be done in a script, as shown below, or in the GUI:
1. Open the Workflow Builder and click the + button to start a new workflow
2. Locate “Load from file” in the right-hand panel (you can e.g. filter on the word “file”) and insert it in the flow
3. Open this block (double-click) and click the button Load from file.
4. Now locate the directory and HDF5 file containing the converged calculation
5. Once you have selected the file in the file dialog, select the relevant BulkConfiguration (or similar) object in the right-most panel and click Load
6. After this you can insert any analysis objects you want, such as Bandstructure etc into the flow, and execute it as usual
It is instructive to inspect the Python script generated by this procedure. A normal QuantumATK script has the following general structure in metacode:
configuration = BulkConfiguration(…)
calculator = LCAOCalculator(…)
configuration.setCalculator(calculator)
configuration.update()
nlsave(“file.hdf5”, configuration)
bandstructure = Bandstructure(configuration)
nlsave(“file.hdf5”, bandstructure)
What you need to do if you forgot some analysis is to bypass the SCF loop (the “update”) and read back the converged state from the HDF5 file:
configuration = nlread(“file.hdf5”, BulkConfiguration)[0]
bandstructure = Bandstructure(configuration)
nlsave(“file.hdf5”, bandstructure)
This provides a very easy way to perform this kind of analysis without using the GUI.
Notes:
• You then don’t need the calculator and configuration definitions because they are read from the file too.
• You don’t absolutely need the BulkConfiguration argument to nlread, then it will read all objects (instead of just the configurations) but you always need the [ 0 ] or [ -1 ] because nlread always returns a list, even if only one object is found. You can also explicitly ask for a specific object if you know it’s object_id which is visible in the GUI in the Data view:
configuration = nlread(“file.hdf5”, object_id=”BulkConfiguration_0”)[0]