Page 1 of 1

DFT+DMFT NiO example PLOCAR inconsistent with IBZKPT

Posted: Tue Nov 11, 2025 5:20 am
by jchoi110

Hello everyone,

I am trying to replicate the NiO DFT+DMFT example listed in the VASP wiki page (https://vasp.at/wiki/DFT%2BDMFT_calcula ... p_tutorial). I copied the exact input files given in step1(KPOINTS,POSCAR,INCAR) and for my POTCAR I used the Ni_pv LDA pseudopotential. I get the same std out results as I should.
However, for Step 2 in running the python script using PLOVASP converter, I get the following error message (also attached below): PLOCAR is inconsistent with IBZKPT (number of k-points).
I wanted to add that I used the unstable branch for dft_tools (3.3.1) as well as triqs.

What could be the issue? Please let me know if you need more information.

Thank you!

Code: Select all

Read parameters: LOCPROJ
0  ->  {'label': 'dxy', 'isite': 1, 'l': 2, 'm': 0}
1  ->  {'label': 'dyz', 'isite': 1, 'l': 2, 'm': 1}
2  ->  {'label': 'dz2', 'isite': 1, 'l': 2, 'm': 2}
3  ->  {'label': 'dxz', 'isite': 1, 'l': 2, 'm': 3}
4  ->  {'label': 'dx2-y2', 'isite': 1, 'l': 2, 'm': 4}
  Found POSCAR, title line: NiO
  Total number of ions: 2
  Number of types: 2
  Number of ions for each type: [1, 1]

    Total number of k-points: 120
   Total number of tetrahedra: 484
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/software/triqs-dft_tools/3.3.1/b1/lib/python3.9/site-packages/triqs_dft_tools/converters/plovasp/converter.py", line 73, in generate_and_output_as_text
    el_struct = ElectronicStructure(vasp_data)
  File "/software/triqs-dft_tools/3.3.1/b1/lib/python3.9/site-packages/triqs_dft_tools/converters/plovasp/elstruct.py", line 89, in __init__
    assert nk_plo == self.nktot, "PLOCAR is inconsistent with IBZKPT (number of k-points)"
AssertionError: PLOCAR is inconsistent with IBZKPT (number of k-points)


Re: DFT+DMFT NiO example PLOCAR inconsistent with IBZKPT

Posted: Tue Nov 11, 2025 8:54 am
by ahampel

Dear jchoi,

thank you for reaching out to us on the official VASP forum. The error message you are showing tells me that you are not running the unstable branch of dft_tools. To leverage symmetries (as done in the tutorial) the hdf5 interface in VASP needs to be active and you need to use triqs/dft_tools unstable. The same error message of the unstable branch reads:

Code: Select all

PLOCAR is inconsistent with IBZKPT (number of k-points). If you run VASP with symmetry make sure to use the h5 interface of the converter, i.e. have the locproj information written to vaspout.h5

https://github.com/TRIQS/dft_tools/blob ... uct.py#L91

I changed this message to make the distinction between current release and unstable branch clear.

Please try to install manually the unstable branch of dft_tools. If you cannot do this for whatever reason one simple workaround is to remove symmetries in VASP ISYM=-1 , then the current release branch of TRIQS works as well with the rest of the tutorial. However, you might want to reduce the number of kpoints in this case to something like 11x11x11 .

I hope this helps.

Best,
Alex


Re: DFT+DMFT NiO example PLOCAR inconsistent with IBZKPT

Posted: Thu Nov 13, 2025 5:45 pm
by jchoi110

Thank you for your response! I had trouble installing the unstable branch so I followed your suggestion with removing symmetries and reducing the number of kpoints. After I ran the python code, I got output files vaspout.h5, pdos_0_0.dat,vasp.ctrl, vasp.pg1,vasprun.xml, etc. I moved on to the DMFT calculations but my err file shows the following errors..

Code: Select all

  File "/software/triqs-solid_dmft/3.3.2/b1/lib/python3.9/site-packages/solid_dmft/dmft_cycle.py", line 310, in dmft_cycle
    sum_k = SumkDFT(hdf_file=general_params['jobname']+'/'+general_params['seedname']+'.h5',
  File "/software/triqs-dft_tools/3.3.1/b1/lib/python3.9/site-packages/triqs_dft_tools/sumk_dft.py", line 139, in __init__
    raise ValueError('ERROR: One or more necessary SumK input properties have not been found in the given h5 archive:', self.values_not_read)
ValueError: ('ERROR: One or more necessary SumK input properties have not been found in the given h5 archive:', ['energy_unit', 'n_k', 'k_dep_projection', 'SP', 'SO', 'charge_below', 'density_required', 'symm_op', 'n_shells', 'shells', 'n_corr_shells', 'corr_shells', 'use_rotations', 'rot_mat', 'rot_mat_time_inv', 'n_reps', 'dim_reps', 'T', 'n_orbitals', 'proj_mat', 'bz_weights', 'hopping', 'n_inequiv_shells', 'corr_to_inequiv', 'inequiv_to_corr'])

Re: DFT+DMFT NiO example PLOCAR inconsistent with IBZKPT

Posted: Fri Nov 14, 2025 9:43 am
by ahampel

Hi,

the error message shows exactly which elements have not been found in the generated vasp.h5 h5 archive. The fact that so many elements could not been found points to a corrupt h5 file or an error while generating it in the previous step. When running the following python code:

Code: Select all

from triqs_dft_tools.converters.vasp import VaspConverter
import triqs_dft_tools.converters.plovasp.converter as plo_converter

# Generate and store PLOs
plo_converter.generate_and_output_as_text('plo.cfg', vasp_dir='./')

# run the converter
Converter = VaspConverter(filename = 'vasp')
Converter.convert_dft_input()

What output do you get? Please also share the output of the following command:

Code: Select all

h5ls vasp.h5/dft_input

run in the directory in which you have the vasp.h5 file generated.

Best,
Alex


Re: DFT+DMFT NiO example PLOCAR inconsistent with IBZKPT

Posted: Fri Nov 14, 2025 6:13 pm
by jchoi110

Hello Alex,

I noticed that I was missing the ctseg module, so I reran the python code and got pdos_0_0.dat, vasp.ctrl, vasp.pg1 and vasp.h5 as my output files. Now I have a different error message for DMFT:

Code: Select all

  File "/software/triqs-solid_dmft/3.3.2/b1/lib/python3.9/site-packages/solid_dmft/dmft_tools/solver.py", line 1394, in _ctseg_postprocessing
    U_dict = extract_U_dict2(self.h_int)
NameError: name 'extract_U_dict2' is not defined

I am guessing I need to define extract_U_dict2, but am having trouble finding that information in TRIQS..

Thank you for your help.

Gwyn


Re: DFT+DMFT NiO example PLOCAR inconsistent with IBZKPT

Posted: Mon Nov 17, 2025 9:08 am
by ahampel

Hi Gwyn,

Ah that problem popped up recently as an issue (https://github.com/TRIQS/solid_dmft/issues/108) and I fixed this in version 3.3.3 of solid_dmft: https://github.com/TRIQS/solid_dmft/releases/tag/3.3.3 . I can see that you have installed 3.3.2 . Can you update the installation? If you installed solid_dmft via pip you can simply update it: pip install --upgrade solid_dmft . Can you try this?

Best,
Alex


Re: DFT+DMFT NiO example PLOCAR inconsistent with IBZKPT

Posted: Wed Nov 19, 2025 11:41 pm
by jchoi110

Hi Alex,

I tried the pip install --upgrade solid_dmft, and now I am getting this error..

Code: Select all

WARNING: High frequency moments have an error greater than 1e-4.
 Error = 0.000154554
 Please make sure you treat the constant offset analytically!

Re: DFT+DMFT NiO example PLOCAR inconsistent with IBZKPT

Posted: Wed Nov 26, 2025 10:13 am
by ahampel

Hi Gwyn,

this is only a warning and should not be problem. If you don't mind please attach a full std out + err as text files. Then I can assess better if there are still problems.


Re: DFT+DMFT NiO example PLOCAR inconsistent with IBZKPT

Posted: Wed Dec 10, 2025 5:26 pm
by jchoi110

Hello,

I believe I have now made my way through step3 and am on step 4. In my output file, I see
Attribute Error: 'Plocar' object has no attribute 'efermi'

I will attach the full error message below. Perhaps I did something wrong from the previous steps but it matched pretty closely to the output data shown in the example.. Please let me know if you need any other information.

Thank you very much!

Gwyn

Code: Select all

[WARNING]: Error reading Efermi from DOSCAR, trying LOCPROJ...
Traceback (most recent call last):
  File "/software/triqs-dft_tools/3.3.1/b1/lib/python3.9/site-packages/triqs_dft_tools/converters/plovasp/vaspio.py", line 91, in __init__
    self.doscar.from_file(vasp_dir)
  File "/software/triqs-dft_tools/3.3.1/b1/lib/python3.9/site-packages/triqs_dft_tools/converters/plovasp/vaspio.py", line 589, in from_file
    sline = next(f).split()
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/software/triqs-solid_dmft/3.3.2/b1/bin/solid_dmft", line 45, in <module>
    run_solid_dmft.main(sys.argv)
  File "/software/triqs-solid_dmft/3.3.2/b1/lib/python3.9/site-packages/solid_dmft/main.py", line 151, in main
    run_dmft(params, config_file_name)
  File "/software/triqs-solid_dmft/3.3.2/b1/lib/python3.9/site-packages/solid_dmft/main.py", line 95, in run_dmft
    csc_flow_control(general_params, solver_params, dft_params, gw_params, advanced_params)
  File "/software/triqs-solid_dmft/3.3.2/b1/lib/python3.9/site-packages/solid_dmft/csc_flow.py", line 281, in csc_flow_control
    vasp_process_id, irred_indices = _full_vasp_run(general_params, dft_params, True)
  File "/software/triqs-solid_dmft/3.3.2/b1/lib/python3.9/site-packages/solid_dmft/csc_flow.py", line 193, in _full_vasp_run
    _run_plo_converter(general_params, dft_params)
  File "/software/triqs-solid_dmft/3.3.2/b1/lib/python3.9/site-packages/solid_dmft/csc_flow.py", line 58, in _run_plo_converter
    plo_converter.generate_and_output_as_text(dft_params['plo_cfg'], vasp_dir='./')
  File "/software/triqs-dft_tools/3.3.1/b1/lib/python3.9/site-packages/triqs_dft_tools/converters/plovasp/converter.py", line 72, in generate_and_output_as_text
    vasp_data = vaspio.VaspData(vasp_dir, efermi_required=efermi_required)
  File "/software/triqs-dft_tools/3.3.1/b1/lib/python3.9/site-packages/triqs_dft_tools/converters/plovasp/vaspio.py", line 96, in __init__
    self.plocar.efermi
AttributeError: 'Plocar' object has no attribute 'efermi'
                                                              

Re: DFT+DMFT NiO example PLOCAR inconsistent with IBZKPT

Posted: Thu Dec 11, 2025 10:52 am
by ahampel

Hi Gwyn,

This error points somehow again to the converter not reading form the vaspout.h5 file but rather from the text files LOCPROJ / PROJCAR. Can you check if you see this message in std out when running the converter: "[WARNING]: Reading from vaspout.h5" ? You can just in the directory where the error below occurred run once a python script with the following content:

Code: Select all

from triqs_dft_tools.converters.vasp import VaspConverter
import triqs_dft_tools.converters.plovasp.converter as plo_converter

plo_converter.generate_and_output_as_text('plo.cfg', vasp_dir='./')
Converter = VaspConverter(filename = 'vasp')

for me output looks like this:

Code: Select all

Starting serial run at: 2025-02-25 11:22:43.429026
Warning: could not identify MPI environment!
[WARNING]: Reading from vaspout.h5
Read parameters: LOCPROJ
...

Hence, "[WARNING]: Error reading Efermi from DOSCAR, trying LOCPROJ..." should not appear.

Currently the CSC DFT+DMFT calculations in VASP and solid_dmft only work with dfttools unstable + vasp compiled with hdf5 support.

Best,
Alex


Re: DFT+DMFT NiO example PLOCAR inconsistent with IBZKPT

Posted: Tue Dec 16, 2025 7:18 pm
by jchoi110

Hello Alex,

I apologize for continuing on with the same questions, but I was having trouble with downloading the unstable branch. Earlier in our thread you mentioned removing symmetries and reducing the number of kpoints to adjust for that discrepancy; but is it a requirement that the unstable branch be used to continue on with the rest of the example?

Thank you.

Gwyn


Re: DFT+DMFT NiO example PLOCAR inconsistent with IBZKPT

Posted: Wed Dec 17, 2025 12:18 pm
by ahampel

Hi Gwyn,

I have to apologize as well. When I was writing that dft_tools unstable is not needed I forgot that for charge self-consistent calculations there was one feature missing in standard VASP. We need in every DFT SCF step the Fermi energy written to file. Currently it is only written into the hdf5 archive, which is only read by the dfttools unstable branch. To circumvent this you can either modify VASP itself: https://triqs.github.io/solid_dmft/md_n ... al-remarks . The only thing you need from that changes is to write the fermi energy to the locproj file, i.e. change:

Code: Select all

WRITE(99,'(4I6,"  # of spin, # of k-points, # of bands, # of proj" )') NS,NK,NB,NF

to

Code: Select all

WRITE(99,'(4I6,F12.7,"  # of spin, # of k-points, # of bands, # of proj, Efermi" )') W%WDES%NCDIJ,NK,NB,NF,EFERMI

in locproj.F and and over EFERMI to the function call.

Either you add this or install the unstable branch. In principle it is enough to just copy the python files from the unstable github repo into your installation folder of triqs 3.3.x , since the changes are all python only code. Let me know if you need further instructions on how to achieve that. Or let me know what the problem is in installing the unstable branch of dft tools. You should be even able to only install dft_tools/unstable without changing anything about the triqs / solid_dmft version.

Best,
Alex