Background
VASP CHGCAR files are electronic structure output files generated by the Vienna Ab-initio Simulation Package (VASP) software. These files contain information about the electronic charge density distribution of a simulated material or system. The CHGCAR file is written in human-readable format and consists of three blocks.
Structure data
Charge density
Augmentation occupancies
The charge density is stored on the fine FFT-grid whose mesh points are given by
\((N_{x},N_{y},N_{z}) = \frac{N_{x}-1}{N_{GXF}} \vec{a} + \frac{N_{y}-1}{N_{GYF}} \vec{b} + \frac{N_{z}-1}{N_{GZF}} \vec{c}\)
The CHGCAR file primarily serves to store the electron density scalar field. To visualize such scalar fields, there are two popular methods, which are the generation of isosurfaces or heat maps. EDP utilizes the latter technique by projecting the electron density onto a two-dimensional plane.
There are various ways to define the plane onto which the electron density should be projected. The approach used in EDP is to set two unit vectors \(\vec{v}\) and \(\vec{w}\) and a point \(\vec{p}\). Starting at the point \(\vec{p}\), a plane is then constructed by expanding in the two directions as given by the unit vectors \(\vec{v}\) and \(\vec{w}\). In turn, \(\vec{v}\) and \(\vec{w}\) will serve as the horizontal and vertical coordinates of a corresponding canvas onto which the electron density is plotted. The dimensions of the canvas are determined by the resolution given in pixels / Å.
A plane is defined using two normal vectors and a point. The dashed lines indicate the edges of the unit cell.