VASP

(contributed by Patrick Melix)

Results

It is highly recommended to use the ASE features for accessing the results of a VASPJob through the vasprun.xml. Use something like the snippet below to create a dummy ASE calculator and retrieve the results you need. Remember that ASE needs the path to the POTCARs in an environment variable.

ase_calc = Vasp(directory=str(job.path), xc='PBE') # set xc to anything, just needed for the automatisms of ASE
ase_calc.read()
print(ase_calc.get_potential_energy(force_consistent=False))
forces = ase_calc.get_forces()
...

API

class VASPJob[source]

A class representing a single computational job with VASP <https://www.vasp.at/>

  • Set ‘ignore_molecule’ in self.settings to disable Molecule handling through ASE.

  • Set ‘ignore_potcar’ in self.settings to disable automatic POTCAR creation.

  • Set the path to the POTCAR files in self.settings.input.potcar for automatic POTCAR creation.

  • If POTCAR files not matching the element symbol should be used, give a translation dict in self.settings.input.potcardict.

    E.g. {‘Fe’: ‘Fe_pv’}.

  • Settings branch input.incar is parsed into the INCAR file, input.xxx into the corresponding XXX file.

  • Use the PLAMS notation _h, _1, _2, … to obtain keywords in specific order (e.g. for the KPOINTS file).

_result_type

alias of VASPResults

get_input()[source]

Transform all contents of input branch of settings into string.

get_runscript()[source]

Run VASP

Overwrite self._command to change the default VASP Binary.

check()[source]

Look for the normal termination line in output. Note, that does not mean your calculation was successful!

class VASPResults[source]

A class for VASP results.

get_energy(index=-1, unit='a.u.')[source]

Returns sigma->0 (!!!) energy without entropy.

get_dispersion_energy(index=-1, unit='a.u.')[source]

Returns Edisp (eV) from the OUTCAR.