raw

py4vasp.raw Module

Extract the raw data from the HDF5 file and transform it into dataclasses.

In the HDF5 file, the raw data is stored with specific keys. To avoid propagating the name of these keys to the higher tier modules, we transform everything into dataclasses. This enables the introduction of new file formats by replacing the access function.

Notes

The data from the HDF5 file is lazily loaded except for scalars. This avoids memory issues when the HDF5 file contains a lot of data, because only what is needed is read. However, this has the consequence that you need to enforce the read operation before the file is closed.

Functions

access(quantity, *[, selection, path, file])

Create access to a particular quantity from the VASP output.

Classes

Band(dispersion, fermi_energy, occupations, ...)

A band structure generated by VASP.

BornEffectiveCharge(structure, charge_tensors)

The Born effective charges resulting form a linear response calculation.

Cell(lattice_vectors[, scale])

Unit cell of the crystal or simulation cell for molecules.

Density(structure, charge)

The electronic charge and magnetization density on the Fourier grid.

DielectricFunction(energies, dielectric_function)

The full frequency-dependent dielectric function.

DielectricTensor(electron, ion, ...)

The dielectric tensor resulting from ionic and electronic contributions.

Dispersion(kpoints, eigenvalues)

A general class for dispersions (electron and phonon).

Dos(energies, dos, fermi_energy, projectors)

Contains the density of states (DOS) including its projections where available.

ElasticModulus(clamped_ion, relaxed_ion)

The elastic modulus calculated in a linear response calculation.

Energy(labels, values)

Various energies during ionic relaxation or MD simulation.

Fatband(dispersion, fermi_energy, bse_index, ...)

Contains the BSE data required to produce a fatband plot.

Force(structure, forces)

The forces acting on the atoms at all steps of a MD simulation or relaxation.

ForceConstant(structure, force_constants)

The force constants of the material.

InternalStrain(structure, internal_strain)

The internal strain calculated in a linear response calculation.

Kpoint(mode, number, coordinates, weights, cell)

A k-point mesh in the Brillouin zone.

Magnetism(structure, moments)

The local charges and magnetic moments on the ions.

PairCorrelation(distances, function, labels)

The pair-correlation function calculated during a MD simulation.

PhononBand(dispersion, topology, eigenvectors)

The band structure of the phonons.

PhononDos(energies, dos, projections, topology)

Contains the phonon density of states (DOS) including its projections where available.

PiezoelectricTensor(electron, ion)

The piezoelectric tensor calculated in a linear response calculation.

Polarization(electron, ion)

The electronic and ionic dipole moments.

Projector(topology, orbital_types, number_spins)

Projectors used for atom and orbital projections.

Stress(structure, stress)

The stress acting on the unit cell at all steps.

Structure(topology, cell, positions)

Structural information of the system.

System(system)

The name of the system set in the input.

Topology(number_ion_types, ion_types)

Contains the type of ions in the system and how many of each type exist.

VaspData(data)

Wraps the data produced by the VASP calculation.

Velocity(structure, velocities)

Contains the ion velocities along the trajectory.

Version(major[, minor, patch])

The version number of VASP.