When attempting to plot the DOS of a band calculation that includes SOC, I get an error 'spin 3' that comes from parsing the vasprun.xml.
Error Output:
File "C:\Users\alexs\anaconda3\envs\working\lib\site-packages\pyprocar\scriptBandsDosplot.py", line 274, in bandsdosplot
dos_plot = DosPlot(dos=vaspxml.dos, structure=vaspxml.structure)
File "C:\Users\alexs\anaconda3\envs\working\lib\site-packages\pyprocar\vaspxml\vaspxml.py", line 99, in dos
energies = self.dos_total['energies']
File "C:\Users\alexs\anaconda3\envs\working\lib\site-packages\pyprocar\vaspxml\vaspxml.py", line 127, in dos_total
dos_total, labels = self._get_dos_total()
File "C:\Users\alexs\anaconda3\envs\working\lib\site-packages\pyprocar\vaspxml\vaspxml.py", line 62, in _get_dos_total
dos_total[self.spins_dict[ispin]] = np.array(
KeyError: 'spin 3'
I don't have this error for the same pyprocar inputs on an equivalent non-SOC calculation.
I ran the command:
though I have tried it with variations of dos_spins=[0,1] or [0] or [1] or [1,2,3,4] or ['spin 1',[...]].
I notice that throughout my vasprun.xml there is a line that says and also does this for spin 2, spin 3, and spin 4, on separate lines repeated several times. I think this makes sense for an SOC calculation. (Also one place where it has "spin1", "spin2", "spin3", and "spin4", not all in a row but separately.). I assume that's where the "spin 3" error comes from?
So, how can I plot the DOS when SOC is included, or how can you help with this error? Thanks.
When attempting to plot the DOS of a band calculation that includes SOC, I get an error 'spin 3' that comes from parsing the vasprun.xml. Error Output: File "C:\Users\alexs\anaconda3\envs\working\lib\site-packages\pyprocar\scriptBandsDosplot.py", line 274, in bandsdosplot dos_plot = DosPlot(dos=vaspxml.dos, structure=vaspxml.structure)
File "C:\Users\alexs\anaconda3\envs\working\lib\site-packages\pyprocar\vaspxml\vaspxml.py", line 99, in dos energies = self.dos_total['energies']
File "C:\Users\alexs\anaconda3\envs\working\lib\site-packages\pyprocar\vaspxml\vaspxml.py", line 127, in dos_total dos_total, labels = self._get_dos_total()
File "C:\Users\alexs\anaconda3\envs\working\lib\site-packages\pyprocar\vaspxml\vaspxml.py", line 62, in _get_dos_total dos_total[self.spins_dict[ispin]] = np.array(
KeyError: 'spin 3'
I don't have this error for the same pyprocar inputs on an equivalent non-SOC calculation. I ran the command:
or
though I have tried it with variations of dos_spins=[0,1] or [0] or [1] or [1,2,3,4] or ['spin 1',[...]].
I notice that throughout my vasprun.xml there is a line that says and also does this for spin 2, spin 3, and spin 4, on separate lines repeated several times. I think this makes sense for an SOC calculation. (Also one place where it has "spin1", "spin2", "spin3", and "spin4", not all in a row but separately.). I assume that's where the "spin 3" error comes from?
So, how can I plot the DOS when SOC is included, or how can you help with this error? Thanks.