pyiron.vasp.outcar module

class pyiron.vasp.outcar.Outcar[source]

Bases: object

This module is used to parse VASP OUTCAR files.

parse_dict

A dictionary with all the useful quantities parsed from an OUTCAR file after from_file() is executed

Type

dict

from_file(filename='OUTCAR')[source]

Parse and store relevant quantities from the OUTCAR file into parse_dict.

Parameters

filename (str) – Filename of the OUTCAR file to parse

from_hdf(hdf, group_name='outcar')[source]

Load output from an HDF5 file

Parameters
static get_all_total_energies(filename='OUTCAR', lines=None)[source]

Gets the energy at every electronic step

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

Returns

A list of energie for every electronic step at every ionic step

Return type

list

static get_broyden_mixing_mesh(filename='OUTCAR', lines=None)[source]

Gets the Broyden mixing mesh size

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

Returns

Mesh size

Return type

int

get_cells(filename='OUTCAR', lines=None)[source]

Gets the cell size and shape for every ionic step from the OUTCAR file

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

Returns

A 3x3xM array of the cell shape in $AA$

where M is the number of time steps

Return type

numpy.ndarray

static get_dipole_moments(filename='OUTCAR', lines=None)[source]

Get the electric dipole moment at every electronic step

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

Returns

A list of dipole moments in (eA) for each electronic step

Return type

list

static get_energy_sigma_0(filename='OUTCAR', lines=None)[source]

Gets the total energy for every ionic step from the OUTCAR file

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

Returns

A 1xM array of the total energies in $eV$

where M is the number of time steps

Return type

numpy.ndarray

static get_energy_without_entropy(filename='OUTCAR', lines=None)[source]

Gets the total energy for every ionic step from the OUTCAR file

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

Returns

A 1xM array of the total energies in $eV$

where M is the number of time steps

Return type

numpy.ndarray

static get_fermi_level(filename='OUTCAR', lines=None)[source]

Getting the Fermi-level (Kohn_Sham) from the OUTCAR file

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

Returns

The Kohn-Sham Fermi level in eV

Return type

float

get_forces(filename='OUTCAR', lines=None, n_atoms=None)[source]

Gets the forces for every ionic step from the OUTCAR file

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

  • n_atoms (int/None) – number of ions in OUTCAR

Returns

A Nx3xM array of forces in $eV / AA$

where N is the number of atoms and M is the number of time steps

Return type

numpy.ndarray

static get_irreducible_kpoints(filename='OUTCAR', reciprocal=True, weight=True, planewaves=True, lines=None)[source]

Function to extract the irreducible kpoints from the OUTCAR file

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • reciprocal (bool) – Get either the reciprocal or the cartesian coordinates

  • weight (bool) – Get the weight assigned to the irreducible kpoints

  • planewaves (bool) – Get the planewaves assigned to the irreducible kpoints

  • lines (list/None) – lines read from the file

Returns

An array of k-points

Return type

numpy.ndarray

static get_kinetic_energy_error(filename='OUTCAR', lines=None)[source]

Get the kinetic energy error

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

Returns

The kinetic energy error in eV

Return type

float

static get_magnetization(filename='OUTCAR', lines=None)[source]

Gets the magnetization

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

Returns

A list with the mgnetization values

Return type

list

static get_nelect(filename='OUTCAR', lines=None)[source]

Returns the number of electrons in the simulation

Parameters
  • filename (str) – OUTCAR filename

  • lines (list/None) – lines read from the file

Returns

The number of electrons in the simulation

Return type

float

static get_number_of_atoms(filename='OUTCAR', lines=None)[source]

Returns the number of ions in the simulation

Parameters
  • filename (str) – OUTCAR filename

  • lines (list/None) – lines read from the file

Returns

The number of ions in the simulation

Return type

int

get_positions(filename='OUTCAR', lines=None, n_atoms=None)[source]

Gets the positions for every ionic step from the OUTCAR file

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

  • n_atoms (int/None) – number of ions in OUTCAR

Returns

A Nx3xM array of positions in $AA$

where N is the number of atoms and M is the number of time steps

Return type

numpy.ndarray

get_positions_and_forces(filename='OUTCAR', lines=None, n_atoms=None)[source]

Gets the forces and positions for every ionic step from the OUTCAR file

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

  • n_atoms (int/None) – number of ions in OUTCAR

Returns

[positions, forces] (sequence) numpy.ndarray: A Nx3xM array of positions in $AA$ numpy.ndarray: A Nx3xM array of forces in $eV / AA$

where N is the number of atoms and M is the number of time steps

static get_steps(filename='OUTCAR', lines=None)[source]
Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

Returns

Steps during the simulation

Return type

numpy.ndarray

static get_stresses(filename='OUTCAR', lines=None, si_unit=True)[source]
Parameters
  • filename (str) – Input filename

  • lines (list/None) – lines read from the file

  • si_unit (bool) – True SI units are used

Returns

An array of stress values

Return type

numpy.ndarray

static get_temperatures(filename='OUTCAR', lines=None)[source]

Gets the temperature at each ionic step (applicable for MD)

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

Returns

An array of temperatures in Kelvin

Return type

numpy.ndarray

get_time(filename='OUTCAR', lines=None)[source]

Time after each simulation step (for MD)

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

Returns

An array of time values in fs

Return type

numpy.ndarray

static get_total_energies(filename='OUTCAR', lines=None)[source]

Gets the total energy for every ionic step from the OUTCAR file

Parameters
  • filename (str) – Filename of the OUTCAR file to parse

  • lines (list/None) – lines read from the file

Returns

A 1xM array of the total energies in $eV$

where M is the number of time steps

Return type

numpy.ndarray

to_hdf(hdf, group_name='outcar')[source]

Store output in an HDF5 file

Parameters
to_hdf_minimal(hdf, group_name='outcar')[source]

Store minimal output in an HDF5 file (output unique to OUTCAR)

Parameters