aiidalab / aiidalab-qe

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

HubbardStructureData reach by StructureBrowserWidget #718

Closed AndresOrtegaGuerrero closed 5 months ago

AndresOrtegaGuerrero commented 5 months ago

This addresses #716

superstar54 commented 5 months ago

Hi @AndresOrtegaGuerrero is this ready for review, or it's a draft?

AndresOrtegaGuerrero commented 5 months ago

@superstar54 This is a draft , i am testing it , but we have to change the logic of the workchain ( i am on it).

AndresOrtegaGuerrero commented 5 months ago

@superstar54 Now is ready, please let me know what you think of the logic? Basically if you put an HubbardStructureData and you dont define new the option DFT+U in advanced tab, the workchain will just create a new StructureData (No Hubbard Parameters) from your HubbardStructureData, and run. If you define new parameter in the advanced tab, it will create a new HubbardStructureData with the new parameters.

AndresOrtegaGuerrero commented 5 months ago

@superstar54 I did the changes you suggested, so now if you select a HubbardStructureData, the app will set your u values in the widget and activate override so in case you continue you will be using the same u parameters. In the workchain if the hubbard parameters set are exactly the same as in your structure, there wont be a new HubbardStructureData, but instead the user will do calculations on the same structure. Have a look

AndresOrtegaGuerrero commented 5 months ago

@superstar54 Should i add this logic in a function ? outside the class, so it is not no long the logic of the class ?