readVasp.py

Our initial implementation is for VASP output, so let’s focus on VASP.

VASP requires the following input files, although it can use many more:

  • INCAR: Main list of parameters.
  • KPOINTS: Specify the k-point grid.
  • POSCAR: Specify atom positions.
  • POTCAR: Specify atomic pseudopotentials.

VASP produces many output files, but the only files we retain are the input ones, listed above, and the two output files:

  • OUTCAR: General log and results in human-readable format.
  • vasprun.xml: All results in XML format.

During a study a researcher may produce terabytes of VASP-related information: for each of many structures, multiple VASP runs perform different relaxations.

Typically a group of related directories will be uploaded at once. They are identified by a wrapId.


class nrelmat.readVasp.ResClass[source]

An empty class used as a container for parseDir results.

The parseDir function will call either parsePylada or parseXml, and they will save the VASP results as attributes of an instance of ResClass.

nrelmat.readVasp.main()[source]

Test driver: Extracts info from the output of a VASP run.

Command line parameters:

Parameter Type Description
-bugLev integer Debug level. Normally 0.
-readType string If ‘outcar’, read the OUTCAR file. If ‘xml’, read the vasprun.xml file. If ‘compare’, read both files and compare.
-allowExc boolean false/true: continue after error.
-inDir string Input directory containing OUTCAR and/or vasprun.xml.
-maxLev int Max number of levels to print for xml
nrelmat.readVasp.parseDir(bugLev, readType, allowExc, inDir, maxLev)[source]

Extracts info from the output of a VASP run.

Parameters:

  • bugLev (int): Debug level. Normally 0.
  • readType (str): If ‘outcar’, calls nrelmat.ScanOutcar to read the OUTCAR file. If ‘xml’, calls nrelmat.ScanXml to read the vasprun.xml file. If ‘compare’, read both files and compare.
  • allowExc (bool): continue after error.
  • inDir (str): Input directory containing OUTCAR and/or vasprun.xml.
  • maxLev (int) Max number of levels to print for xml (normally 0)

Returns:

  • resObj (class ResClass): data object with attributes set.

Previous topic

queryMatDb.py

Next topic

ScanOutcar.py

This Page