Dear PyProcar Developers,
I am using PyProcar to analyze band projections from a Quantum ESPRESSO calculation with non-collinear magnetism enabled but without spin–orbit coupling.
QE settings:
noncolin = .true.
lspinorb = .false.
When running pyprocar.bandsplot() with the kpdos.out file, the QE parser crashes with the following error:
IndexError: list index out of range
The error originates from the following line in pyprocar/io/qe.py:
j_orbital_type_index = float(re.findall("(?<=j=)\s*([- \d.]*)", wfc)[0])
The parser assumes that the orbital description contains a j= value.
However, in non-collinear calculations without SOC, Quantum ESPRESSO prints the atomic states using s_z instead of j.
Example from kpdos.out:
The atomic states are defined as follows:
state # 1: atom 1 (Cr1), wfc 1 (l=0 m=1 s_z= 0.5)
state # 2: atom 1 (Cr1), wfc 1 (l=0 m=1 s_z=-0.5)
state # 5: atom 1 (Cr1), wfc 3 (l=1 m=1 s_z= 0.5)
Because j= does not appear in these lines, the regex search returns an empty list and causes the crash.
It seems the parser currently assumes SOC-style orbital notation, while QE outputs spin-projection notation (s_z) when lspinorb = .false..
Dear PyProcar Developers,
I am using PyProcar to analyze band projections from a Quantum ESPRESSO calculation with non-collinear magnetism enabled but without spin–orbit coupling.
QE settings:
When running
pyprocar.bandsplot()with thekpdos.outfile, the QE parser crashes with the following error:The error originates from the following line in
pyprocar/io/qe.py:The parser assumes that the orbital description contains a
j=value.However, in non-collinear calculations without SOC, Quantum ESPRESSO prints the atomic states using s_z instead of j.
Example from
kpdos.out:Because
j=does not appear in these lines, the regex search returns an empty list and causes the crash.It seems the parser currently assumes SOC-style orbital notation, while QE outputs spin-projection notation (
s_z) whenlspinorb = .false..