pyprocar icon indicating copy to clipboard operation
pyprocar copied to clipboard

Error for complicated material

Open DFTmagnetism opened this issue 2 years ago • 4 comments

Dear Sir/Madam,

I found an error. "File ~/anaconda3/lib/python3.11/site-packages/pyprocar/io/qe.py:196, in QEParser._parse_pdos(self, pdos_in_filename, dirname) 193 with open(pdos_in_filename, "r") as f: 194 pdos_in = f.read() --> 196 self.pdos_prefix = re.findall("filpdos\s*=\s*'(.)'", pdos_in)[0] 197 self.proj_prefix = re.findall("filproj\s=\s*'(.*)'", pdos_in)[0] 199 # Parsing total density of states

IndexError: list index out of range "

I used: atoms=[0] orbitals=[0] spins=[0,1]

pyprocar.bandsplot( code='qe', mode='scatter', atoms=atoms,

            orbitals=orbitals,
            spins=spins,
            fermi_color='red',  # Fermi line color
            fermi_linestyle='--',  # Fermi line linestyle
            #fermi_linewidth=2.0,  # Fermi line linewidth
            #linewidth=0.5,
            dirname="./")

For Fe, as example that you provided, it is working pretty well. I have 40 atoms in scf.in file. Could you please tell me how can I solve this error?

Best regards, Amir

DFTmagnetism avatar Oct 15 '23 14:10 DFTmagnetism

Hey Amir,

so the error comes from parsing the 'filpdos' variable from the kpdos.in file. Can you show me your kpdos.in file?

Logan Lang

lllangWV avatar Oct 15 '23 21:10 lllangWV

Hey Logan ,

Many thanks for your response. This is the kpdos.in file:

&projwfc outdir='./bak' prefix='MnCP3' DeltaE=0.05 kresolveddos=.true. filproj='feproj.k' !savesigma=.true. /

Best regards, Amir

DFTmagnetism avatar Oct 16 '23 07:10 DFTmagnetism

In the error report, it is trying to parse the density of state information, even though this is a band structure calculation. This will happen if there is a file 'pdos.in' in your calculation directory. What are all your files in your bands calculation directory?

lllangWV avatar Oct 16 '23 17:10 lllangWV

Thank you very much! When I removed the pdos.in file, it worked.

Best regards, Amir

DFTmagnetism avatar Oct 17 '23 07:10 DFTmagnetism