I have a bunch of VASP DOSCAR files that I’d like to read in with Pymatgen to generate .json-ified DOSs. I know that the class can handle this if you have a vasprun.xml file, but unfortunately I do not have all the vasprun.xml files saved. Are there any options to read a DOSCAR file directly with Pymatgen? For full context, the end-goal here is to create a bunch of DOS .json files to upload as attachments on MPContribs.

Hi @arosen, I actually don’t think it’s possible – I noticed this omission myself recently. However, I believe pymatgen reads files in a similar format so adding a parser should not be too difficult.

Doing a quick search on GitHub repo shows there is a LOBSTER DOSCAR class implemented but I’m not sure if this is in the same file format as the VASP DOSCAR (the name suggests it might be, but I haven’t checked).

Another code to check might be sumo, this uses the pymatgen DOS objects, but adds some additional functionality on top, so perhaps they’ve implemented a DOSCAR parser.

Thanks for the suggestions! I mainly wanted to make sure I wasn’t missing something. I’ll take a look at those options in the meantime.