-
Notifications
You must be signed in to change notification settings - Fork 16
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
Set relax type none and no properites to run SCF only #274
Conversation
035717f
to
d5ad3ce
Compare
One comment, after the SCF calculation, what results could the user get? Currently, the |
It is also confusing that one runs a |
Thanks! @superstar54
This is a very good point. But this issue came from the in-person testing with Nicola that when selecting not relax and no properties are chosen the qeApp will block the calculation from running by throwing a warning.
I also had same feeling when start working on this. But qeApp is simply the UI wrapper of aiida-quantumespresso, I think the change should be make there. @mbercx can you comment on if you think this is worth implementing? |
1144efa
to
792317e
Compare
Hi @superstar54, I change the message show in workflow bar. But I still not add the energies showed in the output tabs. Since I don't decide yet where to add it, it can be on in the |
Re the SCF only output: I think one of the possible outputs Nicola had in mind would be the charge density. However, I don't think it's possible to extract the charge density file atm. I'll add that originally we blocked this type of calculation for this very reason: I saw little point in running only an SCF for a layman user. The total energy of a single calculation is also not super meaningful, I'd say? The forces could be useful in some cases, I suppose. Re the relax work chain: An "SCF" work chain would simply be the |
@mbercx Thanks! I update the #311 with your comment. I think for the current one, it is okay to use the PwRelaxWorkChain with RelaxType.None. Since in my opinion, we should not add complexity to the workchain of QeApp but just light wrapper of what already implement in the @superstar54 could you have another look and let's try get this PR done? |
builder_parameters = workchain.get_extra("builder_parameters", {}) | ||
relax_type = builder_parameters.get("relax_type") | ||
|
||
if relax_type != "none": |
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.
Why is "none", not None
or "None". Please make sure "none" is correct.
If it is correct, we need to change it to a more standard way, e.g. None
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.
relax_type
is a parameter read from widget.
# RelaxType: degrees of freedom in geometry optimization
self.relax_type = ipw.ToggleButtons(
options=[
("Structure as is", "none"),
("Atomic positions", "positions"),
("Full geometry", "positions_cell"),
],
value="positions_cell",
)
The string type is used to distinguish the None
in purpose.
aiidalab_qe/report.py
Outdated
@@ -98,27 +99,27 @@ def _generate_report_dict(qeapp_wc): | |||
# read default from protocol | |||
smearing = default_params["smearing"] | |||
|
|||
if run_relax: | |||
try: |
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.
I think this try ... except
is not used, because it will always run a relax (scf or real relax) calculation.
aiidalab_qe/steps.py
Outdated
@@ -878,6 +865,12 @@ def update_builder(buildy, resources, npools): | |||
if "smearing_override" in parameters: | |||
builder.smearing_override = Str(parameters["smearing_override"]) | |||
|
|||
# skip relax sub-worflow only when RelaxType is NONE and has property calculated. |
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.
Could you explain the difference between relax (only scf) and relax sub-workflow? I am not very clear about this, thanks.
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.
You can find how this tag change the parameters set in pw.x
input file at https://github.com/aiidateam/aiida-quantumespresso/blob/d15f8cd1032e37ae59a19d733ee5ae1ed59e1f10/src/aiida_quantumespresso/workflows/pw/relax.py#L123-L146
34ef922
to
e79c56e
Compare
e79c56e
to
8b2daf3
Compare
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.
LGTM
fixes #264
Using
RelaxType.NONE
for relax workchain to run the SCF only.The builder is constructed with all three workchain input parameters port,
relax
,bands
,pdos
.Whether to run sub-workchain is controlled by popping the input key out from the builder, right after the builder is created.
Also, the relax/properties infos of workchain selector is changed to show this newly add calculation type as 'SCF only'.