VaspData

class py4vasp.raw.VaspData(data)

Bases: NDArrayOperatorsMixin

Wraps the data produced by the VASP calculation.

Instead of exposing the underlying file structure directly, the data is wrapped in this container. This allows changing the way the data is internally represented without affecting the user. In particular, the data is possibly only lazily loaded when it is actually necessary.

By inheriting from NDArrayOperatorsMixin most numpy functionality except for the class attributes should work. If any other feature is needed any instance of this class can be passed into a numpy array. Please be aware that using the data in this way will access the file. If performance is an issue, make sure that this file I/O is reduced as much as possible.

Parameters:

data – The data wrapped by this container.

Attributes Summary

data

dtype

Describes the type of the contained data.

ndim

The number of dimensions of the data.

shape

The shape of the data.

size

The total number of elements of the data.

Methods Summary

is_none()

Attributes Documentation

data
dtype

Describes the type of the contained data.

ndim

The number of dimensions of the data.

shape

The shape of the data. Empty tuple for scalar data.

size

The total number of elements of the data.

Methods Documentation

is_none()