I wish to set the DFT+U parameters (ideally with the Liechtenstein’s formulation) using ASE and the Quantum Espresso calculator. I have seen that the format for QE has been updated to give the Hubbard card: https://www.quantum-espresso.org/Doc/user_guide_PDF/Hubbard_input.pdf.

I have looked at using the write_espresso_in functions from ASE as described here: https://wiki.fysik.dtu.dk/ase/ase/io/formatoptions.html. However, the documentation is a bit confusing and seems to indicate it is implemented and it is not implemented.

Is there a way to do this either in the input_data dictionary argument, for example (with Ni2MnGa):

input_data = {"hubbard": 
                 {"U":[["Mn-3d", 5.0]["Ni-3d", 6.0]],
                  "J":[["Mn-3d", 2.0]["Ni-3d", 2.0]],
  • 3
    $\begingroup$ I have a ASE fork on my personal repo that can deal with that, basically it takes two additional parameters 'hubbard' which must be set to 'ortho-atomic' or whatever you want, and 'hubbard_data' which needs to be a dictionary which keys are manifold and values list of string... gitlab.com/tomdemeyere/ase. it works with all formulation normally $\endgroup$
    – Okano
    May 19, 2023 at 10:23
  • $\begingroup$ @Okano it will be nice if you can add your comment as an answer. Possibly, highlighting the part of the code from your repository where you implemented this. $\endgroup$ May 21, 2023 at 1:30
  • 2
    $\begingroup$ @AbdulMuhaymin Done $\endgroup$
    – Okano
    May 21, 2023 at 16:02

1 Answer 1


You can use the ASE fork available in my personal repository to handle this. You can find it at gitlab.com/tomdemeyere/ase. The relevant code is located in ase/io/espresso.py. To locate the relevant code quickly, you can use Ctrl+F and search for 'hubbard'.

To incorporate the required changes, you need to specify two additional parameters in the Espresso class:

Espresso(..., hubbard, hubbard_data)

The hubbard parameter is a string that should be one of the following options: atomic, ortho-atomic, norm-atomic, wf, or pseudo.

The hubbard_data parameter is expected to be a dictionary containing lists of strings. Each key in the dictionary should correspond to one of the following: U, J, B, V, or J0. For each key, the corresponding value should be a list of strings.

To achieve the desired result:

HUBBARD (ortho-atomic)
  U  Mn-3d 5.0
  J0 Mn-3d 1.0
  U  Ni-3d 6.0
  J0 Ni-3d 1.2

You should set the values as follows:

hubbard = 'ortho-atomic'
hubbard_data = {
    'U': ['Mn-3d 5.0', 'Ni-3d 6.0'],
    'J0': ['Mn-3d 1.0', 'Ni-3d 1.2']

The order of the elements within the dict/lists does not matter.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .