# Charge density¶

class storq.vasp.charge_density.VaspChargeDensity(filename='CHG')[source]

Class for representing VASP charge density

is_spin_polarized()[source]
read(filename='CHG')[source]

If CHG contains charge density from multiple steps all the steps are read and stored in the object. By default VASP writes out the charge density every 10 steps.

chgdiff is the difference between the spin up charge density and the spin down charge density and is thus only read for a spin-polarized calculation.

aug is the PAW augmentation charges found in CHGCAR. These are not parsed, they are just stored as a string so that they can be written again to a CHGCAR format file.

write(filename='CHG', format=None)[source]

Write VASP charge density in CHG format.

filename: str
Name of file to write to.
format: str
String specifying whether to write in CHGCAR or CHG format.