CHGCAR

From VASP Wiki
Revision as of 10:35, 7 January 2019 by Kaltakm (talk | contribs)

This file contains the lattice vectors, atomic coordinates, the total charge density multiplied by the volume on the fine FFT-grid (NG(X,Y,Z)F), and the PAW one-center occupancies. CHGCAR can be used to restart VASP from an existing charge density. For visualisation the CHG file should be used, since the PAW-one centre occupancies are difficult to parse. It is possible to avoid that the CHGCAR is written by setting LCHARGE=.FALSE. in the INCAR file. In VASP, the density is written using the following commands in Fortran:

WRITE(IU,FORM) (((C(NX,NY,NZ),NX=1,NGXC),NY=1,NGYZ),NZ=1,NGZC)

The x index is the fastest index, and the z index the slowest index. The file can be read format-free, because at least in new versions, it is guaranteed that spaces separate each number. Please do not forget to divide by the volume before visualizing the file!

Note that the real-space mesh (NX,NY,NZ) is uniform and spanned by the primitive lattice vectors calculated from

For spinpolarized calculations, two sets of data can be found in the CHGCAR file. The first set contains the total charge density (spin up plus spin down), the second one the magnetization density (spin up minus spin down). For non collinear calculations the file contains the total charge density and the magnetisation density in the x, y and z direction in this order.

For dynamic simulation (IBRION=0), the charge density on the file is the predicted charge density for the next step: i.e. it is compatible with the CONTCAR file, but incompatible with the last positions in the OUTCAR file. This allows the CHGCAR and the CONTCAR file to be used consistently for a molecular dynamics continuation job. For static calculations and relaxations (IBRION=-1,1,2) the written charge density is the self-consistent charge density for the last step and might be used e.g. for accurate band-structure calculations.

Mind: Since the charge density written to the file CHGCAR is not the self-consistent charge density for the positions on the CONTCAR file, do not perform a bandstructure calculation (ICHARG=11) directly after a dynamic simulation (IBRION=0).


Contents