# The standard format and parser of VASP output files

I see a lot of post-processing tools for VASP, including ASE, VASPKIT,Pymagten and some other customized codes. They all read the VASP output files like a normal text file. Sometimes I would meet incompatibility issues between the parsers of some tools and VASP output files. I am wondering if there is a standard format or parser of the VASP output files?

• Not to dismiss the question outright (since I'm definitely not an expert in VASP), but I suspect the answer is no, at least for the standard parser. While I suspect the output files have a (roughly) consistent format, the fact that there are such a wide variety of third-party tools to process VASP output as text files suggests there isn't an official interface that can more directly and consistently handle the output beyond just scanning the output files.
– Tyberius
Jan 11 at 22:38

If by "standard", you mean an "official" VASP-supported program, then the answer is no. VASP gives you the raw text output for you to deal with on your own. That being said, the vasprun.xml file produced at the end of a run contains many of the important calculation results, so any parser than can read an XML file can also parse this data in a trivial fashion.

It sounds like you're already aware of it, but I highly recommend Pymatgen's VASP output parsers. They are thorough and battle-tested. I don't think you'll run into many "incompatibility issues". If you do, please open an issue on GitHub, and I can try and address it personally.

from pymatgen.io.vasp.outputs import Outcar, Vasprun
vr = Vasprun('vasprun.xml')
outcar = Outcar('OUTCAR')
print(vr.as_dict())
print(outcar.as_dict())


Disclaimer: I work with the Materials Project team, which develops and maintains pymatgen.

• is there any tutorials about how to draw the projected DOS or band structure with pymatgen?
– Jack
Jan 12 at 21:46