LPARDH5: Difference between revisions

From VASP Wiki
(Created page with "{{TAGDEF|LPARDH5|[logical]|.FALSE.}} Description: Determines whether partial (band and/or '''k'''-point-decomposed) charge densities are written to {{FILE|vaspout.h5}} instead of {{FILE|PARCHG}}. {{NB|mind|This tag is only available as of VASP.6.5.0.}} ---- IF {{TAG|LPARDH5}} = .TRUE., the partial charge density from a post-processing run with {{TAG|LPARD}} = .TRUE. can be analyzed with {{py4vasp}}. E.g. for the simulation of scanning tunneling microscopy (STM) images....")
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TAGDEF|LPARDH5|[logical]|.FALSE.}}
{{TAGDEF|LPARDH5|[logical]|.FALSE.}}


Description: Determines whether partial (band and/or '''k'''-point-decomposed) charge densities are written to {{FILE|vaspout.h5}} instead of {{FILE|PARCHG}}.
Description: {{TAG|LPARDH5}} determines whether the partial charges are written to {{FILE|PARCHG}} or {{FILE|vaspout.h5}}.
{{NB|mind|This tag is only available as of VASP.6.5.0.}}
{{Available|6.5.0}}
----
----
IF {{TAG|LPARDH5}} = .TRUE., the partial charge density from a post-processing run with {{TAG|LPARD}} = .TRUE. can be analyzed with {{py4vasp}}. E.g. for the simulation of scanning tunneling microscopy (STM) images.
[[Band-decomposed charge densities|Partial charges]] can be calculated as a postprocessing step when {{TAG|LPARD}} = .TRUE.. The output is written to one or several {{FILE|PARCHG}} files if {{TAG|LPARDH5}}=.FALSE., and to {{FILE|vaspout.h5}} if {{TAG|LPARDH5}}=.TRUE.. If {{TAG|NBMOD}} = -1, the setting of {{TAG|LPARD}} is irrelevant. Instead of a {{FILE|PARCHG}} file, or a partial_charges group in the {{FILE|vaspout.h5}} hdf5 file, a {{FILE|CHGCAR}} file ''without'' augmentation charges will be written.
 
If the output is redirected to {{FILE|vaspout.h5}}, {{py4vasp}} can be used to analyze the partial charge density and to simulate STM pictures.
 
For example, the following Python code would create a dictionary with the partial charge output and plot an STM simulation.
<syntaxhighlight lang="python">
  import py4vasp as pv
  calc = pv.Calculation.from_path(".")
  part_charge_dict = calc.partial_density.to_dict()
  calc.partial_density.to_stm()
</syntaxhighlight>
 
The command below prints the table of contents of the {{FILE|vaspout.h5}} file.
  h5ls -r vaspout.h5
The section relevant to partial charges will look similar to this:
  /results/partial_charges Group
  /results/partial_charges/bands Dataset {1}
  /results/partial_charges/grid Dataset {3}
  /results/partial_charges/kpoints Dataset {1}
  /results/partial_charges/parchg Dataset {1, 1, 2, 480, 48, 48}


== Related tags and articles ==
{{TAG|LPARD}},
{{TAG|LPARD}},
{{TAG|LWAVEH5}},
{{TAG|LCHARGH5}},
{{TAG|IBAND}},
{{TAG|IBAND}},
{{TAG|EINT}},
{{TAG|EINT}},
Line 15: Line 35:
{{TAG|LSEPK}},
{{TAG|LSEPK}},
{{FILE|PARCHG}},
{{FILE|PARCHG}},
{{FILE|vaspout.h5}},
[[band-decomposed charge densities]]
[[Band-decomposed charge densities]]


{{sc|LPARDH5|Examples|Examples that use this tag}}
{{sc|LPARDH5|Examples|Examples that use this tag}}
----
----
[[Category:INCAR tag]][[Category:Charge density]]
[[Category:INCAR tag]][[Category:Charge density]]

Latest revision as of 14:05, 15 October 2025

LPARDH5 = [logical]
Default: LPARDH5 = .FALSE. 

Description: LPARDH5 determines whether the partial charges are written to PARCHG or vaspout.h5.

Mind: Available as of VASP 6.5.0

Partial charges can be calculated as a postprocessing step when LPARD = .TRUE.. The output is written to one or several PARCHG files if LPARDH5=.FALSE., and to vaspout.h5 if LPARDH5=.TRUE.. If NBMOD = -1, the setting of LPARD is irrelevant. Instead of a PARCHG file, or a partial_charges group in the vaspout.h5 hdf5 file, a CHGCAR file without augmentation charges will be written.

If the output is redirected to vaspout.h5, py4vasp can be used to analyze the partial charge density and to simulate STM pictures.

For example, the following Python code would create a dictionary with the partial charge output and plot an STM simulation.

  import py4vasp as pv
  calc = pv.Calculation.from_path(".")
  part_charge_dict = calc.partial_density.to_dict()
  calc.partial_density.to_stm()

The command below prints the table of contents of the vaspout.h5 file.

 h5ls -r vaspout.h5

The section relevant to partial charges will look similar to this:

 /results/partial_charges Group
 /results/partial_charges/bands Dataset {1}
 /results/partial_charges/grid Dataset {3}
 /results/partial_charges/kpoints Dataset {1}
 /results/partial_charges/parchg Dataset {1, 1, 2, 480, 48, 48}

LPARD, LWAVEH5, LCHARGH5, IBAND, EINT, NBMOD, KPUSE, LSEPB, LSEPK, PARCHG, band-decomposed charge densities

Examples that use this tag