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

Feature: tot charge #377

Closed
wants to merge 6 commits into from
Closed

Conversation

AndresOrtegaGuerrero
Copy link
Member

@AndresOrtegaGuerrero AndresOrtegaGuerrero commented Mar 31, 2023

This PR addresses #338 adds the feature to set the total charge of the system in the simulation.

This implementation avoids the modification of the workchain, and includes the tot_charge parameter in the results

@superstar54
Copy link
Member

Hi @AndresOrtegaGuerrero, Thanks for the implementation.

In my option, it's better to add this parameter to the advanced setting tab. A DFT calculation for a charging system is more likely a calculation for an advanced user. In the main workflow setting, it should only show the simple "control" parameters (e.g. protocol, materials type).

@AndresOrtegaGuerrero
Copy link
Member Author

Hello @superstar54 , thank you. I agree it could be placed in the advanced tab. I put the tot_charge in the main menu, since our users (at EMPA) will be using this feature quite often since they will be computing point defects (So basically routinely). @unkcpz what do you think?.

@unkcpz
Copy link
Member

unkcpz commented Apr 1, 2023

@AndresOrtegaGuerrero thanks a lot! I and @superstar54 had a discussion on how to integrate new settings into step2.
I can image that there will be more parameters setting widget coming to QeApp after you and Xing start to add more properties. It is not very clear how such a widget can be independently displayed, not only easy to be found by user but should not entangle with the other widgets (either the base widget from the current QeApp, or the widgets from other properties, such as Xing will also add new widgets for XPS calculations.)

There are multiple options:

  1. the widgets can be added to a new tab parallel to "advanced settings", only when the property is selected, the tab show up. This will make the widgets related only to the new property can be fully independent of widgets of base functionality or other widgets. The cons are it is not easy to find by users and that those are in other tabs.
  2. Same as above but the new widgets are showing in the same tab of the basic setting (the "Workflow" table of Step 2), the widgets are in a parent VBox widget and will be hidden if the property is not selected. One drawback of this strategy is that the widget is entangled in this table in the ConfigureQeAppWorkChainStep.

As for the total_charge in this PR, the case is rather simple, it is a vanilla QE parameter that can be set for all PW calculations I think it makes more sense to be added as an override of the base protocol, and the widget is displayed in "Advance setting" tab. As you can see the kpoints distance, smearing widget, etc. are defined in the protocol. I think if we go along with such separation, the protocol widget in "Workflow" tab will change the actual parameters in the "advance settings" tab. You can define the total change equal to 0 for all protocols as the default and allow the user to override it in advance settings tab.

Copy link
Member

@unkcpz unkcpz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndresOrtegaGuerrero Thanks a lot for making the ball rolling. My comments are slightly general, I'll work in parallel to have a generic interface for similar parameter control widgets. What you can try in this PR in parallel is my above comment, moving this widget to "Advance settings" tab.

aiidalab_qe/steps.py Outdated Show resolved Hide resolved
aiidalab_qe/report.py Outdated Show resolved Hide resolved
@AndresOrtegaGuerrero
Copy link
Member Author

I have done the modifications you guys suggested, the option of tot_charge is now in the Advanced Setting tab,
I implemented a new class in steps class PwAdvancedSettings(ipw.VBox): , where we can include other advanced features. I was thinking in the future implementing in this class the starting_magnetization and Hubbard here.
For total charge i use an extra checkbox since I think in the future there would be more settings and each should have its control.

Copy link
Member Author

@AndresOrtegaGuerrero AndresOrtegaGuerrero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are the changes including a tab in AdvancedSettings

@unkcpz
Copy link
Member

unkcpz commented May 17, 2023

Hi @AndresOrtegaGuerrero, #382 is merged, maybe you can rebase this or (maybe much easier to do) open a new PR to supersede this one? I am looking forward to seeing if refactoring brings benefits to this case.

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

Successfully merging this pull request may close these issues.

3 participants