Skip to content

Fixing Hubbard formulation#1224

Open
t-reents wants to merge 2 commits intoaiidateam:mainfrom
t-reents:fix/1220_hubbard_formulation
Open

Fixing Hubbard formulation#1224
t-reents wants to merge 2 commits intoaiidateam:mainfrom
t-reents:fix/1220_hubbard_formulation

Conversation

@t-reents
Copy link
Copy Markdown
Collaborator

@t-reents t-reents commented Dec 5, 2025

Addresses #1220

@bastonero I applied the fix as discussed in the issue. Moreover, I also added "ALPHA" to the supported values. Please have a look whether my understanding/logic for the dudarev formulation was correct.

One additional aspect:

I was wondering, do we actually need this check here:

if hubbard.formulation not in ['dudarev', 'liechtenstein']:
raise ValueError(f'Hubbard formulation {hubbard.formulation} is not implemented.')

Isn't this automatically validated in:

formulation: Literal['dudarev', 'liechtenstein'] = 'dudarev'
"""Hubbard formulation used. Allowed values are: 'dudarev', `liechtenstein`."""

@t-reents t-reents requested a review from bastonero December 5, 2025 13:59
@t-reents t-reents linked an issue Dec 5, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator

@bastonero bastonero left a comment

Choose a reason for hiding this comment

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

thanks a lot @t-reents. would you be a lamb and add a little test when actually using the liechtenstein "keyword"?

"""Value of the Hubbard parameter, expessed in eV."""

hubbard_type: Literal['Ueff', 'U', 'V', 'J', 'B', 'E2', 'E3']
hubbard_type: Literal['Ueff', 'U', 'V', 'J', 'B', 'E2', 'E3', 'ALPHA']
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

could you also add J0? https://www.quantum-espresso.org/Doc/INPUT_PW.html#id329
this should be the one used in liechtensteain

@bastonero
Copy link
Copy Markdown
Collaborator

re the ValueError: yeah, in principle it can be removed the check. it was put there in case we wanted to have other formulations (don't even know if there are so many others...), so that we didn't need to modify. but agreed it is currently unnecessary

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.

'liechtenstein' Hubbard formulation

2 participants