JuDFTteam / aiida-fleur

AiiDA plugin of the high-performance density functional theory code FLEUR (www.judft.de) for high-throughput electronic structure calculations.
https://aiida-fleur.readthedocs.io
Other
14 stars 7 forks source link

More userfriendly Workchain outputs #148

Open janssenhenning opened 3 years ago

janssenhenning commented 3 years ago

The FleurSCFWorkChain has these outputs at the moment

        spec.output('fleurinp', valid_type=FleurinpData)
        spec.output('output_scf_wc_para', valid_type=Dict)
        spec.output('last_fleur_calc_output', valid_type=Dict)

Making the process of restarting a calculation from the converged charge density relatively verbose

Either

remote = orm.load_node(scf.outputs.output_scf_wc_para['last_calc_uuid']).outputs.remote_folder

or something similar

I think we can make this easier by making more use of the expose_outputs functionality in aiida where appropriate

So my proposal for the SCF workchain would be

        spec.output('fleurinp', valid_type=FleurinpData)
        spec.output('output_scf_wc_para', valid_type=Dict)
        spec.output('last_fleur_calc_output', valid_type=Dict) #For backwards compatibilty
        spec.expose_outputs(FleurBaseWorkChain, namespace='last_calc')

@Tseplyaev @broeder-j Is there any downside to this approach that I overlooked?

Tseplyaev commented 2 years ago

I think this is a nice idea, however in my opinion the concept is not general enough. In case of a more complex WorkChain, which consists of several steps, there are might be several output nodes that can be used to continue it. Let us assume that a WorkChain consists of 3 steps: 1 → 2 → 3 → output and the step 2 failed. One came up with a way to fix it and wants to resubmit the WorkChain starting from the step 2 using outputs of the step 1. In this case one has to gather corresponding nodes by hand (like you do with old charge density). Having an automatic function gathering corresponding outputs for each of the steps of all the WorkChains would help a lot for beginner users.