-
Notifications
You must be signed in to change notification settings - Fork 9
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
Docs: Add how to migrate from legacy UPF family #161
Conversation
pseudos.append(UpfData(handle, filename=legacy_pseudo.filename).store()) | ||
|
||
family.add_nodes(pseudos) | ||
print(f'Migrated `{legacy_family}` to `{family}`.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If cutoffs also need to be set, maybe prompt the user here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cutoffs are not required. And since legacy families don't even have this concept, there is nothing to migrate really. Another part of the docs that explains how to manually create/install families goes over how to add cutoffs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure they are not required? did this change? I remember I could not use the pseudofamilies I had made myself until I had set cutoffs for all the pseudos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing that won't work is the PwBaseWorkChain.get_builder_from_protocol
because that method will want to automatically set the cutoffs, and so if the family doesn't define these, it raises. However, nothing is stopping a user from defining the inputs manually. The family is just a Group
with convenience methods such as PseudoFamily.get_pseudos(structure=structure)
to automatically get the dictionary of pseudos that can be passed to the pseudos
input.
We could perhaps think of making the cutoffs optional in the get_builder_from_protocol
and not have it raise, but simply warn, so the user can specify them manually directly in the parameters
input. But this is a feature request for aiida-quantumespresso
really, and has nothing to do with aiida-pseudo
.
4a6ae33
to
5eec3fc
Compare
The provided snippet can be used to migrate an existing UPF family, created with the `aiida.orm.nodes.data.upf` module from `aiida-core`. A `PseudoPotentialFamily` will be created to which the existing `UpfData` nodes are added, after having been converted to the `UpfData` class of `aiida-pseudo`.
5eec3fc
to
078e40b
Compare
The provided snippet can be used to migrate an existing UPF family, created with the
aiida.orm.nodes.data.upf
module fromaiida-core
. APseudoPotentialFamily
will be created to which the existingUpfData
nodes are added, after having been converted to theUpfData
class ofaiida-pseudo
.