sisl.io.vasp.outcarSileVASP

class sisl.io.vasp.outcarSileVASP(filename, *args, **kwargs)

Bases: SileVASP

OUTCAR file from VASP

Methods

accuracy_reached()

True if the line "reached required accuracy" was found.

base_directory([relative_to])

Retrieve the base directory of the file, relative to the path relative_to

close()

completed()

True if the line "General timing and accounting" was found.

cpu_time([flag])

Returns the consumed cpu time (in seconds) from a given section

dir_file([filename, filename_base])

File of the current Sile

geometry_group(geometry[, ret_index])

Order atoms in geometry according to species such that all of one specie is consecutive

read(*args, **kwargs)

Generic read method which should be overloaded in child-classes

read_energy([units])

Reads an energy specification block from OUTCAR

read_trajectory()

Reads cell+position+force data from OUTCAR for an ionic trajectory step

write(*args, **kwargs)

Generic write method which should be overloaded in child-classes

Attributes

base_file

File of the current Sile

file

File of the current Sile

accuracy_reached()[source]

True if the line “reached required accuracy” was found.

base_directory(relative_to='.')

Retrieve the base directory of the file, relative to the path relative_to

close()
completed()[source]

True if the line “General timing and accounting” was found.

cpu_time(flag='General timing and accounting')[source]

Returns the consumed cpu time (in seconds) from a given section

dir_file(filename=None, filename_base='')

File of the current Sile

static geometry_group(geometry, ret_index=False)

Order atoms in geometry according to species such that all of one specie is consecutive

When creating VASP input files (poscarSileVASP for instance) the equivalent POTCAR file needs to contain the pseudos for each specie as they are provided in blocks.

I.e. for a geometry like this:

[Atom(6), Atom(4), Atom(6)]

the resulting POTCAR needs to contain the pseudo for Carbon twice.

This method will re-order atoms according to the species”

Parameters:
  • geometry (Geometry) – geometry to be re-ordered

  • ret_index (bool, optional) – return sorted indices

Returns:

geometry (Geometry) – reordered geometry

read(*args, **kwargs)

Generic read method which should be overloaded in child-classes

Parameters:

kwargs – keyword arguments will try and search for the attribute read_<> and call it with the remaining **kwargs as arguments.

read_energy(units: sisl.typing.UnitsVar = 'eV') PropertyDict[source]

Reads an energy specification block from OUTCAR

The function steps to the next occurrence of the “Free energy of the ion-electron system” segment

Parameters:

units – selects units in the returned data

Notes

The name convention in the dictionary is as follows:

OUTCAR string Key

alpha Z PSCENC = Z Ewald energy TEWEN = Ewald -Hartree energ DENC = hartree -exchange EXHF = xcHF -V(xc)+E(xc) XCENC = xc PAW double counting = paw1 paw2 entropy T*S EENTRO = entropy eigenvalues EBANDS = band atomic energy EATOM = ion Solvation Ediel_sol = solvation

free energy TOTEN = free energy without entropy= total energy(sigma->0) = sigma0

Returns:

out (PropertyDict) – all energies from a single “Free energy of the ion-electron system” segment

Notes

This method defaults to return the first item(s).

This method enables slicing for handling multiple values (see [...|default]).

This is an optional handler enabling returning multiple elements if read_energy[...|0] allows this.

>>> single = obj.read_energy() # returns the default entry of read_energy[...|0]

To retrieve the first two elements that read_energy will return

>>> first_two = obj.read_energy[:2]()

Retrieving the last two is done equivalently:

>>> last_two = obj.read_energy[-2:]()

While one can store the sliced function tmp = obj.read_energy[:] one will loose the slice after each call.

read_trajectory()[source]

Reads cell+position+force data from OUTCAR for an ionic trajectory step

The function steps to the block defined by the “VOLUME and BASIS-vectors are now :” line to first read the cell vectors, then it steps to the “TOTAL-FORCE (eV/Angst)” segment to read the atom positions and forces.

Returns:

PropertyDict – Trajectory step defined by cell vectors (cell), atom positions (xyz), and forces (force)

Notes

This method defaults to return the first item(s).

This method enables slicing for handling multiple values (see [...|default]).

This is an optional handler enabling returning multiple elements if read_trajectory[...|0] allows this.

>>> single = obj.read_trajectory() # returns the default entry of read_trajectory[...|0]

To retrieve the first two elements that read_trajectory will return

>>> first_two = obj.read_trajectory[:2]()

Retrieving the last two is done equivalently:

>>> last_two = obj.read_trajectory[-2:]()

While one can store the sliced function tmp = obj.read_trajectory[:] one will loose the slice after each call.

write(*args, **kwargs)

Generic write method which should be overloaded in child-classes

Parameters:

**kwargs – keyword arguments will try and search for the attribute write_ and call it with the remaining **kwargs as arguments.

property base_file

File of the current Sile

property file

File of the current Sile