-
Notifications
You must be signed in to change notification settings - Fork 82
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
add should_run_scf
for PwBandsWorkChain
#1016
base: main
Are you sure you want to change the base?
Conversation
should_run_scf
for PwBandsorkchainshould_run_scf
for PwBandsWorkChain
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.
Thanks @superstar54 . Does this currently actually work? I believe if you skip the SCF step, then there won't be a parent_folder
as input to the bands step, and the user also cannot specify it in the inputs since it is excluded. Besides that, as @mbercx mentioned during the meeting, if we strip out the SCF step, it is not much of a workflow anymore. If the user already has an SCF completed and wants the band structure, wouldn't they just be better off running a PwBaseWorkChain
specifying the input parameters themselves? Using the get_builder_from_protocol
they can get all inputs preset and then just switch the calculation to bands
. The logic in PwBandsWorkChain
specific to the bands is not very intricate anyway, it is just to define the total number of bands, which is just based on a top-level user input anyway.
# override the parent_folder if the scf was run | ||
if 'scf' in self.inputs: | ||
inputs.pw.parent_folder = self.ctx.current_folder |
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.
How would the parent_folder
be defined though? It is excluded from the bands
input namespace, and if scf is skipped this will therefore not be set?
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.
Thanks for pointing out this. I didn't notice that the parent_folder
is excluded. I run a simple example with Si by setting the parent_folder
, it's strange that no error is reported, and the process finished successfully! Here is the process detail:
$ verdi process show 28038
Property Value
----------- ------------------------------------
type PwBandsWorkChain
state Finished [0]
pk 28038
uuid 94b2d315-6a72-4f73-ae87-5a3b50d86d07
label
description
ctime 2024-03-21 15:34:17.077194+00:00
mtime 2024-03-21 15:34:24.276367+00:00
Inputs PK Type
---------------------- ----- -------------
bands
pw
code 216 InstalledCode
pseudos
Si 19 UpfData
parameters 28034 Dict
parent_folder 28029 RemoteData
max_iterations 28035 Int
bands_kpoints_distance 28036 Float
clean_workdir 28037 Bool
structure 28020 StructureData
Outputs PK Type
------------------- ----- -------------
band_parameters 28054 Dict
band_structure 28052 BandsData
primitive_structure 28042 StructureData
seekpath_parameters 28040 Dict
Called PK Type
-------- ----- ---------------------------
seekpath 28039 seekpath_structure_analysis
bands 28046 PwBaseWorkChain
Log messages
---------------------------------------------
There are 3 log messages for this calculation
Run 'verdi process report 28038' to see them
You see that the parent_folder
is set. Here is the node graph
This PR sets the
scf
step as an option in thePwBandsWorkChain
.Use case:
scf
in the main workflow, then pass theremote_folder
to plugins, such asbands
andpdos
. This requires that thescf
calculation is an option in thePwBandsWorkChain
.#Run one SCF calculation for all plugins aiidalab/aiidalab-qe#631