PARCHG: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
Line 2: Line 2:
The file has the same structure as the {{FILE|CHG}} file, containing the structure followed by the charge density on the fine FFT grid, but missing the augmentation occupancies that are written to {{FILE|CHGCAR}}. The units are also equivalent to {{FILE|CHG}} and {{FILE|CHGCAR}}.
The file has the same structure as the {{FILE|CHG}} file, containing the structure followed by the charge density on the fine FFT grid, but missing the augmentation occupancies that are written to {{FILE|CHGCAR}}. The units are also equivalent to {{FILE|CHG}} and {{FILE|CHGCAR}}.


The density written to {{FILE|PARCHG}} is the valence electron density that was converged selfconsistently in a previous run.  
The partial density written to {{FILE|PARCHG}} is part of the valence electron density that was converged selfconsistently in a previous run.  
The bands and '''k''' points that contribute to the partial charges are selected by the {{TAG|IBAND}}, {{TAG|NBMOD}}, {{TAG|EINT}} and {{TAG|KPUSE}} tags, allowing for fine control of the contributions to the partial charge density.
The bands and '''k''' points that contribute to the partial charges are selected by the {{TAG|IBAND}}, {{TAG|NBMOD}}, {{TAG|EINT}} and {{TAG|KPUSE}} tags, allowing for fine control of the contributions to the partial charge density.
== Format ==
The {{FILE|PARCHG}} consists of the following blocks:
* Structure in {{FILE|POSCAR}} format
* FFT-grid dimensions {{TAG|NGXF}}, {{TAG|NGYF}}, {{TAG|NGZF}}
* Partial charge density times FFT-grid volume is written with multiple real numbers per line until all {{TAG|NGXF}}*{{TAG|NGYF}}*{{TAG|NGZF}} values of the block are written.
The real-space mesh (NX,NY,NZ) is uniform and is spanned by the lattice vectors <math>\vec{a}, \vec{b}, \vec{c}</math> defined in the structure block. The coordinates of the mesh points can be restored via
::<math>(N_x,N_y,N_z) \hat{=} \frac{N_x-1}{N_{GXF}}\mathbf{a}+\frac{N_y-1}{N_{GYF}}\mathbf{b}+\frac{N_z-1}{N_{GZF}}\mathbf{c}</math>.
The dimensions can be increased by increasing the cutoff energy ({{TAG|ENCUT}}) or explicitly by setting the fine FFT-grid dimensions ({{TAG|NGXF}}, {{TAG|NGYF}}, {{TAG|NGZF}}).
To arrange the data on the real-space grid in the unit cell, mind that the data runs fastest over NX and slowest over NZ. To be more explicit, the density is written using the following command in Fortran
::<code> WRITE(IU,FORM) (((C(NX,NY,NZ),NX=1,{{TAGBL|NGXF}}),NY=1,{{TAGBL|NGYF}}),NZ=1,{{TAGBL|NGZF}}) </code>.
{{NB|important|Remember that the values must be divided by the FFT-grid volume and the cell volume to obtain the partial charge density <math>n(r)</math> in units <math>e/\AA^3</math>.}}
Hence,
::<math>n(r)=data(r)/(V_{grid}*V_{cell}),    </math>
::<math>V_{grid} = N_{GXF}*N_{GYF}*N_{GZF},  </math>
::<math>V_{cell} = |\mathbf{a}\cdot(\mathbf{b}\times\mathbf{c})| </math>,
where <math>n(r)</math> is the partial charge density in units 1/Å<math>^3</math>.


=== Spin-polarized calculation===
=== Spin-polarized calculation===
In spin-polarized calculations, two data sets are stored in the {{FILE|PARCHG}} file.
In spin-polarized calculations, two data sets are stored in the {{FILE|PARCHG}} file.
The first set contains the total partial density (spin up + spin down) and the second one is the magnetization density (spin up - spin down). Each block is separated by a blank line and a line containing the fine FFT grid dimensions {{TAG|NGXF}} {{TAG|NGYF}} {{TAG|NGZF}}.
The first set contains the total partial density (spin up + spin down) and the second one is the magnetization density (spin up - spin down). Each block is separated by a blank line and a line containing the fine FFT grid dimensions {{TAG|NGXF}} {{TAG|NGYF}} {{TAG|NGZF}}.
* structure
* Structure
* total charge density (spin up + spin down)
* FFT-grid dimensions
* magnetization density (spin up - spin down)
* Partial charge density times FFT-grid volume (spin up + spin down)
* FFT-grid dimensions
* Partial magnetization density (spin up - spin down)


== Variants of PARCHG with bands or k points separated ==
== Variants of PARCHG with bands or k points separated ==

Revision as of 16:18, 9 February 2024

PARCHG is an output file created when partial charge densities are calculated by setting LPARD = .TRUE.. The file has the same structure as the CHG file, containing the structure followed by the charge density on the fine FFT grid, but missing the augmentation occupancies that are written to CHGCAR. The units are also equivalent to CHG and CHGCAR.

The partial density written to PARCHG is part of the valence electron density that was converged selfconsistently in a previous run. The bands and k points that contribute to the partial charges are selected by the IBAND, NBMOD, EINT and KPUSE tags, allowing for fine control of the contributions to the partial charge density.

Format

The PARCHG consists of the following blocks:

  • Structure in POSCAR format
  • FFT-grid dimensions NGXF, NGYF, NGZF
  • Partial charge density times FFT-grid volume is written with multiple real numbers per line until all NGXF*NGYF*NGZF values of the block are written.

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

.

The dimensions can be increased by increasing the cutoff energy (ENCUT) or explicitly by setting the fine FFT-grid dimensions (NGXF, NGYF, NGZF).

To arrange the data on the real-space grid in the unit cell, mind that the data runs fastest over NX and slowest over NZ. To be more explicit, the density is written using the following command in Fortran

WRITE(IU,FORM) (((C(NX,NY,NZ),NX=1,NGXF),NY=1,NGYF),NZ=1,NGZF) .
Important: Remember that the values must be divided by the FFT-grid volume and the cell volume to obtain the partial charge density in units .

Hence,

,

where is the partial charge density in units 1/Å.

Spin-polarized calculation

In spin-polarized calculations, two data sets are stored in the PARCHG file. The first set contains the total partial density (spin up + spin down) and the second one is the magnetization density (spin up - spin down). Each block is separated by a blank line and a line containing the fine FFT grid dimensions NGXF NGYF NGZF.

  • Structure
  • FFT-grid dimensions
  • Partial charge density times FFT-grid volume (spin up + spin down)
  • FFT-grid dimensions
  • Partial magnetization density (spin up - spin down)

Variants of PARCHG with bands or k points separated

If LSEPB and/or LSEPK are set to .TRUE. variants of the PARCHG file are written, separating the contributing bands and k points respectively. The units and format of the files stay the same.

If LSEPB = .TRUE. but LSEPK = .FALSE. PARCHG.nb.ALLK files will be written, with nb an index running through all bands contributing to the partial charge density.

LSEPB = .FALSE. but LSEPK = .TRUE. results in PARCHG.ALLB.nk files being created, with nk running over all k points in KPUSE or all k points if KPUSE is not set.

For both LSEPB = .TRUE. and LSEPK = .TRUE. all combinations are written to PARCHG.nb.nk files.

Related tags and articles

LPARD, IBAND, EINT, NBMOD, KPUSE, LSEPB, LSEPK, Band decomposed charge densities