Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iteration numbers of repeated VASP runs in relax.convergence_max_iterations #585

Open
atztogo opened this issue May 13, 2022 · 2 comments
Open

Comments

@atztogo
Copy link
Collaborator

atztogo commented May 13, 2022

Is there a way to know iteration numbers of repeated VASP runs in relax.convergence_max_iterations from the node of RelaxWorkChain? The calculations are launched in series, so it is possible to order them by ctime. The iteration number is also found in report. But if the number is explicitly recorded somewhere easily accessible, for example, in description, it is helpful.

@zhubonan
Copy link
Member

I don't think we have it recorded. Storing internal states of the workchain on a different node seems to be an overkill I think.

It is still possible to record this information by setting the call link to the sub workchain and include the iteration number there.
For example, in my alternative implementation of the relaxation workchain:

https://github.com/aiida-vasp/bonan-user-addons/blob/a9dfa2cf35392ecf205eb304ca2913a774774bd2/aiida_user_addons/vworkflows/relax.py#L309-L311

        # Label the calculation and links by iteration number
        inputs.metadata.label += ' ITER {:02d}'.format(self.ctx.iteration)
        inputs.metadata.call_link_label = 'relax_{:02d}'.format(self.ctx.iteration)

Then you can do somthing like

node.get_outgoing(link_label_filter="relax_%").all()

to get the iteration numbers and the nodes.

@atztogo
Copy link
Collaborator Author

atztogo commented May 13, 2022

Thanks @zhubonan, call_link_label looks good where to write it. Restart workchain does the same,

https://github.com/aiidateam/aiida-core/blob/96a4a6b632306bed3d96bb4596536ce9b06c3364/aiida/engine/processes/workchains/restart.py#L180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants