materialsproject / pymatgen

Python Materials Genomics (pymatgen) is a robust materials analysis code that defines classes for structures and molecules with support for many electronic structure codes. It powers the Materials Project.
https://pymatgen.org
Other
1.52k stars 864 forks source link

"Incorrect value of vasp_type given" when reading spin-unpolarized WAVECAR #2009

Closed boyoungzheng closed 3 years ago

boyoungzheng commented 3 years ago

Describe the bug Same as the title.

To Reproduce Trying to do a band unfolding process with the attached inputs. Of course, a scf calculation is done first. inputs.zip

Expected behavior Successful reading of WAVECAR

Screenshots (None)

Versions

Additional context (None)

mturiansky commented 3 years ago

I tried your input files with vasp 5.4.4 and pymatgen 2020.7.3. I did the scf first followed by the band structure calculation. I read in the wavecar with the following code:

from pymatgen.io.vasp.outputs import Wavecar
w = Wavecar('WAVECAR')

This worked with no problem. I then updated to pymatgen 2020.11.11 and ran it again with no problems. How are you calling Wavecar? Could you try the above code?

boyoungzheng commented 3 years ago

Thanks for your reply. Weird enough, I tried a clean run and it works (with WAVECAR size 2.2G). I didn't find anything special in OUTCARs. Anyway, here I share the WAVECAR (2.3G) I have problem with.

https://pennstateoffice365-my.sharepoint.com/:f:/g/personal/buz118_psu_edu/Ek8qBSX2661Cn-2eNkZSVPsBbxS2Xn3FdLdm-Z9KO-_8Jg?e=xmZNfo

mturiansky commented 3 years ago

Well, I'm glad it works now. However, I tried the WAVECAR that you sent with the little code I listed above, and it read with no problem. Python 3.8.6 and pymatgen 2020.12.3. Are you sure you linked the right WAVECAR? :smile:

Which python version are you using? I wonder if that has anything to do with it (I would think not, but who knows).

boyoungzheng commented 3 years ago

MAGICALLY, the same WAVECAR can go through without any problem (on the cluster). I absolutely have no idea what happened. When I copied the WAVECAR to my local mac, I also tested it with no problem. Probably, the original error was due to something in the cluster which may have been secretly fixed by administrators.

Thank you very much for your help. This code helped me a loooooot. 👍

mturiansky commented 3 years ago

No problem, I'm glad it worked out. It could be a memory issue; the entire WAVECAR is read into memory. So if you were using a login node and someone else was using most of the memory, it would throw an error, and then the error would go away once some memory is freed up.