CHGCAR

From VASP Wiki
Revision as of 08:42, 6 April 2022 by Huebsch (talk | contribs)

The CHGCAR file stores the charge density and the PAW one-center occupancies and can be used for restarting VASP calculations. The CHG file also stores the charge density and has a similar structure, however, CHG does not contain the PAW one-center occupancies and is mainly intended for visualization and post-processing. VASP creates the CHGCAR file by default, but it can be avoided by setting LCHARG = .FALSE. in the INCAR file.


Format

The CHGCAR consists of the following blocks:

  • structure
  • charge density
  • augmentation occupancies

The structure block uses the same format as the POSCAR file. The total charge density is represented on the fine FFT-grid (NGXF,NGYF,NGZF) and is multiplied by the cell volume, i.e. . Thus, remember that the charge density should be divided by the cell volume for visualization. As the density is written out using the following command in Fortran

WRITE(IU,FORM) (((C(NX,NY,NZ),NX=1,NGXF),NY=1,NGYF),NZ=1,NGZF) ,

the iteration over NX is performed in the inner-most loop (fastest) and the loop over NZ is the outer-most (slowest). In the new versions of VASP, the values of the charge density in CHGCAR are separated by spaces and can be read format-free. The augmentation occupancies are written to CHGCAR up to the l-quantum number, which is set by the LMAXMIX flag. The real-space mesh (NX,NY,NZ) is uniform and is spanned by the lattice vectors defined in the structure block. The coordinates of the mesh points can be restored via

.

Molecular dynamics

In the case of MD simulations (IBRION=0), CHGCAR contains the predicted charge density for the next step, which corresponds to the atomic structure in the CONTCAR file. Although it makes the charge density incompatible with the last atomic coordinates in the OUTCAR file, it allows one to use the CHGCAR and the CONTCAR files consistently for continuing the MD simulation.

Warning: In MD simulations, the charge density in CHGCAR is not the self-consistent charge density for the structure in the CONTCAR file, hence one should not perform a band structure calculation directly after the MD simulation.

For static and relaxation calculations (IBRION=-1,1,2), the charge density in CHGCAR is the self-consistent charge density for the last iteration. Hence it can be used for accurate band structure calculations.


Spin-polarized

In spin-polarized calculations, two sets of data are stored in the CHGCAR file. The first set contains the total charge density (spin up + spin down) and the second one is the magnetization density (spin up - spin down):

  • structure
  • total charge density (spin up + spin down)
  • augmentation occupancies
  • magnetization density (spin up - spin down)
  • augmentation occupancies

Non-collinear

In non-collinear calculations, CHGCAR contains the total charge density and the magnetization density in the x, y, and z-direction:

  • structure
  • total charge density
  • augmentation occupancies
  • augmentation occupancies (imaginary part)
  • magnetization density in x-direction
  • augmentation occupancies
  • augmentation occupancies (imaginary part)
  • magnetization density in y-direction
  • ...
  • magnetization density in z-direction
  • ....