Reading from pre-existing VASP filesΒΆ

There is a fairly good equivalence between the INCAR file and the python functional. It is possible to re-create the python from an INCAR:

>>> from pylada.vasp import read_incar
>>> functional = read_incar()

By default, pylada.vasp.read_incar() will read from ‘INCAR’ in the current directory. However, it is also possible to pass as argument the path to a file situated somewhere else.

Similarly, one can read a POSCAR file and create a pylada.crystal.Structure instance from it:

>>> from pylada.crystal import read
>>> structure = read.poscar(types=['Al', 'Mg', 'O'])

pylada.crystal.read.poscar() will read both VASP 4 and 5 POSCAR formats. However, in the former case, it is important to include the species in the POSCAR, since those are actually missing from the file. If the POSCAR file contains dynamic attributes, that information is stored in each atom within an explicitly created freeze attribute.

Warning

The INCAR file does not contain all the information necessary to recreate a run. For instance, kpoints is not set correctly at this point. Nor can it re-create a functional with “enhanced” parameters such as ediff_per_specie. Hence, re-creating a functional from an INCAR of a previous Pylada run will not necessarily yield the exact same functional as that which created it in the first place. However, it will yield the exact same INCAR file.

Previous topic

Configuring Pylada for VASP

Next topic

Creating and Setting up the vasp functional

This Page