QEF / qeschema

Other
13 stars 8 forks source link

Bug when reading kpoints from a xml file from bands calculation #40

Closed fraricci closed 9 months ago

fraricci commented 9 months ago

Hi!

I think I found a bug in the function get_k_points() when applied on an xml file from a bands calculation. What I get is a list of kpoints that is doubled. The first N kpoints are correct, then a second list of same size is appended.

I think the issue is coming from the way the kpoints are searched in the xml file: path = './/output//k_point'

This works fine when the grid is uniform, and each k_point appears only once in the file. But for a bands structure calculation, each k_point appear 4 times.

A possible solution that works in both cases (uniform or line kpoints) is: path = './/output//ks_energies//k_point'

Here is the general_info of my xml file:

  <general_info>
    <xml_format NAME="QEXSD" VERSION="21.11.01">QEXSD_21.11.01</xml_format>
    <creator NAME="PWSCF" VERSION="7.0">XML file generated by PWSCF</creator>
    <created DATE="15Feb2024" TIME="12:42:32">This run was terminated on:  12:42:32  15 Feb 2024</created>
    <job></job>
pietrodelugas commented 9 months ago

Hi Francesco ! Thanks I will fix it asap greetings

pietrodelugas commented 9 months ago

coming back; there was an issue with the new API of a package that was causing the failure of the CI. Now, I will push back fixes for this issue. .//output//ks_energies/k_point should be ok as a path because the k_point element we are looking for is always a child of ks_energies

pietrodelugas commented 9 months ago

The issue should be fixed in the main branch.