aiidalab / aiidalab-qe

AiiDAlab App for Quantum ESPRESSO
https://aiidalab-qe.readthedocs.io/
MIT License
9 stars 14 forks source link

Polish the Workflow setting step #245

Open unkcpz opened 2 years ago

unkcpz commented 2 years ago

In live testing meeting with Nicola and Michele, we got some feedback on how to improve the workflow setting step with more clear instruction on how to lead user to set the workflow setting to do the correct calculations.

unkcpz commented 1 year ago

Hi @wengmouyi, do you still have questions about the first item 'metallic setting'? Can you comment on this issue and elaborate on what your confusion is? If I remember correctly, you said ferromagnetic calculation can run on insulators without problem? Maybe @mbercx can comment on why occupations=fixed (I guess setting for the insulators?) does not compatible with magnetic calculation.

wengmouyi commented 1 year ago

Yes, I was wondering if there is an insulator material which just happens to be ferromagnetic, I think it is also fine to use 'occupations=fixed' in calculation. To my understanding the band gap will be in the same position in both spin-up and spin-down channel. If the band gap is not too small, other occupation method, such as 'occupations= smearing' will lead to the same occupation result as 'occupations=fixed' does. Please tell me if I think wrong. Thanks

mbercx commented 1 year ago

Running with occupations=fixed and setting a starting_magnetization will simply fail when running QE, with the following error:

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     Error in routine iosys (1):
     fixed occupations and lsda need tot_magnetization
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

So only tot_magnetization is supported for fixed, but this this actually also fixes the total magnetization to a specific value for the whole SCF:

https://www.quantum-espresso.org/Doc/INPUT_PW.html#idm284

Perhaps a better setting here would be tetrahedra, but this I'd have to test.

EDIT: Actually, this seems to work fine! Perhaps using tetrahedra might be a better option in general...

unkcpz commented 1 year ago

Thanks for checking @mbercx, if I understand correctly we can use tetrahedra to replace fixed in the occupation setting for the insulators?

mbercx commented 1 year ago

I would say yes. This should be fixed in the aiida-quantumespresso plugin protocol methods though. Will open an issue for this there.

mbercx commented 1 year ago

Actually, there is already one open:

https://github.com/aiidateam/aiida-quantumespresso/issues/800

Should be an easy change, will fix!

giovannipizzi commented 1 year ago

Just noting that I also just got

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     Error in routine iosys (1):
     fixed occupations and lsda need tot_magnetization
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

when trying an insulator with magnetism. I think QE App should catch this and avoid QE to crash.

unkcpz commented 1 year ago

Thanks @giovannipizzi I just encountered exactly the same error when preparing the demo for Nicola yesterday. We have the tot_charge setting implemented by @AndresOrtegaGuerrero and merged. I think it is straightforward to also use the same logic and have tot_magnetization with extra logic the widget is only activated when running magnetism computation on insulators.

I open an dedicated issue for it at https://github.com/aiidalab/aiidalab-qe/issues/412

AndresOrtegaGuerrero commented 8 months ago

@wengmouyi Could you provide an example of this case , and also what value of tot_magnetization would you use ?