Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with atomic orbital projection of slab 2d fermisurface using QE #162

Open
SubeenLim opened this issue Aug 26, 2024 · 11 comments
Open

Comments

@SubeenLim
Copy link

Dear developer

I think pyprocar is so useful to observe atomic orbital projection states. So I want to use the pyprocar code to observe the surface states in 2d fermisurfae.

I constituted slab structure of NbP oriented to c direction.
And then I executed scf, nscf and projwfc.
But result is so weird.

problem

Figure b is my pyprocar result using the cmap 'Reds' and in the result, I put the black background to distinguish white bulk states.
As you can see, there are a few atomic orbital states. I expected that there are atomic orbital states at the orange circles.
So I plotted the atomic orbital bands structure, and found that along the Y-Gamma and Gamma-X, there are atomic orbital projection states.

To figure out what is wrong, I plot the atomic orbital projection 2d fermisurfae using the other tool 'figure c'.
In the figure c, I found the surface states as I saw in the atomic orbital projection band structure.
To plot the 2d fermisurface by pyprocar and other tool, I use the same input(scf.in, nscf.in, kpdos.in)
However the pyprocar result doesn't seem to be gamma-centered.
When looking the green box, the states seem to be shifted.
Additionally, for the kx and ky, the unit is angstrom^-1.
But why do the tick values range from 0 to 300?
Is ther any way to change the tick values?
I will upload the input file used for the calculation.
I would appreciate it if you could check for any mistakes during the process and let me know how to resolve them.

scf.in

&CONTROL
    calculation = 'scf',
    prefix =     'NbP',
    restart_mode='from_scratch',
    pseudo_dir='/home/zi56895/Dojo_NC',
    outdir = './wavefunc'
    verbosity = 'high'
    nstep = 100
 /
&SYSTEM
    ibrav = 0
    nat = 40
    ntyp = 2
    nbnd = 562
    ecutrho = 328.0,
    ecutwfc = 82.0,
!	nspin = 1
    occupations='smearing',
    noncolin = .true.,
    lspinorb = .true.,
	starting_magnetization(1) = 1
   starting_magnetization(2) = 1,
    smearing='gaussian',
    degauss=0.0019,
/
&electrons
 conv_thr = 1.0d-6
 mixing_mode = 'plain'
 mixing_beta = 0.1
 electron_maxstep = 700
/
&ions
! ion_dynamics = 'bfgs'
/
&cell
! cell_dynamics = 'bfgs'
! press_conv_thr = 0.5
! cell_dofree = 'z'
/
 
CELL_PARAMETERS (angstrom)
        3.4824399948         0.0000000000         0.0000000000
        0.0000000000         3.3485035896         0.0000000000
        0.0000000000         0.0000000000        72.1319808960
ATOMIC_SPECIES
Nb 92.906 Nb.upf
P  30.974  P.upf

ATOMIC_POSITIONS (angstrom)
Nb     1.741219998         1.674251795        11.425688020
Nb     1.741219998         1.674251795        22.852084199
Nb     1.741219998         1.674251795        34.278480379
Nb     1.741219998         1.674251795        45.704876558
Nb     1.741219998         1.674251795        57.131272737
Nb     1.741219998         0.000000000         2.855891028
Nb     1.741219998         0.000000000        14.282287207
Nb     1.741219998         0.000000000        25.708683386
Nb     1.741219998         0.000000000        37.135079565
Nb     1.741219998         0.000000000        48.561475744
Nb     0.000000000         0.000000000         5.712490737
Nb     0.000000000         0.000000000        17.138886917
Nb     0.000000000         0.000000000        28.565283096
Nb     0.000000000         0.000000000        39.991679275
Nb     0.000000000         0.000000000        51.418075454
Nb     0.000000000         1.674251795         8.569089701
Nb     0.000000000         1.674251795        19.995485880
Nb     0.000000000         1.674251795        31.421882059
Nb     0.000000000         1.674251795        42.848278239
Nb     0.000000000         1.674251795        54.274674418
P       0.000000000         0.000000000        10.482940286
P       0.000000000         0.000000000        21.909336465
P       0.000000000         0.000000000        33.335732644
P       0.000000000         0.000000000        44.762128824
P       0.000000000         0.000000000        56.188525003
P       0.000000000         1.674251795         1.913143516
P       0.000000000         1.674251795        13.339539695
P       0.000000000         1.674251795        24.765935874
P       0.000000000         1.674251795        36.192332054
P       0.000000000         1.674251795        47.618728233
P       1.741219998         1.674251795         4.769743218
P       1.741219998         1.674251795        16.196139397
P       1.741219998         1.674251795        27.622535576
P       1.741219998         1.674251795        39.048931756
P       1.741219998         1.674251795        50.475327935
P       1.741219998         0.000000000         7.626341924
P       1.741219998         0.000000000        19.052738104
P       1.741219998         0.000000000        30.479134283
P       1.741219998         0.000000000        41.905530462
P       1.741219998         0.000000000        53.331926641
K_POINTS {automatic}
10 10 1 0 0 0

nscf.in

&CONTROL
    calculation = 'nscf',
    prefix =     'NbP',
    restart_mode='from_scratch',
    pseudo_dir='/home/zi56895/Dojo_NC',
    outdir = './wavefunc'
    verbosity = 'high'
    nstep = 100
 /
&SYSTEM
    ibrav = 0
    nat = 40
    ntyp = 2
    nbnd = 562
    ecutrho = 328.0,
    ecutwfc = 82.0,
!	nspin = 1
    occupations='smearing',
    noncolin = .true.,
    lspinorb = .true.,
	starting_magnetization(1) = 1
   starting_magnetization(2) = 1,
    smearing='gaussian',
    degauss=0.0019,
/
&electrons
 conv_thr = 1.0d-6
 mixing_mode = 'plain'
 mixing_beta = 0.1
 electron_maxstep = 700
/
&ions
! ion_dynamics = 'bfgs'
/
&cell
! cell_dynamics = 'bfgs'
! press_conv_thr = 0.5
! cell_dofree = 'z'
/
 
CELL_PARAMETERS (angstrom)
        3.4824399948         0.0000000000         0.0000000000
        0.0000000000         3.3485035896         0.0000000000
        0.0000000000         0.0000000000        72.1319808960
ATOMIC_SPECIES
Nb 92.906 Nb.upf
P  30.974  P.upf

ATOMIC_POSITIONS (angstrom)
Nb     1.741219998         1.674251795        11.425688020
Nb     1.741219998         1.674251795        22.852084199
Nb     1.741219998         1.674251795        34.278480379
Nb     1.741219998         1.674251795        45.704876558
Nb     1.741219998         1.674251795        57.131272737
Nb     1.741219998         0.000000000         2.855891028
Nb     1.741219998         0.000000000        14.282287207
Nb     1.741219998         0.000000000        25.708683386
Nb     1.741219998         0.000000000        37.135079565
Nb     1.741219998         0.000000000        48.561475744
Nb     0.000000000         0.000000000         5.712490737
Nb     0.000000000         0.000000000        17.138886917
Nb     0.000000000         0.000000000        28.565283096
Nb     0.000000000         0.000000000        39.991679275
Nb     0.000000000         0.000000000        51.418075454
Nb     0.000000000         1.674251795         8.569089701
Nb     0.000000000         1.674251795        19.995485880
Nb     0.000000000         1.674251795        31.421882059
Nb     0.000000000         1.674251795        42.848278239
Nb     0.000000000         1.674251795        54.274674418
P       0.000000000         0.000000000        10.482940286
P       0.000000000         0.000000000        21.909336465
P       0.000000000         0.000000000        33.335732644
P       0.000000000         0.000000000        44.762128824
P       0.000000000         0.000000000        56.188525003
P       0.000000000         1.674251795         1.913143516
P       0.000000000         1.674251795        13.339539695
P       0.000000000         1.674251795        24.765935874
P       0.000000000         1.674251795        36.192332054
P       0.000000000         1.674251795        47.618728233
P       1.741219998         1.674251795         4.769743218
P       1.741219998         1.674251795        16.196139397
P       1.741219998         1.674251795        27.622535576
P       1.741219998         1.674251795        39.048931756
P       1.741219998         1.674251795        50.475327935
P       1.741219998         0.000000000         7.626341924
P       1.741219998         0.000000000        19.052738104
P       1.741219998         0.000000000        30.479134283
P       1.741219998         0.000000000        41.905530462
P       1.741219998         0.000000000        53.331926641
K_POINTS {automatic}
20 20 1 0 0 0

kpdos.in

&projwfc
   outdir='./wavefunc1',
   prefix='NbP',
   ngauss=0, degauss=0.0073498
   DeltaE=0.01
   kresolveddos=.true.
  ! lsym=.false.
   !filpdos='NbP.k'
   filproj='NbPproj.k'
   !savesigma=.true.
/

plot.py

import os
import pyprocar


data_dir = f"{os.getcwd()}"

atoms = [0,5,10,15,20,25,30,35]


pyprocar.fermi2D(code='qe', cmap='Reds', savefig='NbPfermiarc.png', fermi = 10.4368, mode='parametric', atoms=atoms, dirname=data_dir)

subeen

@lllangWV
Copy link
Member

Hey Subeen,

Thank you for bringing this issue to our attention! The bug you encountered was related to the plotting in parametric and plain modes. Specifically, when we generate the line segments for these modes, we use skimage.measure.find_contours, which provides the contours that are in terms meshgrid coordinate indices. While this results in correctly plotted contours, it causes the x and y tick labels to be displayed in meshgrid coordinate indices rather than in terms of the original kmesh. This is why you observed the tick labels ranging from 0 to 300.

To resolve this, I've implemented an interpolation step to map the output of the contour algorithm back onto the original kmesh grid. The fix has been applied to the main branch on GitHub. You can update your local copy by running:

git clone git@github.com:romerogroup/pyprocar.git
cd pyprocar
pip install -e .

I am currently running your calculation, but since it's quite lengthy, could you please test the updated code on your end to confirm if the issue is resolved?

Additionally, I'm working on a refactor of the fermisurface2d implementation, which should offer more user control over the plotting parameters in future updates.

Best regards,
Logan Lang

@SubeenLim
Copy link
Author

SubeenLim commented Aug 28, 2024

Dear Logan Lang,

Thank you for your attention to this matter.
After updated the pyprocar from git, the result seems to be correct compared to other fermisurface result calculated from other tool.
There are atomic orbital projection states as I expected and tick labels are changed.
NbPbi
However there are some problems.

  1. As you can see, at the blue box, the states that should exist do not appear.
  2. I thought that the tick values are not proper, because as I known, the range of kx is from -0.9xxx to 0.9xxx.
    I thick bohr unit is applied to the pyprocar.fermi2D code.
    If the plot is in angstrom units instead of bohr units, it would be helpful for comparing with various literature and resources, or conducting research.

Best regards,
Subeen

@lllangWV
Copy link
Member

Hey Subeen,

I have been looking into the blue box issue. I have narrowed it down to being an issue with the symmetrization, since one of the kpoints fall on the Brillouin Zone, the kpoints are not evenly distributed.

I believe there are 3 solutions

  • Try an odd numbered mesh
K_POINTS automatic
21 21 1 0 0 0
  • Try a Gamma centered mesh (I think this will be the best solution)
K_POINTS automatic
20 20 1 1 1 0
  • Use a denser mesh and the problem will be less visible.
K_POINTS automatic
40 40 1 1 1 0

Thinking more about this, I think there is a way accommodate for the current kmesh, though, this will take some time to develop.

I thought that the tick values are not proper, because as I known, the range of kx is from -0.9xxx to 0.9xxx.
I thick bohr unit is applied to the pyprocar.fermi2D code.
If the plot is in angstrom units instead of bohr units, it would be helpful for comparing with various literature and resources, or conducting research.

You are right. I apologize about that. I have updated github to convert ensure the outputs of QE are in angstrom now, this will make it consistent with the other DFT codes .

Best,

Logan Lang

@SubeenLim
Copy link
Author

Dear Logan Lang,

Thank you so much.
I'm gonna try your solutions!

Best regards,
Subeen

@SubeenLim
Copy link
Author

Dear Logan Lang,

I have additional questions.
I want to try non-colinear spin texture projection with qe code.
In the DFT Prep, non-colinear-Spin-Spin calculations take some additional steps as it requires a branch of Quantum Espresso code to print out the spin projections.

I am currently using QE version 7.1, and I would like to know if it is necessary to update qe branch.
If an update is required, could you please provide me with the Git clone URL?

Best regards,
Subeen

@lllangWV
Copy link
Member

lllangWV commented Sep 7, 2024

Hi @SubeenLim,

Did the previous suggestions help?

I am currently using QE version 7.1, and I would like to know if it is necessary to update the QE branch. If an update is required, could you please provide me with the Git clone URL?

In this case, updating QE itself won’t be necessary. To get the spin textures, you'll need to clone and compile a specific branch of the code, so the version number is less relevant. That said, I believe the branch is based on version 7.1.

Here are the steps you need to follow. It looks like Pietro recently updated the branch from new_proj to proj_new_rebased, and I still need to update this in the documentation:

  1. Clone the repository:
    git clone git@gitlab.com:pietrodelugas/q-e.git
  2. Navigate into the cloned directory:
    cd q-e
  3. Checkout the correct branch:
    git checkout proj_new_rebased
  4. Compile and install the package.
  5. Set your PATH to the bin directory inside the q-e folder.

Let me know if you run into any issues!

Best,
Logan Lang

@SubeenLim
Copy link
Author

SubeenLim commented Sep 8, 2024

Dear Logan Lang,

Did the previous suggestions help?:
When I tried an odd numbered mesh, it worked!!

For the new branch, If there are any issues, I will make sure to share them.

I faced new issues.
I want to plot the (100) 2d fermisurface not (001).
So i tested bulk system to observe the (001) 2d section and (100) 2d section.
Below is my input file.
scf.in

&CONTROL
    calculation = 'scf',
    prefix =     'NbP',
    restart_mode='from_scratch',
    pseudo_dir='/home/zi56895/Dojo_NC',
    outdir = './wavefunc'
    verbosity = 'high'
    nstep = 50
 /
&SYSTEM
    ibrav = 0
    nat = 8
    ntyp = 2
    nbnd = 104
    ecutrho = 328.0,
    ecutwfc = 82.0,
!	nspin = 1
    occupations='smearing',
    noncolin = .true.,
    lspinorb = .true.,
	starting_magnetization(1) = 1
   starting_magnetization(2) = 1,
    smearing='gaussian',
    degauss=0.0019,
/
&electrons
 conv_thr = 1.0d-6
 mixing_beta = 0.1
 electron_maxstep = 500
/
&ions
 ion_dynamics = 'bfgs'
/
&cell
 cell_dynamics = 'bfgs'
 press_conv_thr = 0.5
/
 
CELL_PARAMETERS (angstrom)
   3.348503536   0.000000000   0.000000000
   0.000000000   3.348503626   0.000000000
   0.000000000   0.000000000  11.426395998

ATOMIC_SPECIES
Nb 92.906 Nb.upf
P  30.974  P.upf

ATOMIC_POSITIONS (crystal)
Nb            0.5000000000        0.5000000000        0.9999380243
Nb            0.5000000000        0.0000000000        0.2499380367
Nb            0.0000000000        0.0000000000        0.4999380949
Nb            0.0000000000        0.5000000000        0.7499380878
P             0.0000000000        0.0000000000        0.9174318938
P             0.0000000000        0.5000000000        0.1674319257
P             0.5000000000        0.5000000000        0.4174319832
P             0.5000000000        0.0000000000        0.6674319536


K_POINTS {automatic}
10 10 7 0 0 0

nscf.in

&CONTROL
    calculation = 'nscf',
    prefix =     'NbP',
    restart_mode='from_scratch',
    pseudo_dir='/home/zi56895/Dojo_NC',
    outdir = './wavefunc'
    verbosity = 'high'
    nstep = 50
 /
&SYSTEM
    ibrav = 0
    nat = 8
    ntyp = 2
    nbnd = 104
    ecutrho = 328.0,
    ecutwfc = 82.0,
!	nspin = 1
    occupations='smearing',
    noncolin = .true.,
    lspinorb = .true.,
	starting_magnetization(1) = 1
    starting_magnetization(2) = 1,
    smearing='gaussian',
    degauss=0.0019,
/
&electrons
 conv_thr = 1.0d-6
 mixing_beta = 0.1
 electron_maxstep = 500
/
&ions
 ion_dynamics = 'bfgs'
/
&cell
 cell_dynamics = 'bfgs'
 press_conv_thr = 0.5
/
 
CELL_PARAMETERS (angstrom)
   3.348503536   0.000000000   0.000000000
   0.000000000   3.348503626   0.000000000
   0.000000000   0.000000000  11.426395998

ATOMIC_SPECIES
Nb 92.906 Nb.upf
P  30.974  P.upf

ATOMIC_POSITIONS (crystal)
Nb            0.5000000000        0.5000000000        0.9999380243
Nb            0.5000000000        0.0000000000        0.2499380367
Nb            0.0000000000        0.0000000000        0.4999380949
Nb            0.0000000000        0.5000000000        0.7499380878
P             0.0000000000        0.0000000000        0.9174318938
P             0.0000000000        0.5000000000        0.1674319257
P             0.5000000000        0.5000000000        0.4174319832
P             0.5000000000        0.0000000000        0.6674319536


K_POINTS {automatic}
31 31 11 0 0 0

kpdos.in

   outdir='./wavefunc',
   prefix='NbP',
   ngauss=0, degauss=0.0073498
   DeltaE=0.01
   kresolveddos=.true.
  ! lsym=.false.
   !filpdos='NbP.k'
   filproj='NbPproj.k'
   !savesigma=.true.

Bandplot.py

import os
import pyprocar

data_dir = f"{os.getcwd()}"
#atoms = [0,5,10,15,20,25,30,35]
pyprocar.fermi2D(code='qe', savefig='100.png', rotation=[90,0,1,0], fermi = 15.0781, mode='parametric', dirname=data_dir)

py

For the (001) plane, 2d fermisurface was well plotted.
But, for the (100) plane, there are some error codes.

error code

Traceback (most recent call last):
  File "/home/zi56895/qe/NbPconven/fermisurface/BandPlot.py", line 17, in <module>
    pyprocar.fermi2D(code='qe', savefig='100.png', rotation=[90,0,1,0], fermi = 15.0781, mode='parametric', dirname=data_dir)
  File "/home/zi56895/anaconda3/lib/python3.11/site-packages/pyprocar/pyprocar/scripts/scriptFermi2D.py", line 247, in fermi2D
    fs.plot(mode=mode, interpolation=300)
  File "/home/zi56895/anaconda3/lib/python3.11/site-packages/pyprocar/pyprocar/core/fermisurface.py", line 211, in plot
    bnew.append(griddata((x, y), band, (xnew, ynew), method="cubic"))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zi56895/anaconda3/lib/python3.11/site-packages/scipy/interpolate/_ndgriddata.py", line 277, in griddata
    ip = CloughTocher2DInterpolator(points, values, fill_value=fill_value,
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "interpnd.pyx", line 915, in scipy.interpolate.interpnd.CloughTocher2DInterpolator.__init__
  File "_qhull.pyx", line 1827, in scipy.spatial._qhull.Delaunay.__init__
  File "_qhull.pyx", line 353, in scipy.spatial._qhull._Qhull.__init__
scipy.spatial._qhull.QhullError: QH6154 Qhull precision error: Initial simplex is flat (facet 3 is coplanar with the interior point)

While executing:  | qhull d Q12 Qz Qt Qbb Qc
Options selected for Qhull 2019.1.r 2019/06/21:
  run-id 1295332434  delaunay  Q12-allow-wide  Qz-infinity-point  Qtriangulate
  Qbbound-last  Qcoplanar-keep  _pre-merge  _zero-centrum  Qinterior-keep
  Pgood  _max-width 1.8  Error-roundoff 1.3e-15  _one-merge 8.8e-15
  Visible-distance 2.5e-15  U-max-coplanar 2.5e-15  Width-outside 5e-15
  _wide-facet 1.5e-14  _maxoutside 1e-14

The input to qhull appears to be less than 3 dimensional, or a
computation has overflowed.

Qhull could not construct a clearly convex simplex from points:
- p480(v4):     0     0     0
- p61(v3): -1.7e-16  0.91  0.83
- p837(v2): 1.7e-16 -0.91  0.83
- p31(v1): -1.7e-16 -0.91  0.83

The center point is coplanar with a facet, or a vertex is coplanar
with a neighboring facet.  The maximum round off error for
computing distances is 1.3e-15.  The center point, facets and distances
to the center point are as follows:

center point -4.163e-17   -0.227   0.6191

facet p61 p837 p31 distance= -0.21
facet p480 p837 p31 distance= -0.31
facet p480 p61 p31 distance= -8.3e-17
facet p480 p61 p837 distance= -8.3e-17

These points either have a maximum or minimum x-coordinate, or
they maximize the determinant for k coordinates.  Trial points
are first selected from points that maximize a coordinate.

The min and max coordinates for each dimension are:
  0:  -1.665e-16  1.665e-16  difference= 3.331e-16
  1:    -0.908     0.908  difference= 1.816
  2:         0     0.908  difference= 0.908

If the input should be full dimensional, you have several options that
may determine an initial simplex:
  - use 'QJ'  to joggle the input and make it full dimensional
  - use 'QbB' to scale the points to the unit cube
  - use 'QR0' to randomly rotate the input for different maximum points
  - use 'Qs'  to search all points for the initial simplex
  - use 'En'  to specify a maximum roundoff error less than 1.3e-15.
  - trace execution with 'T3' to see the determinant for each point.

If the input is lower dimensional:
  - use 'QJ' to joggle the input and make it full dimensional
  - use 'Qbk:0Bk:0' to delete coordinate k from the input.  You should
    pick the coordinate with the least range.  The hull will have the
    correct topology.
  - determine the flat containing the points, rotate the points
    into a coordinate plane, and delete the other coordinates.
  - add one or more points to make the input full dimensional.

Is there something wrong with the way to rotate? If so, how can I rotate to the 100 plane?

Best regards,
Subeen

@SubeenLim
Copy link
Author

Dear Logan Lang,

For the git@gitlab.com:pietrodelugas/q-e.git, I complied and installed pw and pp.
And then, setting the Path to bin directory, dft code well functioned.

Using the new branch, above scf, nscf and kpdos are well coveraged.
However, when I used pyprocar.fermi2D, there are error codes.
Like above 001 fermisurface, I used same scf and nscf and kpdos.
The only difference is new branch.
Please let me know what is wrong.

Traceback (most recent call last):
  File "/home/zi56895/qe/NbPconven/fermisurface/BandPlot.py", line 17, in <module>
    pyprocar.fermi2D(code='qe', savefig='0011.png', fermi = 15.0782, mode='parametric', dirname=data_dir)
  File "/home/zi56895/anaconda3/lib/python3.11/site-packages/pyprocar/pyprocar/scripts/scriptFermi2D.py", line 139, in fermi2D
    parser = io.Parser(code = code, dir = dirname)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zi56895/anaconda3/lib/python3.11/site-packages/pyprocar/pyprocar/io/parser.py", line 26, in __init__
    self.parse()
  File "/home/zi56895/anaconda3/lib/python3.11/site-packages/pyprocar/pyprocar/io/parser.py", line 42, in parse
    self.parse_qe()
  File "/home/zi56895/anaconda3/lib/python3.11/site-packages/pyprocar/pyprocar/io/parser.py", line 199, in parse_qe
    parser = qe.QEParser(
             ^^^^^^^^^^^^
  File "/home/zi56895/anaconda3/lib/python3.11/site-packages/pyprocar/pyprocar/io/qe.py", line 54, in __init__
    self._parse_band_structure_tag(main_xml_root=xml_root)
  File "/home/zi56895/anaconda3/lib/python3.11/site-packages/pyprocar/pyprocar/io/qe.py", line 985, in _parse_band_structure_tag
    self.atm_wfc = int(main_xml_root.findall(".//output/band_structure/num_of_atomic_wfc")[0].text)
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

Best regards,
Subeen

@lllangWV
Copy link
Member

lllangWV commented Sep 9, 2024

This issue is because it could not find the xml path.

    self.atm_wfc = int(main_xml_root.findall(".//output/band_structure/num_of_atomic_wfc")[0].text)
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

Can you look at the calculation's {prefix}.xml to see if it has './/output/band_structure/num_of_atomic_wfc'?

Logan Lang

@SubeenLim
Copy link
Author

SubeenLim commented Sep 10, 2024

Dear Logan Lang,

I checked my prefix.xml and then found some issue.
problem
For the QE7.1, there are 'num_of_atomic_wfc' (red box).
However, when I used the 'proj_new_rebased branch', there are no 'num_of_atomic_wfc'.

Would using 'proj_new_rebased branch' be a problem?

Subeen

@lllangWV
Copy link
Member

Interesting. This issue is going to take some more time to solve. I have to discuss this with some of the other developers.

I think it is a qe version issue. I am unsure if this was rebase was with qe 7.1. I am going to have to test 7.2 and 7.3 to see if they keep or remove num_atomic_wfc If they removed it, I will have to think of a better method to parse num_atomic_wfc.

This may take a while, but I'll keep you updated.

Best,

Logan Lang

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

No branches or pull requests

2 participants